From d93551dc9983b19553488b81a2ec58be59fff1f4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 9 Jun 2026 10:00:55 +0000 Subject: [PATCH 1/2] feat: update cloud ml ces v1beta client libraries docs: Update comments for `audio_recording_config` and `bigquery_export_settings` in `LoggingSettings`. docs: Update comments for various `InputType` enum values. docs: Update comments for `root_span`, `turns`, and `max_turns` in `Evaluation`. PiperOrigin-RevId: 928656124 fix(php): remove abandoned deps docs(php): fix mulitline phpdoc for mixins PiperOrigin-RevId: 928824112 Source-Link: https://github.com/googleapis/googleapis/commit/bf6e4c7affb3da976ee6a97ea1c542952b493205 Source-Link: https://github.com/googleapis/googleapis-gen/commit/545de85fd686033c97c075ad8b82e38604f11789 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNlcy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjU0NWRlODVmZDY4NjAzM2M5N2MwNzVhZDhiODJlMzg2MDRmMTE3ODkifQ== --- .../google-cloud-ces-v1beta/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-ces-v1beta/.rubocop.yml | 33 + .../google-cloud-ces-v1beta/.toys.rb | 28 + .../google-cloud-ces-v1beta/.yardopts | 12 + .../google-cloud-ces-v1beta/AUTHENTICATION.md | 122 + .../google-cloud-ces-v1beta/CHANGELOG.md | 2 + .../google-cloud-ces-v1beta/Gemfile | 14 + .../google-cloud-ces-v1beta/LICENSE.md | 201 + .../google-cloud-ces-v1beta/README.md | 154 + .../google-cloud-ces-v1beta/Rakefile | 169 + .../gapic_metadata.json | 519 ++ .../google-cloud-ces-v1beta.gemspec | 29 + .../lib/google-cloud-ces-v1beta.rb | 21 + .../lib/google/cloud/ces/v1beta.rb | 49 + .../google/cloud/ces/v1beta/agent_card_pb.rb | 26 + .../lib/google/cloud/ces/v1beta/agent_pb.rb | 30 + .../google/cloud/ces/v1beta/agent_service.rb | 57 + .../cloud/ces/v1beta/agent_service/client.rb | 5639 +++++++++++++++++ .../ces/v1beta/agent_service/credentials.rb | 48 + .../ces/v1beta/agent_service/operations.rb | 841 +++ .../cloud/ces/v1beta/agent_service/paths.rb | 481 ++ .../cloud/ces/v1beta/agent_service/rest.rb | 55 + .../ces/v1beta/agent_service/rest/client.rb | 5247 +++++++++++++++ .../v1beta/agent_service/rest/operations.rb | 925 +++ .../v1beta/agent_service/rest/service_stub.rb | 3213 ++++++++++ .../cloud/ces/v1beta/agent_service_pb.rb | 132 + .../ces/v1beta/agent_service_services_pb.rb | 148 + .../google/cloud/ces/v1beta/agent_tool_pb.rb | 24 + .../cloud/ces/v1beta/agent_transfers_pb.rb | 29 + .../lib/google/cloud/ces/v1beta/app_pb.rb | 70 + .../google/cloud/ces/v1beta/app_version_pb.rb | 32 + .../lib/google/cloud/ces/v1beta/auth_pb.rb | 34 + .../cloud/ces/v1beta/bigquery_export_pb.rb | 23 + .../cloud/ces/v1beta/bindings_override.rb | 75 + .../google/cloud/ces/v1beta/changelog_pb.rb | 26 + .../cloud/ces/v1beta/client_function_pb.rb | 24 + .../lib/google/cloud/ces/v1beta/common_pb.rb | 46 + .../cloud/ces/v1beta/connector_tool_pb.rb | 27 + .../cloud/ces/v1beta/connector_toolset_pb.rb | 25 + .../cloud/ces/v1beta/conversation_pb.rb | 31 + .../google/cloud/ces/v1beta/data_store_pb.rb | 27 + .../cloud/ces/v1beta/data_store_tool_pb.rb | 40 + .../google/cloud/ces/v1beta/deployment_pb.rb | 30 + .../v1beta/evaluation_metrics_config_pb.rb | 31 + .../google/cloud/ces/v1beta/evaluation_pb.rb | 99 + .../cloud/ces/v1beta/evaluation_service.rb | 56 + .../ces/v1beta/evaluation_service/client.rb | 4048 ++++++++++++ .../v1beta/evaluation_service/credentials.rb | 48 + .../v1beta/evaluation_service/operations.rb | 841 +++ .../ces/v1beta/evaluation_service/paths.rb | 306 + .../ces/v1beta/evaluation_service/rest.rb | 54 + .../v1beta/evaluation_service/rest/client.rb | 3768 +++++++++++ .../evaluation_service/rest/operations.rb | 925 +++ .../evaluation_service/rest/service_stub.rb | 2233 +++++++ .../cloud/ces/v1beta/evaluation_service_pb.rb | 93 + .../v1beta/evaluation_service_services_pb.rb | 116 + .../lib/google/cloud/ces/v1beta/example_pb.rb | 34 + .../lib/google/cloud/ces/v1beta/fakes_pb.rb | 25 + .../cloud/ces/v1beta/file_context_pb.rb | 24 + .../cloud/ces/v1beta/file_search_tool_pb.rb | 24 + .../google/cloud/ces/v1beta/golden_run_pb.rb | 21 + .../cloud/ces/v1beta/google_search_tool_pb.rb | 24 + .../google/cloud/ces/v1beta/guardrail_pb.rb | 37 + .../google/cloud/ces/v1beta/mcp_tool_pb.rb | 27 + .../google/cloud/ces/v1beta/mcp_toolset_pb.rb | 28 + .../lib/google/cloud/ces/v1beta/mocks_pb.rb | 26 + .../google/cloud/ces/v1beta/omnichannel_pb.rb | 31 + .../ces/v1beta/omnichannel_service_pb.rb | 27 + .../cloud/ces/v1beta/open_api_tool_pb.rb | 25 + .../cloud/ces/v1beta/open_api_toolset_pb.rb | 25 + .../cloud/ces/v1beta/python_function_pb.rb | 24 + .../lib/google/cloud/ces/v1beta/rest.rb | 42 + .../lib/google/cloud/ces/v1beta/schema_pb.rb | 25 + .../cloud/ces/v1beta/search_suggestions_pb.rb | 22 + .../cloud/ces/v1beta/security_settings_pb.rb | 27 + .../cloud/ces/v1beta/session_service.rb | 55 + .../ces/v1beta/session_service/client.rb | 760 +++ .../ces/v1beta/session_service/credentials.rb | 48 + .../cloud/ces/v1beta/session_service/paths.rb | 117 + .../cloud/ces/v1beta/session_service/rest.rb | 53 + .../ces/v1beta/session_service/rest/client.rb | 560 ++ .../session_service/rest/service_stub.rb | 199 + .../cloud/ces/v1beta/session_service_pb.rb | 54 + .../ces/v1beta/session_service_services_pb.rb | 120 + .../google/cloud/ces/v1beta/system_tool_pb.rb | 23 + .../lib/google/cloud/ces/v1beta/tool_pb.rb | 40 + .../google/cloud/ces/v1beta/tool_service.rb | 55 + .../cloud/ces/v1beta/tool_service/client.rb | 731 +++ .../ces/v1beta/tool_service/credentials.rb | 48 + .../cloud/ces/v1beta/tool_service/paths.rb | 94 + .../cloud/ces/v1beta/tool_service/rest.rb | 53 + .../ces/v1beta/tool_service/rest/client.rb | 675 ++ .../v1beta/tool_service/rest/service_stub.rb | 267 + .../cloud/ces/v1beta/tool_service_pb.rb | 37 + .../ces/v1beta/tool_service_services_pb.rb | 50 + .../lib/google/cloud/ces/v1beta/toolset_pb.rb | 30 + .../cloud/ces/v1beta/toolset_tool_pb.rb | 24 + .../lib/google/cloud/ces/v1beta/version.rb | 28 + .../google/cloud/ces/v1beta/widget_service.rb | 55 + .../cloud/ces/v1beta/widget_service/client.rb | 501 ++ .../ces/v1beta/widget_service/credentials.rb | 48 + .../cloud/ces/v1beta/widget_service/paths.rb | 75 + .../cloud/ces/v1beta/widget_service/rest.rb | 53 + .../ces/v1beta/widget_service/rest/client.rb | 459 ++ .../widget_service/rest/service_stub.rb | 143 + .../cloud/ces/v1beta/widget_service_pb.rb | 28 + .../ces/v1beta/widget_service_services_pb.rb | 46 + .../google/cloud/ces/v1beta/widget_tool_pb.rb | 31 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/ces/v1beta/agent.rb | 233 + .../google/cloud/ces/v1beta/agent_card.rb | 122 + .../google/cloud/ces/v1beta/agent_service.rb | 1682 +++++ .../google/cloud/ces/v1beta/agent_tool.rb | 48 + .../cloud/ces/v1beta/agent_transfers.rb | 111 + .../proto_docs/google/cloud/ces/v1beta/app.rb | 883 +++ .../google/cloud/ces/v1beta/app_version.rb | 83 + .../google/cloud/ces/v1beta/auth.rb | 214 + .../cloud/ces/v1beta/bigquery_export.rb | 45 + .../google/cloud/ces/v1beta/changelog.rb | 73 + .../cloud/ces/v1beta/client_function.rb | 48 + .../google/cloud/ces/v1beta/common.rb | 375 ++ .../google/cloud/ces/v1beta/connector_tool.rb | 122 + .../cloud/ces/v1beta/connector_toolset.rb | 52 + .../google/cloud/ces/v1beta/conversation.rb | 159 + .../google/cloud/ces/v1beta/data_store.rb | 102 + .../cloud/ces/v1beta/data_store_tool.rb | 328 + .../google/cloud/ces/v1beta/deployment.rb | 123 + .../google/cloud/ces/v1beta/evaluation.rb | 1687 +++++ .../ces/v1beta/evaluation_metrics_config.rb | 151 + .../cloud/ces/v1beta/evaluation_service.rb | 1087 ++++ .../google/cloud/ces/v1beta/example.rb | 245 + .../google/cloud/ces/v1beta/fakes.rb | 67 + .../google/cloud/ces/v1beta/file_context.rb | 50 + .../cloud/ces/v1beta/file_search_tool.rb | 60 + .../google/cloud/ces/v1beta/golden_run.rb | 40 + .../cloud/ces/v1beta/google_search_tool.rb | 76 + .../google/cloud/ces/v1beta/guardrail.rb | 324 + .../google/cloud/ces/v1beta/mcp_tool.rb | 110 + .../google/cloud/ces/v1beta/mcp_toolset.rb | 118 + .../google/cloud/ces/v1beta/mocks.rb | 60 + .../google/cloud/ces/v1beta/omnichannel.rb | 163 + .../cloud/ces/v1beta/omnichannel_service.rb | 45 + .../google/cloud/ces/v1beta/open_api_tool.rb | 66 + .../cloud/ces/v1beta/open_api_toolset.rb | 57 + .../cloud/ces/v1beta/python_function.rb | 47 + .../google/cloud/ces/v1beta/schema.rb | 162 + .../cloud/ces/v1beta/search_suggestions.rb | 55 + .../cloud/ces/v1beta/security_settings.rb | 80 + .../cloud/ces/v1beta/session_service.rb | 493 ++ .../google/cloud/ces/v1beta/system_tool.rb | 38 + .../google/cloud/ces/v1beta/tool.rb | 136 + .../google/cloud/ces/v1beta/tool_service.rb | 185 + .../google/cloud/ces/v1beta/toolset.rb | 80 + .../google/cloud/ces/v1beta/toolset_tool.rb | 40 + .../google/cloud/ces/v1beta/widget_service.rb | 62 + .../google/cloud/ces/v1beta/widget_tool.rb | 182 + .../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/rpc/status.rb | 48 + .../google-cloud-ces-v1beta/snippets/Gemfile | 32 + .../batch_delete_conversations.rb | 54 + .../snippets/agent_service/create_agent.rb | 47 + .../snippets/agent_service/create_app.rb | 54 + .../agent_service/create_app_version.rb | 47 + .../agent_service/create_deployment.rb | 47 + .../snippets/agent_service/create_example.rb | 47 + .../agent_service/create_guardrail.rb | 47 + .../snippets/agent_service/create_tool.rb | 47 + .../snippets/agent_service/create_toolset.rb | 47 + .../snippets/agent_service/delete_agent.rb | 47 + .../snippets/agent_service/delete_app.rb | 54 + .../agent_service/delete_app_version.rb | 47 + .../agent_service/delete_conversation.rb | 47 + .../agent_service/delete_deployment.rb | 47 + .../snippets/agent_service/delete_example.rb | 47 + .../agent_service/delete_guardrail.rb | 47 + .../snippets/agent_service/delete_tool.rb | 47 + .../snippets/agent_service/delete_toolset.rb | 47 + .../snippets/agent_service/export_app.rb | 54 + .../agent_service/generate_app_resource.rb | 54 + .../snippets/agent_service/get_agent.rb | 47 + .../snippets/agent_service/get_app.rb | 47 + .../snippets/agent_service/get_app_version.rb | 47 + .../snippets/agent_service/get_changelog.rb | 47 + .../agent_service/get_conversation.rb | 47 + .../snippets/agent_service/get_deployment.rb | 47 + .../snippets/agent_service/get_example.rb | 47 + .../snippets/agent_service/get_guardrail.rb | 47 + .../agent_service/get_security_settings.rb | 47 + .../snippets/agent_service/get_tool.rb | 47 + .../snippets/agent_service/get_toolset.rb | 47 + .../snippets/agent_service/import_app.rb | 54 + .../snippets/agent_service/list_agents.rb | 51 + .../agent_service/list_app_versions.rb | 51 + .../snippets/agent_service/list_apps.rb | 51 + .../snippets/agent_service/list_changelogs.rb | 51 + .../agent_service/list_conversations.rb | 51 + .../agent_service/list_deployments.rb | 51 + .../snippets/agent_service/list_examples.rb | 51 + .../snippets/agent_service/list_guardrails.rb | 51 + .../snippets/agent_service/list_tools.rb | 51 + .../snippets/agent_service/list_toolsets.rb | 51 + .../agent_service/restore_app_version.rb | 54 + .../snippets/agent_service/update_agent.rb | 47 + .../snippets/agent_service/update_app.rb | 47 + .../agent_service/update_deployment.rb | 47 + .../snippets/agent_service/update_example.rb | 47 + .../agent_service/update_guardrail.rb | 47 + .../agent_service/update_security_settings.rb | 47 + .../snippets/agent_service/update_tool.rb | 47 + .../snippets/agent_service/update_toolset.rb | 47 + .../evaluation_service/create_evaluation.rb | 47 + .../create_evaluation_dataset.rb | 47 + .../create_evaluation_expectation.rb | 47 + .../create_scheduled_evaluation_run.rb | 47 + .../evaluation_service/delete_evaluation.rb | 47 + .../delete_evaluation_dataset.rb | 47 + .../delete_evaluation_expectation.rb | 47 + .../delete_evaluation_result.rb | 47 + .../delete_evaluation_run.rb | 54 + .../delete_scheduled_evaluation_run.rb | 47 + .../export_evaluation_results.rb | 54 + .../export_evaluation_runs.rb | 54 + .../evaluation_service/export_evaluations.rb | 54 + .../evaluation_service/generate_evaluation.rb | 54 + .../evaluation_service/get_evaluation.rb | 47 + .../get_evaluation_dataset.rb | 47 + .../get_evaluation_expectation.rb | 47 + .../get_evaluation_result.rb | 47 + .../evaluation_service/get_evaluation_run.rb | 47 + .../get_scheduled_evaluation_run.rb | 47 + .../evaluation_service/import_evaluations.rb | 54 + .../list_evaluation_datasets.rb | 51 + .../list_evaluation_expectations.rb | 51 + .../list_evaluation_results.rb | 51 + .../list_evaluation_runs.rb | 51 + .../evaluation_service/list_evaluations.rb | 51 + .../list_scheduled_evaluation_runs.rb | 51 + .../evaluation_service/run_evaluation.rb | 54 + .../run_evaluation_result_metrics.rb | 54 + .../evaluation_service/test_persona_voice.rb | 47 + .../evaluation_service/update_evaluation.rb | 47 + .../update_evaluation_dataset.rb | 47 + .../update_evaluation_expectation.rb | 47 + .../update_scheduled_evaluation_run.rb | 47 + .../upload_evaluation_audio.rb | 47 + .../session_service/bidi_run_session.rb | 56 + .../snippets/session_service/run_session.rb | 47 + .../session_service/stream_run_session.rb | 50 + ...ppet_metadata_google.cloud.ces.v1beta.json | 3735 +++++++++++ .../snippets/tool_service/execute_tool.rb | 47 + .../tool_service/retrieve_tool_schema.rb | 47 + .../snippets/tool_service/retrieve_tools.rb | 47 + .../widget_service/generate_chat_token.rb | 47 + .../v1beta/agent_service_operations_test.rb | 400 ++ .../ces/v1beta/agent_service_paths_test.rb | 289 + .../ces/v1beta/agent_service_rest_test.rb | 2948 +++++++++ .../cloud/ces/v1beta/agent_service_test.rb | 3353 ++++++++++ .../evaluation_service_operations_test.rb | 400 ++ .../v1beta/evaluation_service_paths_test.rb | 199 + .../v1beta/evaluation_service_rest_test.rb | 2059 ++++++ .../ces/v1beta/evaluation_service_test.rb | 2360 +++++++ .../ces/v1beta/session_service_paths_test.rb | 91 + .../ces/v1beta/session_service_rest_test.rb | 209 + .../cloud/ces/v1beta/session_service_test.rb | 328 + .../ces/v1beta/tool_service_paths_test.rb | 79 + .../ces/v1beta/tool_service_rest_test.rb | 268 + .../cloud/ces/v1beta/tool_service_test.rb | 295 + .../ces/v1beta/widget_service_paths_test.rb | 67 + .../ces/v1beta/widget_service_rest_test.rb | 156 + .../cloud/ces/v1beta/widget_service_test.rb | 168 + .../google-cloud-ces-v1beta/test/helper.rb | 26 + 282 files changed, 72236 insertions(+) create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/.gitignore create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/.yardopts create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/Gemfile create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/README.md create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/Rakefile create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/google-cloud-ces-v1beta.gemspec create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google-cloud-ces-v1beta.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_card_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_transfers_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/app_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/app_version_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/auth_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/changelog_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/client_function_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/example_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/fakes_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/file_context_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/file_search_tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/golden_run_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/google_search_tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/guardrail_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/mcp_tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/mcp_toolset_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/mocks_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/omnichannel_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/omnichannel_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/open_api_tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/open_api_toolset_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/python_function_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/rest.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/schema_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/search_suggestions_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/security_settings_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/system_tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/version.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_card.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_transfers.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app_version.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/auth.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/bigquery_export.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/changelog.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/client_function.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/common.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_toolset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/example.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/fakes.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_context.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_search_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/golden_run.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/google_search_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/guardrail.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mocks.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_toolset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/schema.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/search_suggestions.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/security_settings.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/system_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_service.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/batch_delete_conversations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_agent.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app_version.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_deployment.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_example.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_guardrail.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_toolset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_agent.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app_version.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_conversation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_deployment.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_example.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_guardrail.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_toolset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/export_app.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/generate_app_resource.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_agent.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app_version.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_changelog.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_conversation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_deployment.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_example.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_guardrail.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_security_settings.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_toolset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/import_app.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_agents.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_app_versions.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_apps.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_changelogs.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_conversations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_deployments.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_examples.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_guardrails.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_tools.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_toolsets.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/restore_app_version.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_agent.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_app.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_deployment.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_example.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_guardrail.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_security_settings.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_toolset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_dataset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_expectation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_scheduled_evaluation_run.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_dataset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_expectation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_result.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_run.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_scheduled_evaluation_run.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_results.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_runs.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/generate_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_dataset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_expectation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_result.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_run.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_scheduled_evaluation_run.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/import_evaluations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_datasets.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_expectations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_results.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_runs.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluations.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_scheduled_evaluation_runs.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation_result_metrics.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/test_persona_voice.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_dataset.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_expectation.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_scheduled_evaluation_run.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/upload_evaluation_audio.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/bidi_run_session.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/run_session.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/stream_run_session.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/execute_tool.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tool_schema.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tools.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/widget_service/generate_chat_token.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_test.rb create mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/helper.rb diff --git a/owl-bot-staging/google-cloud-ces-v1beta/.gitignore b/owl-bot-staging/google-cloud-ces-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-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-ces-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-ces-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..a660632c3be2 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "ces.googleapis.com", + "api_shortname": "ces", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-ces-v1beta/latest", + "distribution_name": "google-cloud-ces-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "ces", + "name_pretty": "Gemini Enterprise for Customer Experience V1BETA API", + "product_documentation": "https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-ces-v1beta is the official client library for the Gemini Enterprise for Customer Experience V1BETA API. Note that google-cloud-ces-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-ces instead. See the readme for more details.", + "ruby-cloud-product-url": "https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-ces-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-ces-v1beta/.rubocop.yml new file mode 100644 index 000000000000..aa5c8ff13938 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-ces-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-ces-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-ces-v1beta/.toys.rb b/owl-bot-staging/google-cloud-ces-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/.yardopts b/owl-bot-staging/google-cloud-ces-v1beta/.yardopts new file mode 100644 index 000000000000..3407f27b84f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Gemini Enterprise for Customer Experience 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-ces-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-ces-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..023e59ec5159 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-ces-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-ces-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/ces/v1beta" + +client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/ces/v1beta" + +::Google::Cloud::Ces::V1beta::SessionService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Ces::V1beta::SessionService::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-ces-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/ces/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Ces::V1beta::SessionService::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-ces-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-ces-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-ces-v1beta/Gemfile b/owl-bot-staging/google-cloud-ces-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-ces-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-ces-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-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-ces-v1beta/README.md b/owl-bot-staging/google-cloud-ces-v1beta/README.md new file mode 100644 index 000000000000..da8aa2b3a2a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Gemini Enterprise for Customer Experience V1BETA API + +API Client library for the Gemini Enterprise for Customer Experience V1BETA API + +google-cloud-ces-v1beta is the official client library for the Gemini Enterprise for Customer Experience 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 Gemini Enterprise for Customer Experience V1BETA API. Most users should consider using +the main client gem, +[google-cloud-ces](https://rubygems.org/gems/google-cloud-ces). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-ces-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/ces.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/ces/v1beta" + +client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new +request = ::Google::Cloud::Ces::V1beta::RunSessionRequest.new # (request fields as keyword arguments...) +response = client.run_session request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-ces-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps) +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/ces/v1beta" +require "logger" + +client = ::Google::Cloud::Ces::V1beta::SessionService::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-ces`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-ces-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-ces`. +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-ces-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-ces-v1beta/Rakefile b/owl-bot-staging/google-cloud-ces-v1beta/Rakefile new file mode 100644 index 000000000000..024868ac1099 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-ces-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/ces/v1beta/session_service/credentials" + ::Google::Cloud::Ces::V1beta::SessionService::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-ces-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-ces-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-ces-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-ces-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-ces-v1beta" + header "google-cloud-ces-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-ces-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-ces-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-ces-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-ces-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-ces-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-ces-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..09270bb1a53c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/gapic_metadata.json @@ -0,0 +1,519 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.ces.v1beta", + "libraryPackage": "::Google::Cloud::Ces::V1beta", + "services": { + "SessionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Ces::V1beta::SessionService::Client", + "rpcs": { + "RunSession": { + "methods": [ + "run_session" + ] + }, + "StreamRunSession": { + "methods": [ + "stream_run_session" + ] + }, + "BidiRunSession": { + "methods": [ + "bidi_run_session" + ] + } + } + } + } + }, + "AgentService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Ces::V1beta::AgentService::Client", + "rpcs": { + "ListApps": { + "methods": [ + "list_apps" + ] + }, + "GetApp": { + "methods": [ + "get_app" + ] + }, + "CreateApp": { + "methods": [ + "create_app" + ] + }, + "UpdateApp": { + "methods": [ + "update_app" + ] + }, + "DeleteApp": { + "methods": [ + "delete_app" + ] + }, + "ExportApp": { + "methods": [ + "export_app" + ] + }, + "ImportApp": { + "methods": [ + "import_app" + ] + }, + "GetSecuritySettings": { + "methods": [ + "get_security_settings" + ] + }, + "UpdateSecuritySettings": { + "methods": [ + "update_security_settings" + ] + }, + "ListAgents": { + "methods": [ + "list_agents" + ] + }, + "GetAgent": { + "methods": [ + "get_agent" + ] + }, + "CreateAgent": { + "methods": [ + "create_agent" + ] + }, + "UpdateAgent": { + "methods": [ + "update_agent" + ] + }, + "DeleteAgent": { + "methods": [ + "delete_agent" + ] + }, + "ListExamples": { + "methods": [ + "list_examples" + ] + }, + "GetExample": { + "methods": [ + "get_example" + ] + }, + "CreateExample": { + "methods": [ + "create_example" + ] + }, + "UpdateExample": { + "methods": [ + "update_example" + ] + }, + "DeleteExample": { + "methods": [ + "delete_example" + ] + }, + "ListTools": { + "methods": [ + "list_tools" + ] + }, + "GetTool": { + "methods": [ + "get_tool" + ] + }, + "ListConversations": { + "methods": [ + "list_conversations" + ] + }, + "GetConversation": { + "methods": [ + "get_conversation" + ] + }, + "DeleteConversation": { + "methods": [ + "delete_conversation" + ] + }, + "BatchDeleteConversations": { + "methods": [ + "batch_delete_conversations" + ] + }, + "CreateTool": { + "methods": [ + "create_tool" + ] + }, + "UpdateTool": { + "methods": [ + "update_tool" + ] + }, + "DeleteTool": { + "methods": [ + "delete_tool" + ] + }, + "ListGuardrails": { + "methods": [ + "list_guardrails" + ] + }, + "GetGuardrail": { + "methods": [ + "get_guardrail" + ] + }, + "CreateGuardrail": { + "methods": [ + "create_guardrail" + ] + }, + "UpdateGuardrail": { + "methods": [ + "update_guardrail" + ] + }, + "DeleteGuardrail": { + "methods": [ + "delete_guardrail" + ] + }, + "ListDeployments": { + "methods": [ + "list_deployments" + ] + }, + "GetDeployment": { + "methods": [ + "get_deployment" + ] + }, + "CreateDeployment": { + "methods": [ + "create_deployment" + ] + }, + "UpdateDeployment": { + "methods": [ + "update_deployment" + ] + }, + "DeleteDeployment": { + "methods": [ + "delete_deployment" + ] + }, + "ListToolsets": { + "methods": [ + "list_toolsets" + ] + }, + "GetToolset": { + "methods": [ + "get_toolset" + ] + }, + "CreateToolset": { + "methods": [ + "create_toolset" + ] + }, + "UpdateToolset": { + "methods": [ + "update_toolset" + ] + }, + "DeleteToolset": { + "methods": [ + "delete_toolset" + ] + }, + "ListAppVersions": { + "methods": [ + "list_app_versions" + ] + }, + "GetAppVersion": { + "methods": [ + "get_app_version" + ] + }, + "CreateAppVersion": { + "methods": [ + "create_app_version" + ] + }, + "DeleteAppVersion": { + "methods": [ + "delete_app_version" + ] + }, + "RestoreAppVersion": { + "methods": [ + "restore_app_version" + ] + }, + "GenerateAppResource": { + "methods": [ + "generate_app_resource" + ] + }, + "ListChangelogs": { + "methods": [ + "list_changelogs" + ] + }, + "GetChangelog": { + "methods": [ + "get_changelog" + ] + } + } + } + } + }, + "EvaluationService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Ces::V1beta::EvaluationService::Client", + "rpcs": { + "RunEvaluation": { + "methods": [ + "run_evaluation" + ] + }, + "UploadEvaluationAudio": { + "methods": [ + "upload_evaluation_audio" + ] + }, + "CreateEvaluation": { + "methods": [ + "create_evaluation" + ] + }, + "GenerateEvaluation": { + "methods": [ + "generate_evaluation" + ] + }, + "ImportEvaluations": { + "methods": [ + "import_evaluations" + ] + }, + "CreateEvaluationDataset": { + "methods": [ + "create_evaluation_dataset" + ] + }, + "UpdateEvaluation": { + "methods": [ + "update_evaluation" + ] + }, + "UpdateEvaluationDataset": { + "methods": [ + "update_evaluation_dataset" + ] + }, + "DeleteEvaluation": { + "methods": [ + "delete_evaluation" + ] + }, + "DeleteEvaluationResult": { + "methods": [ + "delete_evaluation_result" + ] + }, + "DeleteEvaluationDataset": { + "methods": [ + "delete_evaluation_dataset" + ] + }, + "DeleteEvaluationRun": { + "methods": [ + "delete_evaluation_run" + ] + }, + "GetEvaluation": { + "methods": [ + "get_evaluation" + ] + }, + "GetEvaluationResult": { + "methods": [ + "get_evaluation_result" + ] + }, + "GetEvaluationDataset": { + "methods": [ + "get_evaluation_dataset" + ] + }, + "GetEvaluationRun": { + "methods": [ + "get_evaluation_run" + ] + }, + "ListEvaluations": { + "methods": [ + "list_evaluations" + ] + }, + "ListEvaluationResults": { + "methods": [ + "list_evaluation_results" + ] + }, + "ListEvaluationDatasets": { + "methods": [ + "list_evaluation_datasets" + ] + }, + "ListEvaluationRuns": { + "methods": [ + "list_evaluation_runs" + ] + }, + "ListEvaluationExpectations": { + "methods": [ + "list_evaluation_expectations" + ] + }, + "GetEvaluationExpectation": { + "methods": [ + "get_evaluation_expectation" + ] + }, + "CreateEvaluationExpectation": { + "methods": [ + "create_evaluation_expectation" + ] + }, + "UpdateEvaluationExpectation": { + "methods": [ + "update_evaluation_expectation" + ] + }, + "DeleteEvaluationExpectation": { + "methods": [ + "delete_evaluation_expectation" + ] + }, + "CreateScheduledEvaluationRun": { + "methods": [ + "create_scheduled_evaluation_run" + ] + }, + "GetScheduledEvaluationRun": { + "methods": [ + "get_scheduled_evaluation_run" + ] + }, + "ListScheduledEvaluationRuns": { + "methods": [ + "list_scheduled_evaluation_runs" + ] + }, + "UpdateScheduledEvaluationRun": { + "methods": [ + "update_scheduled_evaluation_run" + ] + }, + "DeleteScheduledEvaluationRun": { + "methods": [ + "delete_scheduled_evaluation_run" + ] + }, + "TestPersonaVoice": { + "methods": [ + "test_persona_voice" + ] + }, + "ExportEvaluations": { + "methods": [ + "export_evaluations" + ] + }, + "ExportEvaluationRuns": { + "methods": [ + "export_evaluation_runs" + ] + }, + "ExportEvaluationResults": { + "methods": [ + "export_evaluation_results" + ] + }, + "RunEvaluationResultMetrics": { + "methods": [ + "run_evaluation_result_metrics" + ] + } + } + } + } + }, + "ToolService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Ces::V1beta::ToolService::Client", + "rpcs": { + "ExecuteTool": { + "methods": [ + "execute_tool" + ] + }, + "RetrieveToolSchema": { + "methods": [ + "retrieve_tool_schema" + ] + }, + "RetrieveTools": { + "methods": [ + "retrieve_tools" + ] + } + } + } + } + }, + "WidgetService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Ces::V1beta::WidgetService::Client", + "rpcs": { + "GenerateChatToken": { + "methods": [ + "generate_chat_token" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-ces-v1beta/google-cloud-ces-v1beta.gemspec b/owl-bot-staging/google-cloud-ces-v1beta/google-cloud-ces-v1beta.gemspec new file mode 100644 index 000000000000..88dd87d58571 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/google-cloud-ces-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/ces/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-ces-v1beta" + gem.version = Google::Cloud::Ces::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-ces-v1beta is the official client library for the Gemini Enterprise for Customer Experience V1BETA API. Note that google-cloud-ces-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-ces instead. See the readme for more details." + gem.summary = "API Client library for the Gemini Enterprise for Customer Experience 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.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google-cloud-ces-v1beta.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google-cloud-ces-v1beta.rb new file mode 100644 index 000000000000..5232653624a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google-cloud-ces-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/ces/v1beta" diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta.rb new file mode 100644 index 000000000000..fe91e91cbfaa --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/ces/v1beta/session_service" +require "google/cloud/ces/v1beta/agent_service" +require "google/cloud/ces/v1beta/evaluation_service" +require "google/cloud/ces/v1beta/tool_service" +require "google/cloud/ces/v1beta/widget_service" +require "google/cloud/ces/v1beta/version" + +module Google + module Cloud + module Ces + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/ces/v1beta" + # client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/ces/v1beta" + # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new + # + module V1beta + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/ces/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_card_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_card_pb.rb new file mode 100644 index 000000000000..18d3af1a348d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_card_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/agent_card.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n(google/cloud/ces/v1beta/agent_card.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"\xd4\x01\n\tAgentCard\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x14supported_interfaces\x18\x03 \x03(\x0b\x32\'.google.cloud.ces.v1beta.AgentInterfaceB\x03\xe0\x41\x02\x12\x14\n\x07version\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x06skills\x18\x06 \x03(\x0b\x32#.google.cloud.ces.v1beta.AgentSkillB\x03\xe0\x41\x02\"p\n\x0e\x41gentInterface\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10protocol_binding\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06tenant\x18\x03 \x01(\t\x12\x1d\n\x10protocol_version\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\x9a\x01\n\nAgentSkill\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12\x10\n\x08\x65xamples\x18\x05 \x03(\t\x12\x13\n\x0binput_modes\x18\x06 \x03(\t\x12\x14\n\x0coutput_modes\x18\x07 \x03(\t\"{\n\x0fRemoteAgentTool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\nagent_card\x18\x03 \x01(\x0b\x32\".google.cloud.ces.v1beta.AgentCardB\x03\xe0\x41\x02\x42^\n\x1b\x63om.google.cloud.ces.v1betaB\x0e\x41gentCardProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + AgentCard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AgentCard").msgclass + AgentInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AgentInterface").msgclass + AgentSkill = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AgentSkill").msgclass + RemoteAgentTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RemoteAgentTool").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb new file mode 100644 index 000000000000..1577f20427a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/agent.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/ces/v1beta/agent_transfers_pb' +require 'google/cloud/ces/v1beta/common_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n#google/cloud/ces/v1beta/agent.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/ces/v1beta/agent_transfers.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\x10\n\x05\x41gent\x12\x41\n\tllm_agent\x18\x1a \x01(\x0b\x32\'.google.cloud.ces.v1beta.Agent.LlmAgentB\x03\xe0\x41\x01H\x00\x12\\\n\x17remote_dialogflow_agent\x18\x1b \x01(\x0b\x32\x34.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgentB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0emodel_settings\x18\x04 \x01(\x0b\x32&.google.cloud.ces.v1beta.ModelSettingsB\x03\xe0\x41\x01\x12\x18\n\x0binstruction\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12.\n\x05tools\x18\x07 \x03(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x36\n\x0c\x63hild_agents\x18\x08 \x03(\tB \xe0\x41\x01\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x46\n\x16\x62\x65\x66ore_agent_callbacks\x18\x12 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x61\x66ter_agent_callbacks\x18\x13 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x46\n\x16\x62\x65\x66ore_model_callbacks\x18\x14 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x61\x66ter_model_callbacks\x18\x15 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x62\x65\x66ore_tool_callbacks\x18\x16 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x44\n\x14\x61\x66ter_tool_callbacks\x18\x17 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\nguardrails\x18\x11 \x03(\tB$\xe0\x41\x01\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12\x0c\n\x04\x65tag\x18\x18 \x01(\t\x12\x42\n\x08toolsets\x18\x1c \x03(\x0b\x32+.google.cloud.ces.v1beta.Agent.AgentToolsetB\x03\xe0\x41\x01\x12\x1e\n\x11generated_summary\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x0etransfer_rules\x18\x1e \x03(\x0b\x32%.google.cloud.ces.v1beta.TransferRuleB\x03\xe0\x41\x01\x12\x1e\n\x11validation_errors\x18 \x03(\tB\x03\xe0\x41\x03\x1a\n\n\x08LlmAgent\x1a\xcd\x04\n\x15RemoteDialogflowAgent\x12@\n\x05\x61gent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)dialogflow.googleapis.com/DialogflowAgent\x12\x14\n\x07\x66low_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65nvironment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12s\n\x16input_variable_mapping\x18\x04 \x03(\x0b\x32N.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgent.InputVariableMappingEntryB\x03\xe0\x41\x01\x12u\n\x17output_variable_mapping\x18\x05 \x03(\x0b\x32O.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgent.OutputVariableMappingEntryB\x03\xe0\x41\x01\x12\x33\n&respect_response_interruption_settings\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16language_code_variable\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19InputVariableMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a<\n\x1aOutputVariableMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aZ\n\x0c\x41gentToolset\x12\x33\n\x07toolset\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x15\n\x08tool_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01:o\xea\x41l\n\x18\x63\x65s.googleapis.com/Agent\x12\x41projects/{project}/locations/{location}/apps/{app}/agents/{agent}*\x06\x61gents2\x05\x61gentB\x0c\n\nagent_typeB\xc0\x01\n\x1b\x63om.google.cloud.ces.v1betaB\nAgentProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41\x63\n)dialogflow.googleapis.com/DialogflowAgent\x12\x36projects/{project}/locations/{location}/agents/{agent}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + Agent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Agent").msgclass + Agent::LlmAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Agent.LlmAgent").msgclass + Agent::RemoteDialogflowAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Agent.RemoteDialogflowAgent").msgclass + Agent::AgentToolset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Agent.AgentToolset").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service.rb new file mode 100644 index 000000000000..ca09970d26c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/version" + +require "google/cloud/ces/v1beta/agent_service/credentials" +require "google/cloud/ces/v1beta/agent_service/paths" +require "google/cloud/ces/v1beta/agent_service/operations" +require "google/cloud/ces/v1beta/agent_service/client" +require "google/cloud/ces/v1beta/agent_service/rest" + +module Google + module Cloud + module Ces + module V1beta + ## + # The service that manages agent-related resources in Gemini Enterprise for + # Customer Engagement (CES). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/ces/v1beta/agent_service" + # client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/ces/v1beta/agent_service/rest" + # client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + module AgentService + end + end + end + end +end + +helper_path = ::File.join __dir__, "agent_service", "helpers.rb" +require "google/cloud/ces/v1beta/agent_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb new file mode 100644 index 000000000000..3e47dd6aa565 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb @@ -0,0 +1,5639 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/agent_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module Ces + module V1beta + module AgentService + ## + # Client for the AgentService service. + # + # The service that manages agent-related resources in Gemini Enterprise for + # Customer Engagement (CES). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :agent_service_stub + + ## + # Configure the AgentService Client class. + # + # See {::Google::Cloud::Ces::V1beta::AgentService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AgentService clients + # ::Google::Cloud::Ces::V1beta::AgentService::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", "Ces", "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 = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AgentService 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::Ces::V1beta::AgentService::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 + @agent_service_stub.universe_domain + end + + ## + # Create a new AgentService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AgentService 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/ces/v1beta/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 + + @agent_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Ces::V1beta::AgentService::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 + ) + + @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 = @agent_service_stub.endpoint + config.universe_domain = @agent_service_stub.universe_domain + config.logger = @agent_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Ces::V1beta::AgentService::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 + @agent_service_stub.logger + end + + # Service calls + + ## + # Lists apps in the given project and location. + # + # @overload list_apps(request, options = nil) + # Pass arguments to `list_apps` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListAppsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListAppsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_apps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_apps` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location to list apps from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListAppsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_apps AgentService.ListApps} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the apps. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::App>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::App>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListAppsRequest.new + # + # # Call the list_apps method. + # result = client.list_apps 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::Ces::V1beta::App. + # p item + # end + # + def list_apps request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAppsRequest + + # Converts hash and nil to 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_apps.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_apps.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_apps.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :list_apps, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_apps, 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 the specified app. + # + # @overload get_app(request, options = nil) + # Pass arguments to `get_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app(name: nil) + # Pass arguments to `get_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::App] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::App] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetAppRequest.new + # + # # Call the get_app method. + # result = client.get_app request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::App. + # p result + # + def get_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAppRequest + + # Converts hash and nil to 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_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :get_app, 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 app in the given project and location. + # + # @overload create_app(request, options = nil) + # Pass arguments to `create_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app(parent: nil, app_id: nil, app: nil) + # Pass arguments to `create_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location to create an app in. + # @param app_id [::String] + # Optional. The ID to use for the app, which will become the final component + # of the app's resource name. If not provided, a unique ID will be + # automatically assigned for the app. + # @param app [::Google::Cloud::Ces::V1beta::App, ::Hash] + # Required. The app to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateAppRequest.new + # + # # Call the create_app method. + # result = client.create_app 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_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAppRequest + + # Converts hash and nil to 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_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :create_app, 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 specified app. + # + # @overload update_app(request, options = nil) + # Pass arguments to `update_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app(app: nil, update_mask: nil) + # Pass arguments to `update_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param app [::Google::Cloud::Ces::V1beta::App, ::Hash] + # Required. The app to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::App] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::App] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateAppRequest.new + # + # # Call the update_app method. + # result = client.update_app request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::App. + # p result + # + def update_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateAppRequest + + # Converts hash and nil to 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_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.app&.name + header_params["app.name"] = request.app.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_app.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :update_app, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified app. + # + # @overload delete_app(request, options = nil) + # Pass arguments to `delete_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app(name: nil, etag: nil) + # Pass arguments to `delete_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app to delete. + # @param etag [::String] + # Optional. The current etag of the app. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the app, deletion will be blocked and an + # ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteAppRequest.new + # + # # Call the delete_app method. + # result = client.delete_app 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_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAppRequest + + # Converts hash and nil to 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_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :delete_app, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports the specified app. + # + # @overload export_app(request, options = nil) + # Pass arguments to `export_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_app(name: nil, export_format: nil, gcs_uri: nil, app_version: nil) + # Pass arguments to `export_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app to export. + # @param export_format [::Google::Cloud::Ces::V1beta::ExportAppRequest::ExportFormat] + # Required. The format to export the app in. + # @param gcs_uri [::String] + # Optional. The [Google Cloud + # Storage](https://cloud.google.com/storage/docs/) URI to which to export the + # app. The format of this URI must be `gs:///`. The + # exported app archive will be written directly to the specified GCS object. + # @param app_version [::String] + # Optional. The resource name of the app version to export. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportAppRequest.new + # + # # Call the export_app method. + # result = client.export_app request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportAppRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_app.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :export_app, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports the specified app. + # + # @overload import_app(request, options = nil) + # Pass arguments to `import_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ImportAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ImportAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_app(gcs_uri: nil, app_content: nil, parent: nil, display_name: nil, app_id: nil, import_options: nil, ignore_app_lock: nil) + # Pass arguments to `import_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_uri [::String] + # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + # from which to import app. The format of this URI must be + # `gs:///`. + # + # Note: The following parameters are mutually exclusive: `gcs_uri`, `app_content`. 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 app_content [::String] + # Raw bytes representing the compressed zip file with the app folder + # structure. + # + # Note: The following parameters are mutually exclusive: `app_content`, `gcs_uri`. 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 parent [::String] + # Required. The parent resource name with the location of the app to import. + # @param display_name [::String] + # Optional. The display name of the app to import. + # * If the app is created on import, and the display name is specified, + # the imported app will use this display name. If a conflict is detected + # with an existing app, a timestamp will be appended to the display name + # to make it unique. + # * If the app is a reimport, this field should not be set. Providing a + # display name during reimport will result in an INVALID_ARGUMENT error. + # @param app_id [::String] + # Optional. The ID to use for the imported app. + # * If not specified, a unique ID will be automatically assigned for + # the app. + # * Otherwise, the imported app will use this ID as the final component of + # its resource name. If an app with the same ID already exists at the + # specified location in the project, the content of the existing app will be + # replaced. + # @param import_options [::Google::Cloud::Ces::V1beta::ImportAppRequest::ImportOptions, ::Hash] + # Optional. Options governing the import process for the app. + # @param ignore_app_lock [::Boolean] + # Optional. Flag for overriding the app lock during import. + # If set to true, the import process will ignore the app lock. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ImportAppRequest.new + # + # # Call the import_app method. + # result = client.import_app request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ImportAppRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.import_app.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :import_app, 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 + + ## + # Retrieves the security settings for the project and location. + # + # @overload get_security_settings(request, options = nil) + # Pass arguments to `get_security_settings` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_security_settings(name: nil) + # Pass arguments to `get_security_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the security settings to retrieve. + # Format: `projects/{project}/locations/{location}/securitySettings` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::SecuritySettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new + # + # # Call the get_security_settings method. + # result = client.get_security_settings request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. + # p result + # + def get_security_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest + + # Converts hash and nil to 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_security_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_security_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_security_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :get_security_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the security settings for the project and location. + # + # @overload update_security_settings(request, options = nil) + # Pass arguments to `update_security_settings` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_security_settings(security_settings: nil, update_mask: nil) + # Pass arguments to `update_security_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_settings [::Google::Cloud::Ces::V1beta::SecuritySettings, ::Hash] + # Required. The security settings to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::SecuritySettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new + # + # # Call the update_security_settings method. + # result = client.update_security_settings request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. + # p result + # + def update_security_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest + + # Converts hash and nil to 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_security_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.security_settings&.name + header_params["security_settings.name"] = request.security_settings.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_security_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_security_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :update_security_settings, 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 agents in the given app. + # + # @overload list_agents(request, options = nil) + # Pass arguments to `list_agents` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListAgentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListAgentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_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. The resource name of the app to list agents from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListAgentsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_agents AgentService.ListAgents} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the agents. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Agent>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Agent>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListAgentsRequest.new + # + # # Call the list_agents method. + # result = client.list_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::Ces::V1beta::Agent. + # p item + # end + # + def list_agents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAgentsRequest + + # Converts hash and nil to 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_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::Ces::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_agents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_agents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :list_agents, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_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 the specified agent. + # + # @overload get_agent(request, options = nil) + # Pass arguments to `get_agent` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(name: nil) + # Pass arguments to `get_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. The resource name of the agent to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Agent] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Agent] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetAgentRequest.new + # + # # Call the get_agent method. + # result = client.get_agent request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. + # p result + # + def get_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAgentRequest + + # Converts hash and nil to 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_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::Ces::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_agent.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :get_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 agent in the given app. + # + # @overload create_agent(request, options = nil) + # Pass arguments to `create_agent` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(parent: nil, agent_id: nil, agent: nil) + # Pass arguments to `create_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. The resource name of the app to create an agent in. + # @param agent_id [::String] + # Optional. The ID to use for the agent, which will become the final + # component of the agent's resource name. If not provided, a unique ID will + # be automatically assigned for the agent. + # @param agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] + # Required. The agent to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Agent] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Agent] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateAgentRequest.new + # + # # Call the create_agent method. + # result = client.create_agent request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. + # p result + # + def create_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAgentRequest + + # Converts hash and nil to 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_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::Ces::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_agent.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :create_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 + + ## + # Updates the specified agent. + # + # @overload update_agent(request, options = nil) + # Pass arguments to `update_agent` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(agent: nil, update_mask: nil) + # Pass arguments to `update_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 agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] + # Required. The agent to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Agent] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Agent] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateAgentRequest.new + # + # # Call the update_agent method. + # result = client.update_agent request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. + # p result + # + def update_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateAgentRequest + + # Converts hash and nil to 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_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::Ces::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.agent&.name + header_params["agent.name"] = request.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_agent.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :update_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 + + ## + # Deletes the specified agent. + # + # @overload delete_agent(request, options = nil) + # Pass arguments to `delete_agent` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(name: nil, force: nil, etag: nil) + # Pass arguments to `delete_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. The resource name of the agent to delete. + # @param force [::Boolean] + # Optional. Indicates whether to forcefully delete the agent, even if it is + # still referenced by other app/agents/examples. + # + # * If `force = false`, the deletion fails if other agents/examples + # reference it. + # * If `force = true`, delete the agent and remove it from all referencing + # apps/agents/examples. + # @param etag [::String] + # Optional. The current etag of the agent. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the agent, deletion will be blocked and + # an ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteAgentRequest.new + # + # # Call the delete_agent method. + # result = client.delete_agent request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAgentRequest + + # Converts hash and nil to 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_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::Ces::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_agent.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :delete_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 + + ## + # Lists examples in the given app. + # + # @overload list_examples(request, options = nil) + # Pass arguments to `list_examples` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListExamplesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListExamplesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_examples(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_examples` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list examples from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListExamplesResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_examples AgentService.ListExamples} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the examples. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Example>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Example>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListExamplesRequest.new + # + # # Call the list_examples method. + # result = client.list_examples 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::Ces::V1beta::Example. + # p item + # end + # + def list_examples request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListExamplesRequest + + # Converts hash and nil to 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_examples.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_examples.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_examples.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :list_examples, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_examples, 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 the specified example. + # + # @overload get_example(request, options = nil) + # Pass arguments to `get_example` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetExampleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetExampleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_example(name: nil) + # Pass arguments to `get_example` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the example to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Example] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Example] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetExampleRequest.new + # + # # Call the get_example method. + # result = client.get_example request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Example. + # p result + # + def get_example request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetExampleRequest + + # Converts hash and nil to 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_example.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_example.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_example.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :get_example, 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 example in the given app. + # + # @overload create_example(request, options = nil) + # Pass arguments to `create_example` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateExampleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateExampleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_example(parent: nil, example_id: nil, example: nil) + # Pass arguments to `create_example` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to create an example in. + # @param example_id [::String] + # Optional. The ID to use for the example, which will become the final + # component of the example's resource name. If not provided, a unique ID will + # be automatically assigned for the example. + # @param example [::Google::Cloud::Ces::V1beta::Example, ::Hash] + # Required. The example to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Example] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Example] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateExampleRequest.new + # + # # Call the create_example method. + # result = client.create_example request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Example. + # p result + # + def create_example request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateExampleRequest + + # Converts hash and nil to 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_example.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_example.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_example.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :create_example, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified example. + # + # @overload update_example(request, options = nil) + # Pass arguments to `update_example` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateExampleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateExampleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_example(example: nil, update_mask: nil) + # Pass arguments to `update_example` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param example [::Google::Cloud::Ces::V1beta::Example, ::Hash] + # Required. The example to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Example] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Example] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateExampleRequest.new + # + # # Call the update_example method. + # result = client.update_example request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Example. + # p result + # + def update_example request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateExampleRequest + + # Converts hash and nil to 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_example.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.example&.name + header_params["example.name"] = request.example.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_example.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_example.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :update_example, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified example. + # + # @overload delete_example(request, options = nil) + # Pass arguments to `delete_example` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteExampleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteExampleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_example(name: nil, etag: nil) + # Pass arguments to `delete_example` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the example to delete. + # @param etag [::String] + # Optional. The current etag of the example. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the example, deletion will be blocked + # and an ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteExampleRequest.new + # + # # Call the delete_example method. + # result = client.delete_example request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_example request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteExampleRequest + + # Converts hash and nil to 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_example.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_example.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_example.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :delete_example, 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 tools in the given app. + # + # @overload list_tools(request, options = nil) + # Pass arguments to `list_tools` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListToolsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListToolsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_tools` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list tools from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListToolsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_tools AgentService.ListTools} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the tools. Use + # "include_system_tools=true" to include system tools in the response. See + # https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Tool>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Tool>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListToolsRequest.new + # + # # Call the list_tools method. + # result = client.list_tools 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::Ces::V1beta::Tool. + # p item + # end + # + def list_tools request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListToolsRequest + + # Converts hash and nil to 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_tools.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_tools.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tools.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :list_tools, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_tools, 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 the specified tool. + # + # @overload get_tool(request, options = nil) + # Pass arguments to `get_tool` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetToolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetToolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tool(name: nil) + # Pass arguments to `get_tool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the tool to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Tool] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Tool] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetToolRequest.new + # + # # Call the get_tool method. + # result = client.get_tool request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. + # p result + # + def get_tool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetToolRequest + + # Converts hash and nil to 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_tool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_tool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_tool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :get_tool, 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 conversations in the given app. + # + # @overload list_conversations(request, options = nil) + # Pass arguments to `list_conversations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::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, source: nil, sources: 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. The resource name of the app to list conversations from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListConversationsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations AgentService.ListConversations} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the conversations. + # See https://google.aip.dev/160 for more details. + # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, Source.Live + # will be applied by default. Will be deprecated in favor of `sources` field. + # @param sources [::Array<::Google::Cloud::Ces::V1beta::Conversation::Source>] + # Optional. Indicate the sources of the conversations. If not set, all + # available sources will be applied by default. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Conversation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Conversation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::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::Ces::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::Ces::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::Ces::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 + + @agent_service_stub.call_rpc :list_conversations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @agent_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 + + ## + # Gets details of the specified conversation. + # + # @overload get_conversation(request, options = nil) + # Pass arguments to `get_conversation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::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, source: 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. The resource name of the conversation to retrieve. + # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, all source + # will be searched. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Conversation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Conversation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetConversationRequest.new + # + # # Call the get_conversation method. + # result = client.get_conversation request + # + # # The returned object is of type Google::Cloud::Ces::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::Ces::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::Ces::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 + + @agent_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 + + ## + # Deletes the specified conversation. + # + # @overload delete_conversation(request, options = nil) + # Pass arguments to `delete_conversation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::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, source: 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. The resource name of the conversation to delete. + # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, Source.Live + # will be applied by default. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::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::Ces::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::Ces::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 + + @agent_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 + + ## + # Batch deletes the specified conversations. + # + # @overload batch_delete_conversations(request, options = nil) + # Pass arguments to `batch_delete_conversations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_delete_conversations(parent: nil, conversations: nil) + # Pass arguments to `batch_delete_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. The resource name of the app to delete conversations from. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param conversations [::Array<::String>] + # Required. The resource names of the conversations to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new + # + # # Call the batch_delete_conversations method. + # result = client.batch_delete_conversations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_delete_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_delete_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::Ces::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.batch_delete_conversations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_delete_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :batch_delete_conversations, 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 + + ## + # Creates a new tool in the given app. + # + # @overload create_tool(request, options = nil) + # Pass arguments to `create_tool` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateToolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateToolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tool(parent: nil, tool_id: nil, tool: nil) + # Pass arguments to `create_tool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to create a tool in. + # @param tool_id [::String] + # Optional. The ID to use for the tool, which will become the final component + # of the tool's resource name. If not provided, a unique ID will be + # automatically assigned for the tool. + # @param tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] + # Required. The tool to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Tool] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Tool] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateToolRequest.new + # + # # Call the create_tool method. + # result = client.create_tool request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. + # p result + # + def create_tool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateToolRequest + + # Converts hash and nil to 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_tool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_tool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_tool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :create_tool, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified tool. + # + # @overload update_tool(request, options = nil) + # Pass arguments to `update_tool` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateToolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateToolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tool(tool: nil, update_mask: nil) + # Pass arguments to `update_tool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] + # Required. The tool to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Tool] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Tool] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateToolRequest.new + # + # # Call the update_tool method. + # result = client.update_tool request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. + # p result + # + def update_tool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateToolRequest + + # Converts hash and nil to 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_tool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.tool&.name + header_params["tool.name"] = request.tool.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_tool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_tool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :update_tool, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified tool. + # + # @overload delete_tool(request, options = nil) + # Pass arguments to `delete_tool` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteToolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteToolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tool(name: nil, force: nil, etag: nil) + # Pass arguments to `delete_tool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the tool to delete. + # @param force [::Boolean] + # Optional. Indicates whether to forcefully delete the tool, even if it is + # still referenced by agents/examples. + # + # * If `force = false`, the deletion will fail if any agents still + # reference the tool. + # * If `force = true`, all existing references from agents will be removed + # and the tool will be deleted. + # @param etag [::String] + # Optional. The current etag of the tool. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the tool, deletion will be blocked and + # an ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteToolRequest.new + # + # # Call the delete_tool method. + # result = client.delete_tool request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteToolRequest + + # Converts hash and nil to 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_tool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_tool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_tool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :delete_tool, 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 guardrails in the given app. + # + # @overload list_guardrails(request, options = nil) + # Pass arguments to `list_guardrails` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListGuardrailsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListGuardrailsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_guardrails(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_guardrails` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list guardrails from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListGuardrailsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails AgentService.ListGuardrails} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the guardrails. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Guardrail>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Guardrail>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new + # + # # Call the list_guardrails method. + # result = client.list_guardrails 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::Ces::V1beta::Guardrail. + # p item + # end + # + def list_guardrails request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListGuardrailsRequest + + # Converts hash and nil to 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_guardrails.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_guardrails.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_guardrails.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :list_guardrails, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_guardrails, 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 the specified guardrail. + # + # @overload get_guardrail(request, options = nil) + # Pass arguments to `get_guardrail` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetGuardrailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetGuardrailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_guardrail(name: nil) + # Pass arguments to `get_guardrail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the guardrail to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Guardrail] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetGuardrailRequest.new + # + # # Call the get_guardrail method. + # result = client.get_guardrail request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. + # p result + # + def get_guardrail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetGuardrailRequest + + # Converts hash and nil to 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_guardrail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_guardrail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :get_guardrail, 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 guardrail in the given app. + # + # @overload create_guardrail(request, options = nil) + # Pass arguments to `create_guardrail` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateGuardrailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateGuardrailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_guardrail(parent: nil, guardrail_id: nil, guardrail: nil) + # Pass arguments to `create_guardrail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to create a guardrail in. + # @param guardrail_id [::String] + # Optional. The ID to use for the guardrail, which will become the final + # component of the guardrail's resource name. If not provided, a unique ID + # will be automatically assigned for the guardrail. + # @param guardrail [::Google::Cloud::Ces::V1beta::Guardrail, ::Hash] + # Required. The guardrail to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Guardrail] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new + # + # # Call the create_guardrail method. + # result = client.create_guardrail request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. + # p result + # + def create_guardrail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateGuardrailRequest + + # Converts hash and nil to 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_guardrail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_guardrail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :create_guardrail, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified guardrail. + # + # @overload update_guardrail(request, options = nil) + # Pass arguments to `update_guardrail` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_guardrail(guardrail: nil, update_mask: nil) + # Pass arguments to `update_guardrail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param guardrail [::Google::Cloud::Ces::V1beta::Guardrail, ::Hash] + # Required. The guardrail to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Guardrail] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new + # + # # Call the update_guardrail method. + # result = client.update_guardrail request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. + # p result + # + def update_guardrail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest + + # Converts hash and nil to 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_guardrail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.guardrail&.name + header_params["guardrail.name"] = request.guardrail.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_guardrail.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_guardrail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :update_guardrail, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified guardrail. + # + # @overload delete_guardrail(request, options = nil) + # Pass arguments to `delete_guardrail` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_guardrail(name: nil, force: nil, etag: nil) + # Pass arguments to `delete_guardrail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the guardrail to delete. + # @param force [::Boolean] + # Optional. Indicates whether to forcefully delete the guardrail, even if it + # is still referenced by app/agents. + # + # * If `force = false`, the deletion fails if any apps/agents still + # reference the guardrail. + # * If `force = true`, all existing references from apps/agents will be + # removed and the guardrail will be deleted. + # @param etag [::String] + # Optional. The current etag of the guardrail. If an etag is not provided, + # the deletion will overwrite any concurrent changes. If an etag is provided + # and does not match the current etag of the guardrail, deletion will be + # blocked and an ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new + # + # # Call the delete_guardrail method. + # result = client.delete_guardrail request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_guardrail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest + + # Converts hash and nil to 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_guardrail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_guardrail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :delete_guardrail, 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 deployments in the given app. + # + # @overload list_deployments(request, options = nil) + # Pass arguments to `list_deployments` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployments(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent app. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param page_size [::Integer] + # Optional. The maximum number of deployments to return. The service may + # return fewer than this value. If unspecified, at most 50 deployments will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeployments` must + # match the call that provided the page token. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Deployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Deployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new + # + # # Call the list_deployments method. + # result = client.list_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Ces::V1beta::Deployment. + # p item + # end + # + def list_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListDeploymentsRequest + + # Converts hash and nil to 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_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_deployments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :list_deployments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_deployments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified deployment. + # + # @overload get_deployment(request, options = nil) + # Pass arguments to `get_deployment` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployment(name: nil) + # Pass arguments to `get_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Deployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetDeploymentRequest.new + # + # # Call the get_deployment method. + # result = client.get_deployment request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. + # p result + # + def get_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetDeploymentRequest + + # Converts hash and nil to 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :get_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new deployment in the given app. + # + # @overload create_deployment(request, options = nil) + # Pass arguments to `create_deployment` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployment(parent: nil, deployment_id: nil, deployment: nil) + # Pass arguments to `create_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent app. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param deployment_id [::String] + # Optional. The ID to use for the deployment, which will become the final + # component of the deployment's resource name. If not provided, a unique ID + # will be automatically assigned for the deployment. + # @param deployment [::Google::Cloud::Ces::V1beta::Deployment, ::Hash] + # Required. The deployment to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Deployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new + # + # # Call the create_deployment method. + # result = client.create_deployment request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. + # p result + # + def create_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateDeploymentRequest + + # Converts hash and nil to 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :create_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified deployment. + # + # @overload update_deployment(request, options = nil) + # Pass arguments to `update_deployment` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployment(deployment: nil, update_mask: nil) + # Pass arguments to `update_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param deployment [::Google::Cloud::Ces::V1beta::Deployment, ::Hash] + # Required. The deployment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Deployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new + # + # # Call the update_deployment method. + # result = client.update_deployment request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. + # p result + # + def update_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest + + # Converts hash and nil to 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.deployment&.name + header_params["deployment.name"] = request.deployment.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :update_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified deployment. + # + # @overload delete_deployment(request, options = nil) + # Pass arguments to `delete_deployment` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployment(name: nil, etag: nil) + # Pass arguments to `delete_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment to delete. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + # @param etag [::String] + # Optional. The etag of the deployment. + # If an etag is provided and does not match the current etag of the + # deployment, deletion will be blocked and an ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new + # + # # Call the delete_deployment method. + # result = client.delete_deployment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest + + # Converts hash and nil to 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :delete_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists toolsets in the given app. + # + # @overload list_toolsets(request, options = nil) + # Pass arguments to `list_toolsets` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListToolsetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListToolsetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_toolsets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_toolsets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list toolsets from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListToolsetsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets AgentService.ListToolsets} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the toolsets. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Toolset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Toolset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListToolsetsRequest.new + # + # # Call the list_toolsets method. + # result = client.list_toolsets 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::Ces::V1beta::Toolset. + # p item + # end + # + def list_toolsets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListToolsetsRequest + + # Converts hash and nil to 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_toolsets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_toolsets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_toolsets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :list_toolsets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_toolsets, 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 the specified toolset. + # + # @overload get_toolset(request, options = nil) + # Pass arguments to `get_toolset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetToolsetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetToolsetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_toolset(name: nil) + # Pass arguments to `get_toolset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the toolset to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Toolset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetToolsetRequest.new + # + # # Call the get_toolset method. + # result = client.get_toolset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. + # p result + # + def get_toolset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetToolsetRequest + + # Converts hash and nil to 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_toolset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_toolset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :get_toolset, 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 toolset in the given app. + # + # @overload create_toolset(request, options = nil) + # Pass arguments to `create_toolset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateToolsetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateToolsetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_toolset(parent: nil, toolset_id: nil, toolset: nil) + # Pass arguments to `create_toolset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to create a toolset in. + # @param toolset_id [::String] + # Optional. The ID to use for the toolset, which will become the final + # component of the toolset's resource name. If not provided, a unique ID will + # be automatically assigned for the toolset. + # @param toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] + # Required. The toolset to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Toolset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateToolsetRequest.new + # + # # Call the create_toolset method. + # result = client.create_toolset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. + # p result + # + def create_toolset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateToolsetRequest + + # Converts hash and nil to 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_toolset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_toolset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :create_toolset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified toolset. + # + # @overload update_toolset(request, options = nil) + # Pass arguments to `update_toolset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateToolsetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateToolsetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_toolset(toolset: nil, update_mask: nil) + # Pass arguments to `update_toolset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] + # Required. The toolset to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Toolset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new + # + # # Call the update_toolset method. + # result = client.update_toolset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. + # p result + # + def update_toolset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateToolsetRequest + + # Converts hash and nil to 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_toolset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.toolset&.name + header_params["toolset.name"] = request.toolset.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_toolset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_toolset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :update_toolset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified toolset. + # + # @overload delete_toolset(request, options = nil) + # Pass arguments to `delete_toolset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteToolsetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteToolsetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_toolset(name: nil, force: nil, etag: nil) + # Pass arguments to `delete_toolset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the toolset to delete. + # @param force [::Boolean] + # Optional. Indicates whether to forcefully delete the toolset, even if it is + # still referenced by app/agents. + # + # * If `force = false`, the deletion fails if any agents still + # reference the toolset. + # * If `force = true`, all existing references from agents will be + # removed and the toolset will be deleted. + # @param etag [::String] + # Optional. The current etag of the toolset. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the toolset, deletion will be blocked + # and an ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new + # + # # Call the delete_toolset method. + # result = client.delete_toolset request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_toolset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteToolsetRequest + + # Converts hash and nil to 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_toolset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_toolset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :delete_toolset, 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 app versions in the given app. + # + # @overload list_app_versions(request, options = nil) + # Pass arguments to `list_app_versions` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListAppVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListAppVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_app_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list app versions from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListAppVersionsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions AgentService.ListAppVersions} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the app versions. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::AppVersion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::AppVersion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new + # + # # Call the list_app_versions method. + # result = client.list_app_versions 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::Ces::V1beta::AppVersion. + # p item + # end + # + def list_app_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAppVersionsRequest + + # Converts hash and nil to 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_app_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_app_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :list_app_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_app_versions, 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 the specified app version. + # + # @overload get_app_version(request, options = nil) + # Pass arguments to `get_app_version` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetAppVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetAppVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app_version(name: nil) + # Pass arguments to `get_app_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app version to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::AppVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::AppVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetAppVersionRequest.new + # + # # Call the get_app_version method. + # result = client.get_app_version request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. + # p result + # + def get_app_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAppVersionRequest + + # Converts hash and nil to 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_app_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_app_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :get_app_version, 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 app version in the given app. + # + # @overload create_app_version(request, options = nil) + # Pass arguments to `create_app_version` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateAppVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateAppVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app_version(parent: nil, app_version_id: nil, app_version: nil) + # Pass arguments to `create_app_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to create an app version in. + # @param app_version_id [::String] + # Optional. The ID to use for the app version, which will become the final + # component of the app version's resource name. If not provided, a unique ID + # will be automatically assigned for the app version. + # @param app_version [::Google::Cloud::Ces::V1beta::AppVersion, ::Hash] + # Required. The app version to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::AppVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::AppVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new + # + # # Call the create_app_version method. + # result = client.create_app_version request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. + # p result + # + def create_app_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAppVersionRequest + + # Converts hash and nil to 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_app_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_app_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :create_app_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified app version. + # + # @overload delete_app_version(request, options = nil) + # Pass arguments to `delete_app_version` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app_version(name: nil, etag: nil) + # Pass arguments to `delete_app_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app version to delete. + # @param etag [::String] + # Optional. The current etag of the app version. If an etag is not provided, + # the deletion will overwrite any concurrent changes. If an etag is provided + # and does not match the current etag of the app version, deletion will be + # blocked and an ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new + # + # # Call the delete_app_version method. + # result = client.delete_app_version request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_app_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest + + # Converts hash and nil to 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_app_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_app_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :delete_app_version, 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 + + ## + # Restores the specified app version. + # This will create a new app version from the current draft app and overwrite + # the current draft with the specified app version. + # + # @overload restore_app_version(request, options = nil) + # Pass arguments to `restore_app_version` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restore_app_version(name: nil) + # Pass arguments to `restore_app_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app version to restore. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.new + # + # # Call the restore_app_version method. + # result = client.restore_app_version 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 restore_app_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restore_app_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.restore_app_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restore_app_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :restore_app_version, 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 + + ## + # Generates specific resources (e.g. agent) in the app using LLM assistant. + # + # @overload generate_app_resource(request, options = nil) + # Pass arguments to `generate_app_resource` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_app_resource(agent: nil, tool: nil, toolset: nil, app_version_context: nil, parent: nil, refine_instructions: nil, tool_generation_config: nil, app_generation_config: nil, evaluation_generation_config: nil, evaluation_personas_generation_config: nil, quality_report_generation_config: nil, hill_climbing_fix_config: nil) + # Pass arguments to `generate_app_resource` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] + # The agent resource to be used by the LLM assistant, can be empty for + # generating a new agent. + # + # Note: The following parameters are mutually exclusive: `agent`, `tool`, `toolset`, `app_version_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 tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] + # The tool resource to be used by the LLM assistant, can be empty for + # generating a new tool. + # + # Note: The following parameters are mutually exclusive: `tool`, `agent`, `toolset`, `app_version_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 toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] + # The toolset resource to be used by the LLM assistant, can be empty for + # generating a new toolset. + # + # Note: The following parameters are mutually exclusive: `toolset`, `agent`, `tool`, `app_version_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 app_version_context [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppVersionContext, ::Hash] + # The app version context specifying the base snapshot and target agent. + # + # Note: The following parameters are mutually exclusive: `app_version_context`, `agent`, `tool`, `toolset`. 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 parent [::String] + # Required. The resource name of the app to generate the resource for. + # @param refine_instructions [::Array<::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::RefineInstructions, ::Hash>] + # Optional. List of refine instructions to be used to refine the resource. + # @param tool_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig, ::Hash] + # Optional. The configuration to be used to generate the tool. + # @param app_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppGenerationConfig, ::Hash] + # Optional. The configuration to be used to generate the agents and tools. + # @param evaluation_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationGenerationConfig, ::Hash] + # Optional. The configuration to be used to generate the evaluations. + # @param evaluation_personas_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationPersonasGenerationConfig, ::Hash] + # Optional. The configuration to be used to generate the evaluation personas. + # @param quality_report_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::QualityReportGenerationConfig, ::Hash] + # Optional. The configuration to be used for quality report generation. + # @param hill_climbing_fix_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::HillClimbingFixConfig, ::Hash] + # Optional. The configuration to be used for hill climbing fixes. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new + # + # # Call the generate_app_resource method. + # result = client.generate_app_resource 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 generate_app_resource request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_app_resource.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.generate_app_resource.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_app_resource.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :generate_app_resource, 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 + + ## + # Lists the changelogs of the specified app. + # + # @overload list_changelogs(request, options = nil) + # Pass arguments to `list_changelogs` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListChangelogsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListChangelogsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_changelogs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_changelogs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list changelogs from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListChangelogsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs AgentService.ListChangelogs} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the changelogs. + # See https://google.aip.dev/160 for more details. + # + # The filter string can be used to filter by `action`, `resource_type`, + # `resource_name`, `author`, and `create_time`. + # The `:` comparator can be used for case-insensitive partial matching on + # string fields, while `=` performs an exact case-sensitive match. + # + # Examples: + # * `action:update` (case-insensitive partial match) + # * `action="Create"` (case-sensitive exact match) + # * `resource_type:agent` + # * `resource_name:my-agent` + # * `author:me@example.com` + # * `create_time > "2025-01-01T00:00:00Z"` + # * `create_time <= "2025-01-01T00:00:00Z" AND resource_type:tool` + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Changelog>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Changelog>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListChangelogsRequest.new + # + # # Call the list_changelogs method. + # result = client.list_changelogs 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::Ces::V1beta::Changelog. + # p item + # end + # + def list_changelogs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListChangelogsRequest + + # Converts hash and nil to 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_changelogs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_changelogs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_changelogs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :list_changelogs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_changelogs, 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 the specified changelog. + # + # @overload get_changelog(request, options = nil) + # Pass arguments to `get_changelog` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetChangelogRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetChangelogRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_changelog(name: nil) + # Pass arguments to `get_changelog` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the changelog to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Changelog] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Changelog] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetChangelogRequest.new + # + # # Call the get_changelog method. + # result = client.get_changelog request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Changelog. + # p result + # + def get_changelog request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetChangelogRequest + + # Converts hash and nil to 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_changelog.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_changelog.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_changelog.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.call_rpc :get_changelog, 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 AgentService API. + # + # This class represents the configuration for AgentService, + # 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::Ces::V1beta::AgentService::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_apps to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Ces::V1beta::AgentService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_apps.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_apps.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::Ces::V1beta::AgentService::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 = "ces.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 AgentService 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_apps` + # @return [::Gapic::Config::Method] + # + attr_reader :list_apps + ## + # RPC-specific configuration for `get_app` + # @return [::Gapic::Config::Method] + # + attr_reader :get_app + ## + # RPC-specific configuration for `create_app` + # @return [::Gapic::Config::Method] + # + attr_reader :create_app + ## + # RPC-specific configuration for `update_app` + # @return [::Gapic::Config::Method] + # + attr_reader :update_app + ## + # RPC-specific configuration for `delete_app` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_app + ## + # RPC-specific configuration for `export_app` + # @return [::Gapic::Config::Method] + # + attr_reader :export_app + ## + # RPC-specific configuration for `import_app` + # @return [::Gapic::Config::Method] + # + attr_reader :import_app + ## + # RPC-specific configuration for `get_security_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_security_settings + ## + # RPC-specific configuration for `update_security_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_settings + ## + # RPC-specific configuration for `list_agents` + # @return [::Gapic::Config::Method] + # + attr_reader :list_agents + ## + # RPC-specific configuration for `get_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :get_agent + ## + # RPC-specific configuration for `create_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :create_agent + ## + # RPC-specific configuration for `update_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :update_agent + ## + # RPC-specific configuration for `delete_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_agent + ## + # RPC-specific configuration for `list_examples` + # @return [::Gapic::Config::Method] + # + attr_reader :list_examples + ## + # RPC-specific configuration for `get_example` + # @return [::Gapic::Config::Method] + # + attr_reader :get_example + ## + # RPC-specific configuration for `create_example` + # @return [::Gapic::Config::Method] + # + attr_reader :create_example + ## + # RPC-specific configuration for `update_example` + # @return [::Gapic::Config::Method] + # + attr_reader :update_example + ## + # RPC-specific configuration for `delete_example` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_example + ## + # RPC-specific configuration for `list_tools` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tools + ## + # RPC-specific configuration for `get_tool` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tool + ## + # RPC-specific configuration for `list_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversations + ## + # RPC-specific configuration for `get_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversation + ## + # RPC-specific configuration for `delete_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversation + ## + # RPC-specific configuration for `batch_delete_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_delete_conversations + ## + # RPC-specific configuration for `create_tool` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tool + ## + # RPC-specific configuration for `update_tool` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tool + ## + # RPC-specific configuration for `delete_tool` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tool + ## + # RPC-specific configuration for `list_guardrails` + # @return [::Gapic::Config::Method] + # + attr_reader :list_guardrails + ## + # RPC-specific configuration for `get_guardrail` + # @return [::Gapic::Config::Method] + # + attr_reader :get_guardrail + ## + # RPC-specific configuration for `create_guardrail` + # @return [::Gapic::Config::Method] + # + attr_reader :create_guardrail + ## + # RPC-specific configuration for `update_guardrail` + # @return [::Gapic::Config::Method] + # + attr_reader :update_guardrail + ## + # RPC-specific configuration for `delete_guardrail` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_guardrail + ## + # RPC-specific configuration for `list_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deployments + ## + # RPC-specific configuration for `get_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_deployment + ## + # RPC-specific configuration for `create_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_deployment + ## + # RPC-specific configuration for `update_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_deployment + ## + # RPC-specific configuration for `delete_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_deployment + ## + # RPC-specific configuration for `list_toolsets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_toolsets + ## + # RPC-specific configuration for `get_toolset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_toolset + ## + # RPC-specific configuration for `create_toolset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_toolset + ## + # RPC-specific configuration for `update_toolset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_toolset + ## + # RPC-specific configuration for `delete_toolset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_toolset + ## + # RPC-specific configuration for `list_app_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_app_versions + ## + # RPC-specific configuration for `get_app_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_app_version + ## + # RPC-specific configuration for `create_app_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_app_version + ## + # RPC-specific configuration for `delete_app_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_app_version + ## + # RPC-specific configuration for `restore_app_version` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_app_version + ## + # RPC-specific configuration for `generate_app_resource` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_app_resource + ## + # RPC-specific configuration for `list_changelogs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_changelogs + ## + # RPC-specific configuration for `get_changelog` + # @return [::Gapic::Config::Method] + # + attr_reader :get_changelog + + # @private + def initialize parent_rpcs = nil + list_apps_config = parent_rpcs.list_apps if parent_rpcs.respond_to? :list_apps + @list_apps = ::Gapic::Config::Method.new list_apps_config + get_app_config = parent_rpcs.get_app if parent_rpcs.respond_to? :get_app + @get_app = ::Gapic::Config::Method.new get_app_config + create_app_config = parent_rpcs.create_app if parent_rpcs.respond_to? :create_app + @create_app = ::Gapic::Config::Method.new create_app_config + update_app_config = parent_rpcs.update_app if parent_rpcs.respond_to? :update_app + @update_app = ::Gapic::Config::Method.new update_app_config + delete_app_config = parent_rpcs.delete_app if parent_rpcs.respond_to? :delete_app + @delete_app = ::Gapic::Config::Method.new delete_app_config + export_app_config = parent_rpcs.export_app if parent_rpcs.respond_to? :export_app + @export_app = ::Gapic::Config::Method.new export_app_config + import_app_config = parent_rpcs.import_app if parent_rpcs.respond_to? :import_app + @import_app = ::Gapic::Config::Method.new import_app_config + get_security_settings_config = parent_rpcs.get_security_settings if parent_rpcs.respond_to? :get_security_settings + @get_security_settings = ::Gapic::Config::Method.new get_security_settings_config + update_security_settings_config = parent_rpcs.update_security_settings if parent_rpcs.respond_to? :update_security_settings + @update_security_settings = ::Gapic::Config::Method.new update_security_settings_config + list_agents_config = parent_rpcs.list_agents if parent_rpcs.respond_to? :list_agents + @list_agents = ::Gapic::Config::Method.new list_agents_config + get_agent_config = parent_rpcs.get_agent if parent_rpcs.respond_to? :get_agent + @get_agent = ::Gapic::Config::Method.new get_agent_config + create_agent_config = parent_rpcs.create_agent if parent_rpcs.respond_to? :create_agent + @create_agent = ::Gapic::Config::Method.new create_agent_config + update_agent_config = parent_rpcs.update_agent if parent_rpcs.respond_to? :update_agent + @update_agent = ::Gapic::Config::Method.new update_agent_config + delete_agent_config = parent_rpcs.delete_agent if parent_rpcs.respond_to? :delete_agent + @delete_agent = ::Gapic::Config::Method.new delete_agent_config + list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples + @list_examples = ::Gapic::Config::Method.new list_examples_config + get_example_config = parent_rpcs.get_example if parent_rpcs.respond_to? :get_example + @get_example = ::Gapic::Config::Method.new get_example_config + create_example_config = parent_rpcs.create_example if parent_rpcs.respond_to? :create_example + @create_example = ::Gapic::Config::Method.new create_example_config + update_example_config = parent_rpcs.update_example if parent_rpcs.respond_to? :update_example + @update_example = ::Gapic::Config::Method.new update_example_config + delete_example_config = parent_rpcs.delete_example if parent_rpcs.respond_to? :delete_example + @delete_example = ::Gapic::Config::Method.new delete_example_config + list_tools_config = parent_rpcs.list_tools if parent_rpcs.respond_to? :list_tools + @list_tools = ::Gapic::Config::Method.new list_tools_config + get_tool_config = parent_rpcs.get_tool if parent_rpcs.respond_to? :get_tool + @get_tool = ::Gapic::Config::Method.new get_tool_config + list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations + @list_conversations = ::Gapic::Config::Method.new list_conversations_config + get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation + @get_conversation = ::Gapic::Config::Method.new get_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 + batch_delete_conversations_config = parent_rpcs.batch_delete_conversations if parent_rpcs.respond_to? :batch_delete_conversations + @batch_delete_conversations = ::Gapic::Config::Method.new batch_delete_conversations_config + create_tool_config = parent_rpcs.create_tool if parent_rpcs.respond_to? :create_tool + @create_tool = ::Gapic::Config::Method.new create_tool_config + update_tool_config = parent_rpcs.update_tool if parent_rpcs.respond_to? :update_tool + @update_tool = ::Gapic::Config::Method.new update_tool_config + delete_tool_config = parent_rpcs.delete_tool if parent_rpcs.respond_to? :delete_tool + @delete_tool = ::Gapic::Config::Method.new delete_tool_config + list_guardrails_config = parent_rpcs.list_guardrails if parent_rpcs.respond_to? :list_guardrails + @list_guardrails = ::Gapic::Config::Method.new list_guardrails_config + get_guardrail_config = parent_rpcs.get_guardrail if parent_rpcs.respond_to? :get_guardrail + @get_guardrail = ::Gapic::Config::Method.new get_guardrail_config + create_guardrail_config = parent_rpcs.create_guardrail if parent_rpcs.respond_to? :create_guardrail + @create_guardrail = ::Gapic::Config::Method.new create_guardrail_config + update_guardrail_config = parent_rpcs.update_guardrail if parent_rpcs.respond_to? :update_guardrail + @update_guardrail = ::Gapic::Config::Method.new update_guardrail_config + delete_guardrail_config = parent_rpcs.delete_guardrail if parent_rpcs.respond_to? :delete_guardrail + @delete_guardrail = ::Gapic::Config::Method.new delete_guardrail_config + list_deployments_config = parent_rpcs.list_deployments if parent_rpcs.respond_to? :list_deployments + @list_deployments = ::Gapic::Config::Method.new list_deployments_config + get_deployment_config = parent_rpcs.get_deployment if parent_rpcs.respond_to? :get_deployment + @get_deployment = ::Gapic::Config::Method.new get_deployment_config + create_deployment_config = parent_rpcs.create_deployment if parent_rpcs.respond_to? :create_deployment + @create_deployment = ::Gapic::Config::Method.new create_deployment_config + update_deployment_config = parent_rpcs.update_deployment if parent_rpcs.respond_to? :update_deployment + @update_deployment = ::Gapic::Config::Method.new update_deployment_config + delete_deployment_config = parent_rpcs.delete_deployment if parent_rpcs.respond_to? :delete_deployment + @delete_deployment = ::Gapic::Config::Method.new delete_deployment_config + list_toolsets_config = parent_rpcs.list_toolsets if parent_rpcs.respond_to? :list_toolsets + @list_toolsets = ::Gapic::Config::Method.new list_toolsets_config + get_toolset_config = parent_rpcs.get_toolset if parent_rpcs.respond_to? :get_toolset + @get_toolset = ::Gapic::Config::Method.new get_toolset_config + create_toolset_config = parent_rpcs.create_toolset if parent_rpcs.respond_to? :create_toolset + @create_toolset = ::Gapic::Config::Method.new create_toolset_config + update_toolset_config = parent_rpcs.update_toolset if parent_rpcs.respond_to? :update_toolset + @update_toolset = ::Gapic::Config::Method.new update_toolset_config + delete_toolset_config = parent_rpcs.delete_toolset if parent_rpcs.respond_to? :delete_toolset + @delete_toolset = ::Gapic::Config::Method.new delete_toolset_config + list_app_versions_config = parent_rpcs.list_app_versions if parent_rpcs.respond_to? :list_app_versions + @list_app_versions = ::Gapic::Config::Method.new list_app_versions_config + get_app_version_config = parent_rpcs.get_app_version if parent_rpcs.respond_to? :get_app_version + @get_app_version = ::Gapic::Config::Method.new get_app_version_config + create_app_version_config = parent_rpcs.create_app_version if parent_rpcs.respond_to? :create_app_version + @create_app_version = ::Gapic::Config::Method.new create_app_version_config + delete_app_version_config = parent_rpcs.delete_app_version if parent_rpcs.respond_to? :delete_app_version + @delete_app_version = ::Gapic::Config::Method.new delete_app_version_config + restore_app_version_config = parent_rpcs.restore_app_version if parent_rpcs.respond_to? :restore_app_version + @restore_app_version = ::Gapic::Config::Method.new restore_app_version_config + generate_app_resource_config = parent_rpcs.generate_app_resource if parent_rpcs.respond_to? :generate_app_resource + @generate_app_resource = ::Gapic::Config::Method.new generate_app_resource_config + list_changelogs_config = parent_rpcs.list_changelogs if parent_rpcs.respond_to? :list_changelogs + @list_changelogs = ::Gapic::Config::Method.new list_changelogs_config + get_changelog_config = parent_rpcs.get_changelog if parent_rpcs.respond_to? :get_changelog + @get_changelog = ::Gapic::Config::Method.new get_changelog_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/credentials.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/credentials.rb new file mode 100644 index 000000000000..b44107916ff1 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/credentials.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Ces + module V1beta + module AgentService + # Credentials for the AgentService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/ces", + "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-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/operations.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/operations.rb new file mode 100644 index 000000000000..53b0b1b4ed77 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Ces + module V1beta + module AgentService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AgentService 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 AgentService 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::Ces::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::Ces::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::Ces::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::Ces::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::Ces::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 = "ces.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-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/paths.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/paths.rb new file mode 100644 index 000000000000..78525532278c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/paths.rb @@ -0,0 +1,481 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + module AgentService + # Path helper methods for the AgentService API. + module Paths + ## + # Create a fully-qualified Agent resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param agent [String] + # + # @return [::String] + def agent_path project:, location:, app:, agent: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/agents/#{agent}" + end + + ## + # Create a fully-qualified App resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # + # @return [::String] + def app_path project:, location:, app: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}" + end + + ## + # Create a fully-qualified AppVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param version [String] + # + # @return [::String] + def app_version_path project:, location:, app:, version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/versions/#{version}" + end + + ## + # Create a fully-qualified Changelog resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/changelogs/{changelog}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param changelog [String] + # + # @return [::String] + def changelog_path project:, location:, app:, changelog: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/changelogs/#{changelog}" + end + + ## + # Create a fully-qualified Conversation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param conversation [String] + # + # @return [::String] + def conversation_path project:, location:, app:, conversation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/conversations/#{conversation}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project:, location:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}" + end + + ## + # Create a fully-qualified DeidentifyTemplate resource string. + # + # @overload deidentify_template_path(organization:, location:, deidentify_template:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}` + # + # @param organization [String] + # @param location [String] + # @param deidentify_template [String] + # + # @overload deidentify_template_path(project:, location:, deidentify_template:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}` + # + # @param project [String] + # @param location [String] + # @param deidentify_template [String] + # + # @return [::String] + def deidentify_template_path **args + resources = { + "deidentify_template:location:organization" => (proc do |organization:, location:, deidentify_template:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/deidentifyTemplates/#{deidentify_template}" + end), + "deidentify_template:location:project" => (proc do |project:, location:, deidentify_template:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/deidentifyTemplates/#{deidentify_template}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Deployment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param deployment [String] + # + # @return [::String] + def deployment_path project:, location:, app:, deployment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/deployments/#{deployment}" + end + + ## + # Create a fully-qualified DialogflowAgent resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/agents/{agent}` + # + # @param project [String] + # @param location [String] + # @param agent [String] + # + # @return [::String] + def dialogflow_agent_path project:, location:, 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}/agents/#{agent}" + end + + ## + # Create a fully-qualified Engine resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + # + # @param project [String] + # @param location [String] + # @param collection [String] + # @param engine [String] + # + # @return [::String] + def engine_path project:, location:, collection:, engine: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + + "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}" + end + + ## + # Create a fully-qualified EvaluationRun resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param evaluation_run [String] + # + # @return [::String] + def evaluation_run_path project:, location:, app:, evaluation_run: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/evaluationRuns/#{evaluation_run}" + end + + ## + # Create a fully-qualified Example resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/examples/{example}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param example [String] + # + # @return [::String] + def example_path project:, location:, app:, example: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/examples/#{example}" + end + + ## + # Create a fully-qualified Guardrail resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param guardrail [String] + # + # @return [::String] + def guardrail_path project:, location:, app:, guardrail: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/guardrails/#{guardrail}" + end + + ## + # Create a fully-qualified InspectTemplate resource string. + # + # @overload inspect_template_path(organization:, location:, inspect_template:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}` + # + # @param organization [String] + # @param location [String] + # @param inspect_template [String] + # + # @overload inspect_template_path(project:, location:, inspect_template:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/inspectTemplates/{inspect_template}` + # + # @param project [String] + # @param location [String] + # @param inspect_template [String] + # + # @return [::String] + def inspect_template_path **args + resources = { + "inspect_template:location:organization" => (proc do |organization:, location:, inspect_template:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/inspectTemplates/#{inspect_template}" + end), + "inspect_template:location:project" => (proc do |project:, location:, inspect_template:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/inspectTemplates/#{inspect_template}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + 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 SecretVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}/versions/{secret_version}` + # + # @param project [String] + # @param secret [String] + # @param secret_version [String] + # + # @return [::String] + def secret_version_path project:, secret:, secret_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" + end + + ## + # Create a fully-qualified SecuritySettings resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/securitySettings` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def security_settings_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/securitySettings" + end + + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param namespace [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, namespace:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" + + "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" + end + + ## + # Create a fully-qualified Tool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param tool [String] + # + # @return [::String] + def tool_path project:, location:, app:, tool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/tools/#{tool}" + end + + ## + # Create a fully-qualified Toolset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param toolset [String] + # + # @return [::String] + def toolset_path project:, location:, app:, toolset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/toolsets/#{toolset}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest.rb new file mode 100644 index 000000000000..96a198373f4f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/ces/v1beta/version" +require "google/cloud/ces/v1beta/bindings_override" + +require "google/cloud/ces/v1beta/agent_service/credentials" +require "google/cloud/ces/v1beta/agent_service/paths" +require "google/cloud/ces/v1beta/agent_service/rest/operations" +require "google/cloud/ces/v1beta/agent_service/rest/client" + +module Google + module Cloud + module Ces + module V1beta + ## + # The service that manages agent-related resources in Gemini Enterprise for + # Customer Engagement (CES). + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/ces/v1beta/agent_service/rest" + # client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + module AgentService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/ces/v1beta/agent_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb new file mode 100644 index 000000000000..34a69c01ab45 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb @@ -0,0 +1,5247 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/agent_service_pb" +require "google/cloud/ces/v1beta/agent_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Ces + module V1beta + module AgentService + module Rest + ## + # REST client for the AgentService service. + # + # The service that manages agent-related resources in Gemini Enterprise for + # Customer Engagement (CES). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :agent_service_stub + + ## + # Configure the AgentService Client class. + # + # See {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AgentService clients + # ::Google::Cloud::Ces::V1beta::AgentService::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", "Ces", "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 = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AgentService 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::Ces::V1beta::AgentService::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 + @agent_service_stub.universe_domain + end + + ## + # Create a new AgentService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AgentService 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::Ces::V1beta::AgentService::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 + + @agent_service_stub = ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @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 = @agent_service_stub.endpoint + config.universe_domain = @agent_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @agent_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Ces::V1beta::AgentService::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 + @agent_service_stub.logger + end + + # Service calls + + ## + # Lists apps in the given project and location. + # + # @overload list_apps(request, options = nil) + # Pass arguments to `list_apps` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListAppsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListAppsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_apps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_apps` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location to list apps from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListAppsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_apps AgentService.ListApps} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the apps. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::App>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::App>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListAppsRequest.new + # + # # Call the list_apps method. + # result = client.list_apps 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::Ces::V1beta::App. + # p item + # end + # + def list_apps request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAppsRequest + + # Converts hash and nil to an 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_apps.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_apps.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_apps.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.list_apps request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_apps, "apps", 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 the specified app. + # + # @overload get_app(request, options = nil) + # Pass arguments to `get_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app(name: nil) + # Pass arguments to `get_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::App] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::App] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetAppRequest.new + # + # # Call the get_app method. + # result = client.get_app request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::App. + # p result + # + def get_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAppRequest + + # Converts hash and nil to an 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_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.get_app 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 app in the given project and location. + # + # @overload create_app(request, options = nil) + # Pass arguments to `create_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app(parent: nil, app_id: nil, app: nil) + # Pass arguments to `create_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location to create an app in. + # @param app_id [::String] + # Optional. The ID to use for the app, which will become the final component + # of the app's resource name. If not provided, a unique ID will be + # automatically assigned for the app. + # @param app [::Google::Cloud::Ces::V1beta::App, ::Hash] + # Required. The app to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateAppRequest.new + # + # # Call the create_app method. + # result = client.create_app 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_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAppRequest + + # Converts hash and nil to an 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_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.create_app 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 specified app. + # + # @overload update_app(request, options = nil) + # Pass arguments to `update_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app(app: nil, update_mask: nil) + # Pass arguments to `update_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param app [::Google::Cloud::Ces::V1beta::App, ::Hash] + # Required. The app to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::App] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::App] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateAppRequest.new + # + # # Call the update_app method. + # result = client.update_app request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::App. + # p result + # + def update_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateAppRequest + + # Converts hash and nil to an 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_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.update_app request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified app. + # + # @overload delete_app(request, options = nil) + # Pass arguments to `delete_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app(name: nil, etag: nil) + # Pass arguments to `delete_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app to delete. + # @param etag [::String] + # Optional. The current etag of the app. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the app, deletion will be blocked and an + # ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteAppRequest.new + # + # # Call the delete_app method. + # result = client.delete_app 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_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAppRequest + + # Converts hash and nil to an 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_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.delete_app request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports the specified app. + # + # @overload export_app(request, options = nil) + # Pass arguments to `export_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_app(name: nil, export_format: nil, gcs_uri: nil, app_version: nil) + # Pass arguments to `export_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app to export. + # @param export_format [::Google::Cloud::Ces::V1beta::ExportAppRequest::ExportFormat] + # Required. The format to export the app in. + # @param gcs_uri [::String] + # Optional. The [Google Cloud + # Storage](https://cloud.google.com/storage/docs/) URI to which to export the + # app. The format of this URI must be `gs:///`. The + # exported app archive will be written directly to the specified GCS object. + # @param app_version [::String] + # Optional. The resource name of the app version to export. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportAppRequest.new + # + # # Call the export_app method. + # result = client.export_app request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportAppRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_app.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.export_app request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports the specified app. + # + # @overload import_app(request, options = nil) + # Pass arguments to `import_app` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ImportAppRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ImportAppRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_app(gcs_uri: nil, app_content: nil, parent: nil, display_name: nil, app_id: nil, import_options: nil, ignore_app_lock: nil) + # Pass arguments to `import_app` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_uri [::String] + # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + # from which to import app. The format of this URI must be + # `gs:///`. + # + # Note: The following parameters are mutually exclusive: `gcs_uri`, `app_content`. 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 app_content [::String] + # Raw bytes representing the compressed zip file with the app folder + # structure. + # + # Note: The following parameters are mutually exclusive: `app_content`, `gcs_uri`. 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 parent [::String] + # Required. The parent resource name with the location of the app to import. + # @param display_name [::String] + # Optional. The display name of the app to import. + # * If the app is created on import, and the display name is specified, + # the imported app will use this display name. If a conflict is detected + # with an existing app, a timestamp will be appended to the display name + # to make it unique. + # * If the app is a reimport, this field should not be set. Providing a + # display name during reimport will result in an INVALID_ARGUMENT error. + # @param app_id [::String] + # Optional. The ID to use for the imported app. + # * If not specified, a unique ID will be automatically assigned for + # the app. + # * Otherwise, the imported app will use this ID as the final component of + # its resource name. If an app with the same ID already exists at the + # specified location in the project, the content of the existing app will be + # replaced. + # @param import_options [::Google::Cloud::Ces::V1beta::ImportAppRequest::ImportOptions, ::Hash] + # Optional. Options governing the import process for the app. + # @param ignore_app_lock [::Boolean] + # Optional. Flag for overriding the app lock during import. + # If set to true, the import process will ignore the app lock. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ImportAppRequest.new + # + # # Call the import_app method. + # result = client.import_app request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_app request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ImportAppRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_app.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.import_app.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_app.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.import_app 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 + + ## + # Retrieves the security settings for the project and location. + # + # @overload get_security_settings(request, options = nil) + # Pass arguments to `get_security_settings` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_security_settings(name: nil) + # Pass arguments to `get_security_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the security settings to retrieve. + # Format: `projects/{project}/locations/{location}/securitySettings` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::SecuritySettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new + # + # # Call the get_security_settings method. + # result = client.get_security_settings request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. + # p result + # + def get_security_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest + + # Converts hash and nil to an 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_security_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_security_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_security_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.get_security_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the security settings for the project and location. + # + # @overload update_security_settings(request, options = nil) + # Pass arguments to `update_security_settings` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_security_settings(security_settings: nil, update_mask: nil) + # Pass arguments to `update_security_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_settings [::Google::Cloud::Ces::V1beta::SecuritySettings, ::Hash] + # Required. The security settings to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::SecuritySettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new + # + # # Call the update_security_settings method. + # result = client.update_security_settings request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. + # p result + # + def update_security_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest + + # Converts hash and nil to an 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_security_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_security_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_security_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.update_security_settings 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 agents in the given app. + # + # @overload list_agents(request, options = nil) + # Pass arguments to `list_agents` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListAgentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListAgentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_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. The resource name of the app to list agents from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListAgentsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_agents AgentService.ListAgents} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the agents. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Agent>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Agent>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListAgentsRequest.new + # + # # Call the list_agents method. + # result = client.list_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::Ces::V1beta::Agent. + # p item + # end + # + def list_agents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAgentsRequest + + # Converts hash and nil to an 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_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::Ces::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_agents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_agents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.list_agents request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_agents, "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 the specified agent. + # + # @overload get_agent(request, options = nil) + # Pass arguments to `get_agent` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(name: nil) + # Pass arguments to `get_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. The resource name of the agent to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Agent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Agent] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetAgentRequest.new + # + # # Call the get_agent method. + # result = client.get_agent request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. + # p result + # + def get_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAgentRequest + + # Converts hash and nil to an 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_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::Ces::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_agent.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.get_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 agent in the given app. + # + # @overload create_agent(request, options = nil) + # Pass arguments to `create_agent` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(parent: nil, agent_id: nil, agent: nil) + # Pass arguments to `create_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. The resource name of the app to create an agent in. + # @param agent_id [::String] + # Optional. The ID to use for the agent, which will become the final + # component of the agent's resource name. If not provided, a unique ID will + # be automatically assigned for the agent. + # @param agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] + # Required. The agent to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Agent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Agent] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateAgentRequest.new + # + # # Call the create_agent method. + # result = client.create_agent request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. + # p result + # + def create_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAgentRequest + + # Converts hash and nil to an 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_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::Ces::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_agent.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.create_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 + + ## + # Updates the specified agent. + # + # @overload update_agent(request, options = nil) + # Pass arguments to `update_agent` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(agent: nil, update_mask: nil) + # Pass arguments to `update_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 agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] + # Required. The agent to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Agent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Agent] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateAgentRequest.new + # + # # Call the update_agent method. + # result = client.update_agent request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. + # p result + # + def update_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateAgentRequest + + # Converts hash and nil to an 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_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::Ces::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_agent.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.update_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 + + ## + # Deletes the specified agent. + # + # @overload delete_agent(request, options = nil) + # Pass arguments to `delete_agent` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(name: nil, force: nil, etag: nil) + # Pass arguments to `delete_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. The resource name of the agent to delete. + # @param force [::Boolean] + # Optional. Indicates whether to forcefully delete the agent, even if it is + # still referenced by other app/agents/examples. + # + # * If `force = false`, the deletion fails if other agents/examples + # reference it. + # * If `force = true`, delete the agent and remove it from all referencing + # apps/agents/examples. + # @param etag [::String] + # Optional. The current etag of the agent. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the agent, deletion will be blocked and + # an ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteAgentRequest.new + # + # # Call the delete_agent method. + # result = client.delete_agent request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAgentRequest + + # Converts hash and nil to an 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_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::Ces::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_agent.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.delete_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 + + ## + # Lists examples in the given app. + # + # @overload list_examples(request, options = nil) + # Pass arguments to `list_examples` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListExamplesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListExamplesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_examples(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_examples` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list examples from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListExamplesResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_examples AgentService.ListExamples} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the examples. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Example>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Example>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListExamplesRequest.new + # + # # Call the list_examples method. + # result = client.list_examples 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::Ces::V1beta::Example. + # p item + # end + # + def list_examples request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListExamplesRequest + + # Converts hash and nil to an 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_examples.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_examples.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_examples.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.list_examples request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_examples, "examples", 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 the specified example. + # + # @overload get_example(request, options = nil) + # Pass arguments to `get_example` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetExampleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetExampleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_example(name: nil) + # Pass arguments to `get_example` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the example to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Example] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Example] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetExampleRequest.new + # + # # Call the get_example method. + # result = client.get_example request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Example. + # p result + # + def get_example request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetExampleRequest + + # Converts hash and nil to an 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_example.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_example.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_example.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.get_example 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 example in the given app. + # + # @overload create_example(request, options = nil) + # Pass arguments to `create_example` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateExampleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateExampleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_example(parent: nil, example_id: nil, example: nil) + # Pass arguments to `create_example` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to create an example in. + # @param example_id [::String] + # Optional. The ID to use for the example, which will become the final + # component of the example's resource name. If not provided, a unique ID will + # be automatically assigned for the example. + # @param example [::Google::Cloud::Ces::V1beta::Example, ::Hash] + # Required. The example to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Example] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Example] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateExampleRequest.new + # + # # Call the create_example method. + # result = client.create_example request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Example. + # p result + # + def create_example request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateExampleRequest + + # Converts hash and nil to an 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_example.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_example.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_example.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.create_example request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified example. + # + # @overload update_example(request, options = nil) + # Pass arguments to `update_example` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateExampleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateExampleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_example(example: nil, update_mask: nil) + # Pass arguments to `update_example` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param example [::Google::Cloud::Ces::V1beta::Example, ::Hash] + # Required. The example to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Example] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Example] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateExampleRequest.new + # + # # Call the update_example method. + # result = client.update_example request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Example. + # p result + # + def update_example request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateExampleRequest + + # Converts hash and nil to an 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_example.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_example.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_example.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.update_example request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified example. + # + # @overload delete_example(request, options = nil) + # Pass arguments to `delete_example` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteExampleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteExampleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_example(name: nil, etag: nil) + # Pass arguments to `delete_example` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the example to delete. + # @param etag [::String] + # Optional. The current etag of the example. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the example, deletion will be blocked + # and an ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteExampleRequest.new + # + # # Call the delete_example method. + # result = client.delete_example request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_example request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteExampleRequest + + # Converts hash and nil to an 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_example.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_example.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_example.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.delete_example 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 tools in the given app. + # + # @overload list_tools(request, options = nil) + # Pass arguments to `list_tools` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListToolsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListToolsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_tools` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list tools from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListToolsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_tools AgentService.ListTools} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the tools. Use + # "include_system_tools=true" to include system tools in the response. See + # https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Tool>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Tool>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListToolsRequest.new + # + # # Call the list_tools method. + # result = client.list_tools 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::Ces::V1beta::Tool. + # p item + # end + # + def list_tools request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListToolsRequest + + # Converts hash and nil to an 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_tools.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_tools.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tools.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.list_tools request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_tools, "tools", 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 the specified tool. + # + # @overload get_tool(request, options = nil) + # Pass arguments to `get_tool` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetToolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetToolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tool(name: nil) + # Pass arguments to `get_tool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the tool to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Tool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Tool] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetToolRequest.new + # + # # Call the get_tool method. + # result = client.get_tool request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. + # p result + # + def get_tool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetToolRequest + + # Converts hash and nil to an 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_tool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_tool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_tool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.get_tool 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 conversations in the given app. + # + # @overload list_conversations(request, options = nil) + # Pass arguments to `list_conversations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::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, source: nil, sources: 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. The resource name of the app to list conversations from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListConversationsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_conversations AgentService.ListConversations} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the conversations. + # See https://google.aip.dev/160 for more details. + # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, Source.Live + # will be applied by default. Will be deprecated in favor of `sources` field. + # @param sources [::Array<::Google::Cloud::Ces::V1beta::Conversation::Source>] + # Optional. Indicate the sources of the conversations. If not set, all + # available sources will be applied by default. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Conversation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Conversation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::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::Ces::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::Ces::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::Ces::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 + + @agent_service_stub.list_conversations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @agent_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 + + ## + # Gets details of the specified conversation. + # + # @overload get_conversation(request, options = nil) + # Pass arguments to `get_conversation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::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, source: 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. The resource name of the conversation to retrieve. + # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, all source + # will be searched. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Conversation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetConversationRequest.new + # + # # Call the get_conversation method. + # result = client.get_conversation request + # + # # The returned object is of type Google::Cloud::Ces::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::Ces::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::Ces::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 + + @agent_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 + + ## + # Deletes the specified conversation. + # + # @overload delete_conversation(request, options = nil) + # Pass arguments to `delete_conversation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::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, source: 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. The resource name of the conversation to delete. + # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, Source.Live + # will be applied by default. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::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::Ces::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::Ces::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 + + @agent_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 + + ## + # Batch deletes the specified conversations. + # + # @overload batch_delete_conversations(request, options = nil) + # Pass arguments to `batch_delete_conversations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_delete_conversations(parent: nil, conversations: nil) + # Pass arguments to `batch_delete_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. The resource name of the app to delete conversations from. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param conversations [::Array<::String>] + # Required. The resource names of the conversations to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new + # + # # Call the batch_delete_conversations method. + # result = client.batch_delete_conversations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_delete_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_delete_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::Ces::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.batch_delete_conversations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_delete_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.batch_delete_conversations 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 + + ## + # Creates a new tool in the given app. + # + # @overload create_tool(request, options = nil) + # Pass arguments to `create_tool` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateToolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateToolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tool(parent: nil, tool_id: nil, tool: nil) + # Pass arguments to `create_tool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to create a tool in. + # @param tool_id [::String] + # Optional. The ID to use for the tool, which will become the final component + # of the tool's resource name. If not provided, a unique ID will be + # automatically assigned for the tool. + # @param tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] + # Required. The tool to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Tool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Tool] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateToolRequest.new + # + # # Call the create_tool method. + # result = client.create_tool request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. + # p result + # + def create_tool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateToolRequest + + # Converts hash and nil to an 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_tool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_tool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_tool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.create_tool request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified tool. + # + # @overload update_tool(request, options = nil) + # Pass arguments to `update_tool` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateToolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateToolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tool(tool: nil, update_mask: nil) + # Pass arguments to `update_tool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] + # Required. The tool to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Tool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Tool] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateToolRequest.new + # + # # Call the update_tool method. + # result = client.update_tool request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. + # p result + # + def update_tool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateToolRequest + + # Converts hash and nil to an 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_tool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_tool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_tool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.update_tool request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified tool. + # + # @overload delete_tool(request, options = nil) + # Pass arguments to `delete_tool` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteToolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteToolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tool(name: nil, force: nil, etag: nil) + # Pass arguments to `delete_tool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the tool to delete. + # @param force [::Boolean] + # Optional. Indicates whether to forcefully delete the tool, even if it is + # still referenced by agents/examples. + # + # * If `force = false`, the deletion will fail if any agents still + # reference the tool. + # * If `force = true`, all existing references from agents will be removed + # and the tool will be deleted. + # @param etag [::String] + # Optional. The current etag of the tool. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the tool, deletion will be blocked and + # an ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteToolRequest.new + # + # # Call the delete_tool method. + # result = client.delete_tool request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteToolRequest + + # Converts hash and nil to an 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_tool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_tool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_tool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.delete_tool 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 guardrails in the given app. + # + # @overload list_guardrails(request, options = nil) + # Pass arguments to `list_guardrails` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListGuardrailsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListGuardrailsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_guardrails(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_guardrails` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list guardrails from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListGuardrailsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_guardrails AgentService.ListGuardrails} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the guardrails. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Guardrail>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Guardrail>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new + # + # # Call the list_guardrails method. + # result = client.list_guardrails 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::Ces::V1beta::Guardrail. + # p item + # end + # + def list_guardrails request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListGuardrailsRequest + + # Converts hash and nil to an 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_guardrails.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_guardrails.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_guardrails.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.list_guardrails request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_guardrails, "guardrails", 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 the specified guardrail. + # + # @overload get_guardrail(request, options = nil) + # Pass arguments to `get_guardrail` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetGuardrailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetGuardrailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_guardrail(name: nil) + # Pass arguments to `get_guardrail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the guardrail to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Guardrail] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetGuardrailRequest.new + # + # # Call the get_guardrail method. + # result = client.get_guardrail request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. + # p result + # + def get_guardrail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetGuardrailRequest + + # Converts hash and nil to an 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_guardrail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_guardrail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.get_guardrail 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 guardrail in the given app. + # + # @overload create_guardrail(request, options = nil) + # Pass arguments to `create_guardrail` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateGuardrailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateGuardrailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_guardrail(parent: nil, guardrail_id: nil, guardrail: nil) + # Pass arguments to `create_guardrail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to create a guardrail in. + # @param guardrail_id [::String] + # Optional. The ID to use for the guardrail, which will become the final + # component of the guardrail's resource name. If not provided, a unique ID + # will be automatically assigned for the guardrail. + # @param guardrail [::Google::Cloud::Ces::V1beta::Guardrail, ::Hash] + # Required. The guardrail to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Guardrail] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new + # + # # Call the create_guardrail method. + # result = client.create_guardrail request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. + # p result + # + def create_guardrail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateGuardrailRequest + + # Converts hash and nil to an 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_guardrail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_guardrail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.create_guardrail request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified guardrail. + # + # @overload update_guardrail(request, options = nil) + # Pass arguments to `update_guardrail` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_guardrail(guardrail: nil, update_mask: nil) + # Pass arguments to `update_guardrail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param guardrail [::Google::Cloud::Ces::V1beta::Guardrail, ::Hash] + # Required. The guardrail to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Guardrail] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new + # + # # Call the update_guardrail method. + # result = client.update_guardrail request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. + # p result + # + def update_guardrail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest + + # Converts hash and nil to an 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_guardrail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_guardrail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.update_guardrail request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified guardrail. + # + # @overload delete_guardrail(request, options = nil) + # Pass arguments to `delete_guardrail` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_guardrail(name: nil, force: nil, etag: nil) + # Pass arguments to `delete_guardrail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the guardrail to delete. + # @param force [::Boolean] + # Optional. Indicates whether to forcefully delete the guardrail, even if it + # is still referenced by app/agents. + # + # * If `force = false`, the deletion fails if any apps/agents still + # reference the guardrail. + # * If `force = true`, all existing references from apps/agents will be + # removed and the guardrail will be deleted. + # @param etag [::String] + # Optional. The current etag of the guardrail. If an etag is not provided, + # the deletion will overwrite any concurrent changes. If an etag is provided + # and does not match the current etag of the guardrail, deletion will be + # blocked and an ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new + # + # # Call the delete_guardrail method. + # result = client.delete_guardrail request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_guardrail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest + + # Converts hash and nil to an 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_guardrail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_guardrail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.delete_guardrail 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 deployments in the given app. + # + # @overload list_deployments(request, options = nil) + # Pass arguments to `list_deployments` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployments(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent app. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param page_size [::Integer] + # Optional. The maximum number of deployments to return. The service may + # return fewer than this value. If unspecified, at most 50 deployments will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeployments` must + # match the call that provided the page token. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Deployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Deployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new + # + # # Call the list_deployments method. + # result = client.list_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Ces::V1beta::Deployment. + # p item + # end + # + def list_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListDeploymentsRequest + + # Converts hash and nil to an 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_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_deployments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.list_deployments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_deployments, "deployments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified deployment. + # + # @overload get_deployment(request, options = nil) + # Pass arguments to `get_deployment` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployment(name: nil) + # Pass arguments to `get_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetDeploymentRequest.new + # + # # Call the get_deployment method. + # result = client.get_deployment request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. + # p result + # + def get_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetDeploymentRequest + + # Converts hash and nil to an 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.get_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new deployment in the given app. + # + # @overload create_deployment(request, options = nil) + # Pass arguments to `create_deployment` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployment(parent: nil, deployment_id: nil, deployment: nil) + # Pass arguments to `create_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent app. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param deployment_id [::String] + # Optional. The ID to use for the deployment, which will become the final + # component of the deployment's resource name. If not provided, a unique ID + # will be automatically assigned for the deployment. + # @param deployment [::Google::Cloud::Ces::V1beta::Deployment, ::Hash] + # Required. The deployment to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new + # + # # Call the create_deployment method. + # result = client.create_deployment request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. + # p result + # + def create_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateDeploymentRequest + + # Converts hash and nil to an 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.create_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified deployment. + # + # @overload update_deployment(request, options = nil) + # Pass arguments to `update_deployment` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployment(deployment: nil, update_mask: nil) + # Pass arguments to `update_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param deployment [::Google::Cloud::Ces::V1beta::Deployment, ::Hash] + # Required. The deployment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new + # + # # Call the update_deployment method. + # result = client.update_deployment request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. + # p result + # + def update_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest + + # Converts hash and nil to an 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.update_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified deployment. + # + # @overload delete_deployment(request, options = nil) + # Pass arguments to `delete_deployment` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployment(name: nil, etag: nil) + # Pass arguments to `delete_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment to delete. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + # @param etag [::String] + # Optional. The etag of the deployment. + # If an etag is provided and does not match the current etag of the + # deployment, deletion will be blocked and an ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new + # + # # Call the delete_deployment method. + # result = client.delete_deployment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest + + # Converts hash and nil to an 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.delete_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists toolsets in the given app. + # + # @overload list_toolsets(request, options = nil) + # Pass arguments to `list_toolsets` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListToolsetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListToolsetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_toolsets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_toolsets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list toolsets from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListToolsetsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_toolsets AgentService.ListToolsets} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the toolsets. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Toolset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Toolset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListToolsetsRequest.new + # + # # Call the list_toolsets method. + # result = client.list_toolsets 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::Ces::V1beta::Toolset. + # p item + # end + # + def list_toolsets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListToolsetsRequest + + # Converts hash and nil to an 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_toolsets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_toolsets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_toolsets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.list_toolsets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_toolsets, "toolsets", 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 the specified toolset. + # + # @overload get_toolset(request, options = nil) + # Pass arguments to `get_toolset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetToolsetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetToolsetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_toolset(name: nil) + # Pass arguments to `get_toolset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the toolset to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Toolset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetToolsetRequest.new + # + # # Call the get_toolset method. + # result = client.get_toolset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. + # p result + # + def get_toolset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetToolsetRequest + + # Converts hash and nil to an 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_toolset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_toolset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.get_toolset 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 toolset in the given app. + # + # @overload create_toolset(request, options = nil) + # Pass arguments to `create_toolset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateToolsetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateToolsetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_toolset(parent: nil, toolset_id: nil, toolset: nil) + # Pass arguments to `create_toolset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to create a toolset in. + # @param toolset_id [::String] + # Optional. The ID to use for the toolset, which will become the final + # component of the toolset's resource name. If not provided, a unique ID will + # be automatically assigned for the toolset. + # @param toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] + # Required. The toolset to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Toolset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateToolsetRequest.new + # + # # Call the create_toolset method. + # result = client.create_toolset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. + # p result + # + def create_toolset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateToolsetRequest + + # Converts hash and nil to an 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_toolset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_toolset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.create_toolset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified toolset. + # + # @overload update_toolset(request, options = nil) + # Pass arguments to `update_toolset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateToolsetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateToolsetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_toolset(toolset: nil, update_mask: nil) + # Pass arguments to `update_toolset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] + # Required. The toolset to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Toolset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new + # + # # Call the update_toolset method. + # result = client.update_toolset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. + # p result + # + def update_toolset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateToolsetRequest + + # Converts hash and nil to an 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_toolset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_toolset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.update_toolset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified toolset. + # + # @overload delete_toolset(request, options = nil) + # Pass arguments to `delete_toolset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteToolsetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteToolsetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_toolset(name: nil, force: nil, etag: nil) + # Pass arguments to `delete_toolset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the toolset to delete. + # @param force [::Boolean] + # Optional. Indicates whether to forcefully delete the toolset, even if it is + # still referenced by app/agents. + # + # * If `force = false`, the deletion fails if any agents still + # reference the toolset. + # * If `force = true`, all existing references from agents will be + # removed and the toolset will be deleted. + # @param etag [::String] + # Optional. The current etag of the toolset. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the toolset, deletion will be blocked + # and an ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new + # + # # Call the delete_toolset method. + # result = client.delete_toolset request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_toolset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteToolsetRequest + + # Converts hash and nil to an 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_toolset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_toolset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.delete_toolset 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 app versions in the given app. + # + # @overload list_app_versions(request, options = nil) + # Pass arguments to `list_app_versions` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListAppVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListAppVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_app_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list app versions from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListAppVersionsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_app_versions AgentService.ListAppVersions} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the app versions. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::AppVersion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::AppVersion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new + # + # # Call the list_app_versions method. + # result = client.list_app_versions 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::Ces::V1beta::AppVersion. + # p item + # end + # + def list_app_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAppVersionsRequest + + # Converts hash and nil to an 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_app_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_app_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.list_app_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_app_versions, "app_versions", 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 the specified app version. + # + # @overload get_app_version(request, options = nil) + # Pass arguments to `get_app_version` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetAppVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetAppVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app_version(name: nil) + # Pass arguments to `get_app_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app version to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::AppVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::AppVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetAppVersionRequest.new + # + # # Call the get_app_version method. + # result = client.get_app_version request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. + # p result + # + def get_app_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAppVersionRequest + + # Converts hash and nil to an 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_app_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_app_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.get_app_version 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 app version in the given app. + # + # @overload create_app_version(request, options = nil) + # Pass arguments to `create_app_version` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateAppVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateAppVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app_version(parent: nil, app_version_id: nil, app_version: nil) + # Pass arguments to `create_app_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to create an app version in. + # @param app_version_id [::String] + # Optional. The ID to use for the app version, which will become the final + # component of the app version's resource name. If not provided, a unique ID + # will be automatically assigned for the app version. + # @param app_version [::Google::Cloud::Ces::V1beta::AppVersion, ::Hash] + # Required. The app version to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::AppVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::AppVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new + # + # # Call the create_app_version method. + # result = client.create_app_version request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. + # p result + # + def create_app_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAppVersionRequest + + # Converts hash and nil to an 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_app_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_app_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.create_app_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified app version. + # + # @overload delete_app_version(request, options = nil) + # Pass arguments to `delete_app_version` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_app_version(name: nil, etag: nil) + # Pass arguments to `delete_app_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app version to delete. + # @param etag [::String] + # Optional. The current etag of the app version. If an etag is not provided, + # the deletion will overwrite any concurrent changes. If an etag is provided + # and does not match the current etag of the app version, deletion will be + # blocked and an ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new + # + # # Call the delete_app_version method. + # result = client.delete_app_version request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_app_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest + + # Converts hash and nil to an 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_app_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_app_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.delete_app_version 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 + + ## + # Restores the specified app version. + # This will create a new app version from the current draft app and overwrite + # the current draft with the specified app version. + # + # @overload restore_app_version(request, options = nil) + # Pass arguments to `restore_app_version` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restore_app_version(name: nil) + # Pass arguments to `restore_app_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the app version to restore. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.new + # + # # Call the restore_app_version method. + # result = client.restore_app_version 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 restore_app_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restore_app_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.restore_app_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restore_app_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.restore_app_version 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 + + ## + # Generates specific resources (e.g. agent) in the app using LLM assistant. + # + # @overload generate_app_resource(request, options = nil) + # Pass arguments to `generate_app_resource` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload generate_app_resource(agent: nil, tool: nil, toolset: nil, app_version_context: nil, parent: nil, refine_instructions: nil, tool_generation_config: nil, app_generation_config: nil, evaluation_generation_config: nil, evaluation_personas_generation_config: nil, quality_report_generation_config: nil, hill_climbing_fix_config: nil) + # Pass arguments to `generate_app_resource` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] + # The agent resource to be used by the LLM assistant, can be empty for + # generating a new agent. + # + # Note: The following parameters are mutually exclusive: `agent`, `tool`, `toolset`, `app_version_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 tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] + # The tool resource to be used by the LLM assistant, can be empty for + # generating a new tool. + # + # Note: The following parameters are mutually exclusive: `tool`, `agent`, `toolset`, `app_version_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 toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] + # The toolset resource to be used by the LLM assistant, can be empty for + # generating a new toolset. + # + # Note: The following parameters are mutually exclusive: `toolset`, `agent`, `tool`, `app_version_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 app_version_context [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppVersionContext, ::Hash] + # The app version context specifying the base snapshot and target agent. + # + # Note: The following parameters are mutually exclusive: `app_version_context`, `agent`, `tool`, `toolset`. 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 parent [::String] + # Required. The resource name of the app to generate the resource for. + # @param refine_instructions [::Array<::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::RefineInstructions, ::Hash>] + # Optional. List of refine instructions to be used to refine the resource. + # @param tool_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig, ::Hash] + # Optional. The configuration to be used to generate the tool. + # @param app_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppGenerationConfig, ::Hash] + # Optional. The configuration to be used to generate the agents and tools. + # @param evaluation_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationGenerationConfig, ::Hash] + # Optional. The configuration to be used to generate the evaluations. + # @param evaluation_personas_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationPersonasGenerationConfig, ::Hash] + # Optional. The configuration to be used to generate the evaluation personas. + # @param quality_report_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::QualityReportGenerationConfig, ::Hash] + # Optional. The configuration to be used for quality report generation. + # @param hill_climbing_fix_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::HillClimbingFixConfig, ::Hash] + # Optional. The configuration to be used for hill climbing fixes. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new + # + # # Call the generate_app_resource method. + # result = client.generate_app_resource 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 generate_app_resource request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.generate_app_resource.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.generate_app_resource.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_app_resource.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.generate_app_resource 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 + + ## + # Lists the changelogs of the specified app. + # + # @overload list_changelogs(request, options = nil) + # Pass arguments to `list_changelogs` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListChangelogsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListChangelogsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_changelogs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_changelogs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list changelogs from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListChangelogsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_changelogs AgentService.ListChangelogs} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the changelogs. + # See https://google.aip.dev/160 for more details. + # + # The filter string can be used to filter by `action`, `resource_type`, + # `resource_name`, `author`, and `create_time`. + # The `:` comparator can be used for case-insensitive partial matching on + # string fields, while `=` performs an exact case-sensitive match. + # + # Examples: + # * `action:update` (case-insensitive partial match) + # * `action="Create"` (case-sensitive exact match) + # * `resource_type:agent` + # * `resource_name:my-agent` + # * `author:me@example.com` + # * `create_time > "2025-01-01T00:00:00Z"` + # * `create_time <= "2025-01-01T00:00:00Z" AND resource_type:tool` + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Changelog>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Changelog>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListChangelogsRequest.new + # + # # Call the list_changelogs method. + # result = client.list_changelogs 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::Ces::V1beta::Changelog. + # p item + # end + # + def list_changelogs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListChangelogsRequest + + # Converts hash and nil to an 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_changelogs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_changelogs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_changelogs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.list_changelogs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_changelogs, "changelogs", 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 specified changelog. + # + # @overload get_changelog(request, options = nil) + # Pass arguments to `get_changelog` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetChangelogRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetChangelogRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_changelog(name: nil) + # Pass arguments to `get_changelog` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the changelog to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Changelog] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Changelog] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetChangelogRequest.new + # + # # Call the get_changelog method. + # result = client.get_changelog request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Changelog. + # p result + # + def get_changelog request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetChangelogRequest + + # Converts hash and nil to an 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_changelog.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_changelog.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_changelog.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @agent_service_stub.get_changelog 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 AgentService REST API. + # + # This class represents the configuration for AgentService 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::Ces::V1beta::AgentService::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_apps to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_apps.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_apps.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 = "ces.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 AgentService 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_apps` + # @return [::Gapic::Config::Method] + # + attr_reader :list_apps + ## + # RPC-specific configuration for `get_app` + # @return [::Gapic::Config::Method] + # + attr_reader :get_app + ## + # RPC-specific configuration for `create_app` + # @return [::Gapic::Config::Method] + # + attr_reader :create_app + ## + # RPC-specific configuration for `update_app` + # @return [::Gapic::Config::Method] + # + attr_reader :update_app + ## + # RPC-specific configuration for `delete_app` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_app + ## + # RPC-specific configuration for `export_app` + # @return [::Gapic::Config::Method] + # + attr_reader :export_app + ## + # RPC-specific configuration for `import_app` + # @return [::Gapic::Config::Method] + # + attr_reader :import_app + ## + # RPC-specific configuration for `get_security_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_security_settings + ## + # RPC-specific configuration for `update_security_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_settings + ## + # RPC-specific configuration for `list_agents` + # @return [::Gapic::Config::Method] + # + attr_reader :list_agents + ## + # RPC-specific configuration for `get_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :get_agent + ## + # RPC-specific configuration for `create_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :create_agent + ## + # RPC-specific configuration for `update_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :update_agent + ## + # RPC-specific configuration for `delete_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_agent + ## + # RPC-specific configuration for `list_examples` + # @return [::Gapic::Config::Method] + # + attr_reader :list_examples + ## + # RPC-specific configuration for `get_example` + # @return [::Gapic::Config::Method] + # + attr_reader :get_example + ## + # RPC-specific configuration for `create_example` + # @return [::Gapic::Config::Method] + # + attr_reader :create_example + ## + # RPC-specific configuration for `update_example` + # @return [::Gapic::Config::Method] + # + attr_reader :update_example + ## + # RPC-specific configuration for `delete_example` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_example + ## + # RPC-specific configuration for `list_tools` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tools + ## + # RPC-specific configuration for `get_tool` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tool + ## + # RPC-specific configuration for `list_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversations + ## + # RPC-specific configuration for `get_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversation + ## + # RPC-specific configuration for `delete_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversation + ## + # RPC-specific configuration for `batch_delete_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_delete_conversations + ## + # RPC-specific configuration for `create_tool` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tool + ## + # RPC-specific configuration for `update_tool` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tool + ## + # RPC-specific configuration for `delete_tool` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tool + ## + # RPC-specific configuration for `list_guardrails` + # @return [::Gapic::Config::Method] + # + attr_reader :list_guardrails + ## + # RPC-specific configuration for `get_guardrail` + # @return [::Gapic::Config::Method] + # + attr_reader :get_guardrail + ## + # RPC-specific configuration for `create_guardrail` + # @return [::Gapic::Config::Method] + # + attr_reader :create_guardrail + ## + # RPC-specific configuration for `update_guardrail` + # @return [::Gapic::Config::Method] + # + attr_reader :update_guardrail + ## + # RPC-specific configuration for `delete_guardrail` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_guardrail + ## + # RPC-specific configuration for `list_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deployments + ## + # RPC-specific configuration for `get_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_deployment + ## + # RPC-specific configuration for `create_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_deployment + ## + # RPC-specific configuration for `update_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_deployment + ## + # RPC-specific configuration for `delete_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_deployment + ## + # RPC-specific configuration for `list_toolsets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_toolsets + ## + # RPC-specific configuration for `get_toolset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_toolset + ## + # RPC-specific configuration for `create_toolset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_toolset + ## + # RPC-specific configuration for `update_toolset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_toolset + ## + # RPC-specific configuration for `delete_toolset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_toolset + ## + # RPC-specific configuration for `list_app_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_app_versions + ## + # RPC-specific configuration for `get_app_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_app_version + ## + # RPC-specific configuration for `create_app_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_app_version + ## + # RPC-specific configuration for `delete_app_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_app_version + ## + # RPC-specific configuration for `restore_app_version` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_app_version + ## + # RPC-specific configuration for `generate_app_resource` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_app_resource + ## + # RPC-specific configuration for `list_changelogs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_changelogs + ## + # RPC-specific configuration for `get_changelog` + # @return [::Gapic::Config::Method] + # + attr_reader :get_changelog + + # @private + def initialize parent_rpcs = nil + list_apps_config = parent_rpcs.list_apps if parent_rpcs.respond_to? :list_apps + @list_apps = ::Gapic::Config::Method.new list_apps_config + get_app_config = parent_rpcs.get_app if parent_rpcs.respond_to? :get_app + @get_app = ::Gapic::Config::Method.new get_app_config + create_app_config = parent_rpcs.create_app if parent_rpcs.respond_to? :create_app + @create_app = ::Gapic::Config::Method.new create_app_config + update_app_config = parent_rpcs.update_app if parent_rpcs.respond_to? :update_app + @update_app = ::Gapic::Config::Method.new update_app_config + delete_app_config = parent_rpcs.delete_app if parent_rpcs.respond_to? :delete_app + @delete_app = ::Gapic::Config::Method.new delete_app_config + export_app_config = parent_rpcs.export_app if parent_rpcs.respond_to? :export_app + @export_app = ::Gapic::Config::Method.new export_app_config + import_app_config = parent_rpcs.import_app if parent_rpcs.respond_to? :import_app + @import_app = ::Gapic::Config::Method.new import_app_config + get_security_settings_config = parent_rpcs.get_security_settings if parent_rpcs.respond_to? :get_security_settings + @get_security_settings = ::Gapic::Config::Method.new get_security_settings_config + update_security_settings_config = parent_rpcs.update_security_settings if parent_rpcs.respond_to? :update_security_settings + @update_security_settings = ::Gapic::Config::Method.new update_security_settings_config + list_agents_config = parent_rpcs.list_agents if parent_rpcs.respond_to? :list_agents + @list_agents = ::Gapic::Config::Method.new list_agents_config + get_agent_config = parent_rpcs.get_agent if parent_rpcs.respond_to? :get_agent + @get_agent = ::Gapic::Config::Method.new get_agent_config + create_agent_config = parent_rpcs.create_agent if parent_rpcs.respond_to? :create_agent + @create_agent = ::Gapic::Config::Method.new create_agent_config + update_agent_config = parent_rpcs.update_agent if parent_rpcs.respond_to? :update_agent + @update_agent = ::Gapic::Config::Method.new update_agent_config + delete_agent_config = parent_rpcs.delete_agent if parent_rpcs.respond_to? :delete_agent + @delete_agent = ::Gapic::Config::Method.new delete_agent_config + list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples + @list_examples = ::Gapic::Config::Method.new list_examples_config + get_example_config = parent_rpcs.get_example if parent_rpcs.respond_to? :get_example + @get_example = ::Gapic::Config::Method.new get_example_config + create_example_config = parent_rpcs.create_example if parent_rpcs.respond_to? :create_example + @create_example = ::Gapic::Config::Method.new create_example_config + update_example_config = parent_rpcs.update_example if parent_rpcs.respond_to? :update_example + @update_example = ::Gapic::Config::Method.new update_example_config + delete_example_config = parent_rpcs.delete_example if parent_rpcs.respond_to? :delete_example + @delete_example = ::Gapic::Config::Method.new delete_example_config + list_tools_config = parent_rpcs.list_tools if parent_rpcs.respond_to? :list_tools + @list_tools = ::Gapic::Config::Method.new list_tools_config + get_tool_config = parent_rpcs.get_tool if parent_rpcs.respond_to? :get_tool + @get_tool = ::Gapic::Config::Method.new get_tool_config + list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations + @list_conversations = ::Gapic::Config::Method.new list_conversations_config + get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation + @get_conversation = ::Gapic::Config::Method.new get_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 + batch_delete_conversations_config = parent_rpcs.batch_delete_conversations if parent_rpcs.respond_to? :batch_delete_conversations + @batch_delete_conversations = ::Gapic::Config::Method.new batch_delete_conversations_config + create_tool_config = parent_rpcs.create_tool if parent_rpcs.respond_to? :create_tool + @create_tool = ::Gapic::Config::Method.new create_tool_config + update_tool_config = parent_rpcs.update_tool if parent_rpcs.respond_to? :update_tool + @update_tool = ::Gapic::Config::Method.new update_tool_config + delete_tool_config = parent_rpcs.delete_tool if parent_rpcs.respond_to? :delete_tool + @delete_tool = ::Gapic::Config::Method.new delete_tool_config + list_guardrails_config = parent_rpcs.list_guardrails if parent_rpcs.respond_to? :list_guardrails + @list_guardrails = ::Gapic::Config::Method.new list_guardrails_config + get_guardrail_config = parent_rpcs.get_guardrail if parent_rpcs.respond_to? :get_guardrail + @get_guardrail = ::Gapic::Config::Method.new get_guardrail_config + create_guardrail_config = parent_rpcs.create_guardrail if parent_rpcs.respond_to? :create_guardrail + @create_guardrail = ::Gapic::Config::Method.new create_guardrail_config + update_guardrail_config = parent_rpcs.update_guardrail if parent_rpcs.respond_to? :update_guardrail + @update_guardrail = ::Gapic::Config::Method.new update_guardrail_config + delete_guardrail_config = parent_rpcs.delete_guardrail if parent_rpcs.respond_to? :delete_guardrail + @delete_guardrail = ::Gapic::Config::Method.new delete_guardrail_config + list_deployments_config = parent_rpcs.list_deployments if parent_rpcs.respond_to? :list_deployments + @list_deployments = ::Gapic::Config::Method.new list_deployments_config + get_deployment_config = parent_rpcs.get_deployment if parent_rpcs.respond_to? :get_deployment + @get_deployment = ::Gapic::Config::Method.new get_deployment_config + create_deployment_config = parent_rpcs.create_deployment if parent_rpcs.respond_to? :create_deployment + @create_deployment = ::Gapic::Config::Method.new create_deployment_config + update_deployment_config = parent_rpcs.update_deployment if parent_rpcs.respond_to? :update_deployment + @update_deployment = ::Gapic::Config::Method.new update_deployment_config + delete_deployment_config = parent_rpcs.delete_deployment if parent_rpcs.respond_to? :delete_deployment + @delete_deployment = ::Gapic::Config::Method.new delete_deployment_config + list_toolsets_config = parent_rpcs.list_toolsets if parent_rpcs.respond_to? :list_toolsets + @list_toolsets = ::Gapic::Config::Method.new list_toolsets_config + get_toolset_config = parent_rpcs.get_toolset if parent_rpcs.respond_to? :get_toolset + @get_toolset = ::Gapic::Config::Method.new get_toolset_config + create_toolset_config = parent_rpcs.create_toolset if parent_rpcs.respond_to? :create_toolset + @create_toolset = ::Gapic::Config::Method.new create_toolset_config + update_toolset_config = parent_rpcs.update_toolset if parent_rpcs.respond_to? :update_toolset + @update_toolset = ::Gapic::Config::Method.new update_toolset_config + delete_toolset_config = parent_rpcs.delete_toolset if parent_rpcs.respond_to? :delete_toolset + @delete_toolset = ::Gapic::Config::Method.new delete_toolset_config + list_app_versions_config = parent_rpcs.list_app_versions if parent_rpcs.respond_to? :list_app_versions + @list_app_versions = ::Gapic::Config::Method.new list_app_versions_config + get_app_version_config = parent_rpcs.get_app_version if parent_rpcs.respond_to? :get_app_version + @get_app_version = ::Gapic::Config::Method.new get_app_version_config + create_app_version_config = parent_rpcs.create_app_version if parent_rpcs.respond_to? :create_app_version + @create_app_version = ::Gapic::Config::Method.new create_app_version_config + delete_app_version_config = parent_rpcs.delete_app_version if parent_rpcs.respond_to? :delete_app_version + @delete_app_version = ::Gapic::Config::Method.new delete_app_version_config + restore_app_version_config = parent_rpcs.restore_app_version if parent_rpcs.respond_to? :restore_app_version + @restore_app_version = ::Gapic::Config::Method.new restore_app_version_config + generate_app_resource_config = parent_rpcs.generate_app_resource if parent_rpcs.respond_to? :generate_app_resource + @generate_app_resource = ::Gapic::Config::Method.new generate_app_resource_config + list_changelogs_config = parent_rpcs.list_changelogs if parent_rpcs.respond_to? :list_changelogs + @list_changelogs = ::Gapic::Config::Method.new list_changelogs_config + get_changelog_config = parent_rpcs.get_changelog if parent_rpcs.respond_to? :get_changelog + @get_changelog = ::Gapic::Config::Method.new get_changelog_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb new file mode 100644 index 000000000000..4bb7b0210fe6 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Ces + module V1beta + module AgentService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AgentService 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 AgentService 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::Ces::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::Ces::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::Ces::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::Ces::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 = "ces.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-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb new file mode 100644 index 000000000000..dc12b6d2f227 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb @@ -0,0 +1,3213 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/agent_service_pb" + +module Google + module Cloud + module Ces + module V1beta + module AgentService + module Rest + ## + # REST service stub for the AgentService 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_apps REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListAppsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListAppsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListAppsResponse] + # A result object deserialized from the server's reply + def list_apps request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_apps_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_apps", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListAppsResponse.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_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetAppRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::App] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::App] + # A result object deserialized from the server's reply + def get_app request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_app_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_app", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::App.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_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAppRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_app request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_app_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_app", + 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_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateAppRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::App] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::App] + # A result object deserialized from the server's reply + def update_app request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_app_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_app", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::App.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_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAppRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_app request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_app_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_app", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportAppRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_app request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_app_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_app", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ImportAppRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_app request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_app_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_app", + 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_security_settings REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::SecuritySettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] + # A result object deserialized from the server's reply + def get_security_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_security_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_security_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::SecuritySettings.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_security_settings REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::SecuritySettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] + # A result object deserialized from the server's reply + def update_security_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_security_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_security_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::SecuritySettings.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_agents REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListAgentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListAgentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListAgentsResponse] + # A result object deserialized from the server's reply + def list_agents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_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_agents", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListAgentsResponse.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_agent REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetAgentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Agent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Agent] + # A result object deserialized from the server's reply + def get_agent request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_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_agent", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Agent.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_agent REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAgentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Agent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Agent] + # A result object deserialized from the server's reply + def create_agent request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_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_agent", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Agent.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_agent REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateAgentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Agent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Agent] + # A result object deserialized from the server's reply + def update_agent request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_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_agent", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Agent.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_agent REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAgentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_agent request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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_agent", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_examples REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListExamplesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListExamplesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListExamplesResponse] + # A result object deserialized from the server's reply + def list_examples request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_examples_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_examples", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListExamplesResponse.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_example REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetExampleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Example] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Example] + # A result object deserialized from the server's reply + def get_example request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_example_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_example", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Example.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_example REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateExampleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Example] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Example] + # A result object deserialized from the server's reply + def create_example request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_example_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_example", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Example.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_example REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateExampleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Example] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Example] + # A result object deserialized from the server's reply + def update_example request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_example_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_example", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Example.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_example REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteExampleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_example request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_example_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_example", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tools REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListToolsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListToolsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListToolsResponse] + # A result object deserialized from the server's reply + def list_tools request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tools_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tools", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListToolsResponse.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_tool REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetToolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Tool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Tool] + # A result object deserialized from the server's reply + def get_tool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_tool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Tool.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::Ces::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::Ces::V1beta::ListConversationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::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::Ces::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 get_conversation REST call + # + # @param request_pb [::Google::Cloud::Ces::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::Ces::V1beta::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::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::Ces::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::Ces::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 batch_delete_conversations REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_delete_conversations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_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: "batch_delete_conversations", + 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 create_tool REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateToolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Tool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Tool] + # A result object deserialized from the server's reply + def create_tool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_tool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Tool.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_tool REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateToolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Tool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Tool] + # A result object deserialized from the server's reply + def update_tool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_tool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Tool.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_tool REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteToolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_tool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_tool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_guardrails REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListGuardrailsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListGuardrailsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListGuardrailsResponse] + # A result object deserialized from the server's reply + def list_guardrails request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_guardrails_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_guardrails", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListGuardrailsResponse.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_guardrail REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetGuardrailRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Guardrail] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # A result object deserialized from the server's reply + def get_guardrail request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_guardrail_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_guardrail", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Guardrail.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_guardrail REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateGuardrailRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Guardrail] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # A result object deserialized from the server's reply + def create_guardrail request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_guardrail_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_guardrail", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Guardrail.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_guardrail REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Guardrail] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # A result object deserialized from the server's reply + def update_guardrail request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_guardrail_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_guardrail", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Guardrail.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_guardrail REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_guardrail request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_guardrail_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_guardrail", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_deployments REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListDeploymentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListDeploymentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListDeploymentsResponse] + # A result object deserialized from the server's reply + def list_deployments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_deployments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_deployments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListDeploymentsResponse.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_deployment REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # A result object deserialized from the server's reply + def get_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Deployment.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_deployment REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # A result object deserialized from the server's reply + def create_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Deployment.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_deployment REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # A result object deserialized from the server's reply + def update_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Deployment.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_deployment REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_toolsets REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListToolsetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListToolsetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListToolsetsResponse] + # A result object deserialized from the server's reply + def list_toolsets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_toolsets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_toolsets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListToolsetsResponse.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_toolset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetToolsetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Toolset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # A result object deserialized from the server's reply + def get_toolset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_toolset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_toolset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Toolset.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_toolset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateToolsetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Toolset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # A result object deserialized from the server's reply + def create_toolset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_toolset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_toolset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Toolset.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_toolset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateToolsetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Toolset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # A result object deserialized from the server's reply + def update_toolset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_toolset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_toolset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Toolset.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_toolset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteToolsetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_toolset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_toolset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_toolset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_app_versions REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListAppVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListAppVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListAppVersionsResponse] + # A result object deserialized from the server's reply + def list_app_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_app_versions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_app_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListAppVersionsResponse.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_app_version REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetAppVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::AppVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::AppVersion] + # A result object deserialized from the server's reply + def get_app_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_app_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_app_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::AppVersion.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_app_version REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAppVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::AppVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::AppVersion] + # A result object deserialized from the server's reply + def create_app_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_app_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_app_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::AppVersion.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_app_version REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_app_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_app_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_app_version", + 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 restore_app_version REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 restore_app_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restore_app_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "restore_app_version", + 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 generate_app_resource REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 generate_app_resource request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_app_resource_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "generate_app_resource", + 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 list_changelogs REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListChangelogsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListChangelogsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListChangelogsResponse] + # A result object deserialized from the server's reply + def list_changelogs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_changelogs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_changelogs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListChangelogsResponse.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_changelog REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetChangelogRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Changelog] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Changelog] + # A result object deserialized from the server's reply + def get_changelog request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_changelog_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_changelog", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Changelog.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_apps REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListAppsRequest] + # 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_apps_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/apps", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetAppRequest] + # 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_app_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAppRequest] + # 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_app_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/apps", + body: "app", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateAppRequest] + # 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_app_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{app.name}", + body: "app", + matches: [ + ["app.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAppRequest] + # 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_app_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportAppRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_app_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:exportApp", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_app REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ImportAppRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_app_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/apps:importApp", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_security_settings REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest] + # 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_security_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/securitySettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_security_settings REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest] + # 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_security_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{security_settings.name}", + body: "security_settings", + matches: [ + ["security_settings.name", %r{^projects/[^/]+/locations/[^/]+/securitySettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_agents REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListAgentsRequest] + # 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_agents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/agents", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_agent REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetAgentRequest] + # 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_agent_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/agents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_agent REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAgentRequest] + # 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_agent_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/agents", + body: "agent", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_agent REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateAgentRequest] + # 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_agent_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{agent.name}", + body: "agent", + matches: [ + ["agent.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/agents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_agent REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAgentRequest] + # 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_agent_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/agents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_examples REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListExamplesRequest] + # 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_examples_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/examples", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_example REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetExampleRequest] + # 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_example_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/examples/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_example REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateExampleRequest] + # 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_example_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/examples", + body: "example", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_example REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateExampleRequest] + # 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_example_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{example.name}", + body: "example", + matches: [ + ["example.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/examples/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_example REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteExampleRequest] + # 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_example_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/examples/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tools REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListToolsRequest] + # 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_tools_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/tools", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_tool REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetToolRequest] + # 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_tool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/tools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_conversations REST call + # + # @param request_pb [::Google::Cloud::Ces::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/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_conversation REST call + # + # @param request_pb [::Google::Cloud::Ces::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/[^/]+/apps/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_conversation REST call + # + # @param request_pb [::Google::Cloud::Ces::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/[^/]+/apps/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_delete_conversations REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_delete_conversations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/conversations:batchDelete", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_tool REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateToolRequest] + # 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_tool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/tools", + body: "tool", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_tool REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateToolRequest] + # 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_tool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{tool.name}", + body: "tool", + matches: [ + ["tool.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/tools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_tool REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteToolRequest] + # 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_tool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/tools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_guardrails REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListGuardrailsRequest] + # 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_guardrails_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/guardrails", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_guardrail REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetGuardrailRequest] + # 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_guardrail_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/guardrails/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_guardrail REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateGuardrailRequest] + # 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_guardrail_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/guardrails", + body: "guardrail", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_guardrail REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest] + # 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_guardrail_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{guardrail.name}", + body: "guardrail", + matches: [ + ["guardrail.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/guardrails/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_guardrail REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest] + # 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_guardrail_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/guardrails/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_deployments REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListDeploymentsRequest] + # 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_deployments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/deployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_deployment REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetDeploymentRequest] + # 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_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_deployment REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateDeploymentRequest] + # 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_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/deployments", + body: "deployment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_deployment REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest] + # 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_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{deployment.name}", + body: "deployment", + matches: [ + ["deployment.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_deployment REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest] + # 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_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_toolsets REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListToolsetsRequest] + # 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_toolsets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/toolsets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_toolset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetToolsetRequest] + # 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_toolset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/toolsets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_toolset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateToolsetRequest] + # 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_toolset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/toolsets", + body: "toolset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_toolset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateToolsetRequest] + # 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_toolset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{toolset.name}", + body: "toolset", + matches: [ + ["toolset.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/toolsets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_toolset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteToolsetRequest] + # 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_toolset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/toolsets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_app_versions REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListAppVersionsRequest] + # 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_app_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_app_version REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetAppVersionRequest] + # 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_app_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_app_version REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAppVersionRequest] + # 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_app_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/versions", + body: "app_version", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_app_version REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest] + # 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_app_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restore_app_version REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restore_app_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:restore", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_app_resource REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_app_resource_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}:generateAppResource", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_changelogs REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListChangelogsRequest] + # 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_changelogs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/changelogs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_changelog REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetChangelogRequest] + # 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_changelog_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/changelogs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb new file mode 100644 index 000000000000..ac4a09622c00 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb @@ -0,0 +1,132 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/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/resource_pb' +require 'google/cloud/ces/v1beta/agent_pb' +require 'google/cloud/ces/v1beta/app_pb' +require 'google/cloud/ces/v1beta/app_version_pb' +require 'google/cloud/ces/v1beta/changelog_pb' +require 'google/cloud/ces/v1beta/conversation_pb' +require 'google/cloud/ces/v1beta/deployment_pb' +require 'google/cloud/ces/v1beta/evaluation_pb' +require 'google/cloud/ces/v1beta/example_pb' +require 'google/cloud/ces/v1beta/file_context_pb' +require 'google/cloud/ces/v1beta/guardrail_pb' +require 'google/cloud/ces/v1beta/security_settings_pb' +require 'google/cloud/ces/v1beta/tool_pb' +require 'google/cloud/ces/v1beta/toolset_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n+google/cloud/ces/v1beta/agent_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/ces/v1beta/agent.proto\x1a!google/cloud/ces/v1beta/app.proto\x1a)google/cloud/ces/v1beta/app_version.proto\x1a\'google/cloud/ces/v1beta/changelog.proto\x1a*google/cloud/ces/v1beta/conversation.proto\x1a(google/cloud/ces/v1beta/deployment.proto\x1a(google/cloud/ces/v1beta/evaluation.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a*google/cloud/ces/v1beta/file_context.proto\x1a\'google/cloud/ces/v1beta/guardrail.proto\x1a/google/cloud/ces/v1beta/security_settings.proto\x1a\"google/cloud/ces/v1beta/tool.proto\x1a%google/cloud/ces/v1beta/toolset.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9e\x01\n\x0fListAppsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16\x63\x65s.googleapis.com/App\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\"q\n\x10ListAppsResponse\x12*\n\x04\x61pps\x18\x01 \x03(\x0b\x32\x1c.google.cloud.ces.v1beta.App\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"=\n\rGetAppRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\"\x87\x01\n\x10\x43reateAppRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16\x63\x65s.googleapis.com/App\x12\x13\n\x06\x61pp_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12.\n\x03\x61pp\x18\x03 \x01(\x0b\x32\x1c.google.cloud.ces.v1beta.AppB\x03\xe0\x41\x02\"x\n\x10UpdateAppRequest\x12.\n\x03\x61pp\x18\x01 \x01(\x0b\x32\x1c.google.cloud.ces.v1beta.AppB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"S\n\x10\x44\x65leteAppRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa9\x02\n\x10\x45xportAppRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12R\n\rexport_format\x18\x02 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.ExportAppRequest.ExportFormatB\x03\xe0\x41\x02\x12\x14\n\x07gcs_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12:\n\x0b\x61pp_version\x18\x04 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"A\n\x0c\x45xportFormat\x12\x1d\n\x19\x45XPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x08\n\x04YAML\x10\x02\"D\n\x11\x45xportAppResponse\x12\x15\n\x0b\x61pp_content\x18\x01 \x01(\x0cH\x00\x12\x11\n\x07\x61pp_uri\x18\x02 \x01(\tH\x00\x42\x05\n\x03\x61pp\"\x90\x04\n\x10ImportAppRequest\x12\x11\n\x07gcs_uri\x18\x04 \x01(\tH\x00\x12\x15\n\x0b\x61pp_content\x18\x05 \x01(\x0cH\x00\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16\x63\x65s.googleapis.com/App\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x61pp_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12T\n\x0eimport_options\x18\x06 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.ImportAppRequest.ImportOptionsB\x03\xe0\x41\x01\x12\x1c\n\x0fignore_app_lock\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xf6\x01\n\rImportOptions\x12}\n\x1c\x63onflict_resolution_strategy\x18\x01 \x01(\x0e\x32R.google.cloud.ces.v1beta.ImportAppRequest.ImportOptions.ConflictResolutionStrategyB\x03\xe0\x41\x01\"f\n\x1a\x43onflictResolutionStrategy\x12,\n(CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED\x10\x00\x12\x0b\n\x07REPLACE\x10\x01\x12\r\n\tOVERWRITE\x10\x02\x42\x05\n\x03\x61pp\"P\n\x11ImportAppResponse\x12)\n\x04name\x18\x01 \x01(\tB\x1b\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x10\n\x08warnings\x18\x02 \x03(\t\"\xa2\x01\n\x11ListAgentsRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x63\x65s.googleapis.com/Agent\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\"]\n\x12ListAgentsResponse\x12.\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x1e.google.cloud.ces.v1beta.Agent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"A\n\x0fGetAgentRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\"\x91\x01\n\x12\x43reateAgentRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x63\x65s.googleapis.com/Agent\x12\x15\n\x08\x61gent_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\x05\x61gent\x18\x03 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentB\x03\xe0\x41\x02\"~\n\x12UpdateAgentRequest\x12\x32\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"k\n\x12\x44\x65leteAgentRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xbe\x01\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\x1b\n\x0estatus_message\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\"\xa6\x01\n\x13ListExamplesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Example\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\"c\n\x14ListExamplesResponse\x12\x32\n\x08\x65xamples\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.Example\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x11GetExampleRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Example\"\x9b\x01\n\x14\x43reateExampleRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Example\x12\x17\n\nexample_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\x07\x65xample\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ExampleB\x03\xe0\x41\x02\"\x84\x01\n\x14UpdateExampleRequest\x12\x36\n\x07\x65xample\x18\x01 \x01(\x0b\x32 .google.cloud.ces.v1beta.ExampleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"[\n\x14\x44\x65leteExampleRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Example\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x10ListToolsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17\x63\x65s.googleapis.com/Tool\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\"Z\n\x11ListToolsResponse\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"?\n\x0eGetToolRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\"\x8c\x01\n\x11\x43reateToolRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17\x63\x65s.googleapis.com/Tool\x12\x14\n\x07tool_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x04tool\x18\x03 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolB\x03\xe0\x41\x02\"{\n\x11UpdateToolRequest\x12\x30\n\x04tool\x18\x01 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"i\n\x11\x44\x65leteToolRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x02\n\x18ListConversationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63\x65s.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\x12\x41\n\x06source\x18\x05 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x03\xe0\x41\x01\x12\x42\n\x07sources\x18\x06 \x03(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x03\xe0\x41\x01\"r\n\x19ListConversationsResponse\x12<\n\rconversations\x18\x01 \x03(\x0b\x32%.google.cloud.ces.v1beta.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x94\x01\n\x16GetConversationRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x43\n\x06source\x18\x02 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x05\x18\x01\xe0\x41\x01\"\x97\x01\n\x19\x44\x65leteConversationRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x43\n\x06source\x18\x02 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x05\x18\x01\xe0\x41\x01\"\x9a\x01\n\x1f\x42\x61tchDeleteConversationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63\x65s.googleapis.com/Conversation\x12>\n\rconversations\x18\x02 \x03(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\"|\n BatchDeleteConversationsResponse\x12\x1d\n\x15\x64\x65leted_conversations\x18\x01 \x03(\t\x12\x1c\n\x14\x66\x61iled_conversations\x18\x02 \x03(\t\x12\x1b\n\x0e\x65rror_messages\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x15ListGuardrailsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Guardrail\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\"i\n\x16ListGuardrailsResponse\x12\x36\n\nguardrails\x18\x01 \x03(\x0b\x32\".google.cloud.ces.v1beta.Guardrail\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"I\n\x13GetGuardrailRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\"\xa5\x01\n\x16\x43reateGuardrailRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Guardrail\x12\x19\n\x0cguardrail_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12:\n\tguardrail\x18\x03 \x01(\x0b\x32\".google.cloud.ces.v1beta.GuardrailB\x03\xe0\x41\x02\"\x8a\x01\n\x16UpdateGuardrailRequest\x12:\n\tguardrail\x18\x01 \x01(\x0b\x32\".google.cloud.ces.v1beta.GuardrailB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"s\n\x16\x44\x65leteGuardrailRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x16ListDeploymentsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Deployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\"l\n\x17ListDeploymentsResponse\x12\x38\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x14GetDeploymentRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\"\xaa\x01\n\x17\x43reateDeploymentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Deployment\x12\x1a\n\rdeployment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12<\n\ndeployment\x18\x02 \x01(\x0b\x32#.google.cloud.ces.v1beta.DeploymentB\x03\xe0\x41\x02\"\x8d\x01\n\x17UpdateDeploymentRequest\x12<\n\ndeployment\x18\x01 \x01(\x0b\x32#.google.cloud.ces.v1beta.DeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"a\n\x17\x44\x65leteDeploymentRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa6\x01\n\x13ListToolsetsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Toolset\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\"c\n\x14ListToolsetsResponse\x12\x32\n\x08toolsets\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.Toolset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x11GetToolsetRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\"\x9b\x01\n\x14\x43reateToolsetRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Toolset\x12\x17\n\ntoolset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\x07toolset\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetB\x03\xe0\x41\x02\"\x84\x01\n\x14UpdateToolsetRequest\x12\x36\n\x07toolset\x18\x01 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"o\n\x14\x44\x65leteToolsetRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n\x16ListAppVersionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/AppVersion\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\"m\n\x17ListAppVersionsResponse\x12\x39\n\x0c\x61pp_versions\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.AppVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x14GetAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"a\n\x17\x44\x65leteAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n\x17\x43reateAppVersionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/AppVersion\x12\x1b\n\x0e\x61pp_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12=\n\x0b\x61pp_version\x18\x03 \x01(\x0b\x32#.google.cloud.ces.v1beta.AppVersionB\x03\xe0\x41\x02\"O\n\x18RestoreAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"\x1b\n\x19RestoreAppVersionResponse\"\xee\x14\n\x1aGenerateAppResourceRequest\x12/\n\x05\x61gent\x18\x02 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentH\x00\x12-\n\x04tool\x18\x04 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolH\x00\x12\x33\n\x07toolset\x18\x06 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetH\x00\x12\x64\n\x13\x61pp_version_context\x18\x0c \x01(\x0b\x32\x45.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppVersionContextH\x00\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12h\n\x13refine_instructions\x18\x03 \x03(\x0b\x32\x46.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsB\x03\xe0\x41\x01\x12m\n\x16tool_generation_config\x18\x05 \x01(\x0b\x32H.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfigB\x03\xe0\x41\x01\x12k\n\x15\x61pp_generation_config\x18\x07 \x01(\x0b\x32G.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfigB\x03\xe0\x41\x01\x12y\n\x1c\x65valuation_generation_config\x18\x08 \x01(\x0b\x32N.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfigB\x03\xe0\x41\x01\x12\x8a\x01\n%evaluation_personas_generation_config\x18\t \x01(\x0b\x32V.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfigB\x03\xe0\x41\x01\x12\x80\x01\n quality_report_generation_config\x18\n \x01(\x0b\x32Q.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfigB\x03\xe0\x41\x01\x12p\n\x18hill_climbing_fix_config\x18\x0b \x01(\x0b\x32I.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfigB\x03\xe0\x41\x01\x1a\x88\x01\n\x11\x41ppVersionContext\x12\x37\n\x0b\x61pp_version\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12:\n\x13\x61gent_resource_name\x18\x02 \x01(\tB\x1d\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x1a\x96\x01\n\x12RefineInstructions\x12\x18\n\x0bstart_index\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x16\n\tend_index\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x33\n\nfield_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x19\n\x0cinstructions\x18\x04 \x01(\tB\x03\xe0\x41\x02\x1a\xea\x04\n\x14ToolGenerationConfig\x12\x14\n\x07\x63ontext\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12@\n\rfile_contexts\x18\x03 \x03(\x0b\x32$.google.cloud.ces.v1beta.FileContextB\x03\xe0\x41\x01\x12\x98\x01\n\"open_api_toolset_generation_config\x18\x02 \x01(\x0b\x32g.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfigB\x03\xe0\x41\x01\x1a\xde\x02\n\x1eOpenApiToolsetGenerationConfig\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\xad\x01\n\x1coperation_generation_configs\x18\x02 \x03(\x0b\x32\x81\x01.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfigB\x03\xe0\x41\x02\x1az\n\x19OperationGenerationConfig\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0crequest_json\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresponse_json\x18\x04 \x01(\tB\x03\xe0\x41\x02\x1a\xf5\x01\n\x13\x41ppGenerationConfig\x12\x14\n\x07\x63ontext\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12@\n\rfile_contexts\x18\x02 \x03(\x0b\x32$.google.cloud.ces.v1beta.FileContextB\x03\xe0\x41\x01\x12H\n\ndataset_id\x18\x03 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,contactcenterinsights.googleapis.com/Dataset\x12!\n\x14generate_evaluations\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cgcs_location\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x66\n\x1a\x45valuationGenerationConfig\x12H\n\ndataset_id\x18\x01 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,contactcenterinsights.googleapis.com/Dataset\x1a$\n\"EvaluationPersonasGenerationConfig\x1a\x61\n\x1dQualityReportGenerationConfig\x12@\n\x0e\x65valuation_run\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x1a\\\n\x15HillClimbingFixConfig\x12\x43\n\x0equality_report\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.QualityReportB\x03\xe0\x41\x02\x42\n\n\x08resource\"\xb4\x07\n\x1bGenerateAppResourceResponse\x12/\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentH\x00\x12\x33\n\x07toolset\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetH\x00\x12<\n\x0c\x61pp_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.ces.v1beta.AppSnapshotH\x00\x12K\n\x05tools\x18\x05 \x01(\x0b\x32:.google.cloud.ces.v1beta.GenerateAppResourceResponse.ToolsH\x00\x12W\n\x0b\x65valuations\x18\x06 \x01(\x0b\x32@.google.cloud.ces.v1beta.GenerateAppResourceResponse.EvaluationsH\x00\x12Z\n\rapp_resources\x18\x07 \x01(\x0b\x32\x41.google.cloud.ces.v1beta.GenerateAppResourceResponse.AppResourcesH\x00\x12@\n\x0equality_report\x18\x08 \x01(\x0b\x32&.google.cloud.ces.v1beta.QualityReportH\x00\x12\x65\n\x14generate_result_info\x18\x02 \x01(\x0b\x32G.google.cloud.ces.v1beta.GenerateAppResourceResponse.GenerateResultInfo\x1aG\n\x0b\x45valuations\x12\x38\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x1a\x35\n\x05Tools\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool\x1a\x84\x01\n\x0c\x41ppResources\x12:\n\x0c\x61pp_snapshot\x18\x01 \x01(\x0b\x32$.google.cloud.ces.v1beta.AppSnapshot\x12\x38\n\x0b\x65valuations\x18\x02 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x1a)\n\x12GenerateResultInfo\x12\x13\n\x0b\x65xplanation\x18\x01 \x01(\tB\x14\n\x12generated_resource\"\x89\x03\n\rQualityReport\x12G\n\x06issues\x18\x01 \x03(\x0b\x32\x32.google.cloud.ces.v1beta.QualityReport.AgentIssuesB\x03\xe0\x41\x01\x12\x1c\n\x0f\x65valuation_runs\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12I\n\x0egeneral_issues\x18\x03 \x03(\x0b\x32,.google.cloud.ces.v1beta.QualityReport.IssueB\x03\xe0\x41\x01\x1a`\n\x05Issue\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10occurrence_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1e\n\x11proposed_solution\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x64\n\x0b\x41gentIssues\x12\x12\n\x05\x61gent\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x06issues\x18\x02 \x03(\x0b\x32,.google.cloud.ces.v1beta.QualityReport.IssueB\x03\xe0\x41\x01\"\xeb\x04\n$GenerateAppResourceOperationMetadata\x12j\n\x0fgeneration_type\x18\x01 \x01(\x0e\x32L.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationTypeB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12/\n\x0epartial_errors\x18\x06 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\"\x91\x02\n\x0eGenerationType\x12\x1f\n\x1bGENERATION_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41GENT_RESTRUCTURE\x10\x01\x12\x10\n\x0c\x41GENT_REFINE\x10\x02\x12\x10\n\x0c\x41GENT_CREATE\x10\x03\x12\x0f\n\x0bTOOL_CREATE\x10\x04\x12\x13\n\x0fSCENARIO_CREATE\x10\x05\x12$\n SCENARIO_CREATE_FROM_TRANSCRIPTS\x10\x07\x12\x1d\n\x19\x45VALUATION_PERSONA_CREATE\x10\x06\x12\x19\n\x15QUALITY_REPORT_CREATE\x10\x08\x12\x1d\n\x19INSTRUCTION_FOLLOWING_FIX\x10\t\"\xaa\x01\n\x15ListChangelogsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Changelog\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\"i\n\x16ListChangelogsResponse\x12\x36\n\nchangelogs\x18\x01 \x03(\x0b\x32\".google.cloud.ces.v1beta.Changelog\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"I\n\x13GetChangelogRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\"W\n\x1aGetSecuritySettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/SecuritySettings\"\xa0\x01\n\x1dUpdateSecuritySettingsRequest\x12I\n\x11security_settings\x18\x01 \x01(\x0b\x32).google.cloud.ces.v1beta.SecuritySettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\xd6M\n\x0c\x41gentService\x12\x9e\x01\n\x08ListApps\x12(.google.cloud.ces.v1beta.ListAppsRequest\x1a).google.cloud.ces.v1beta.ListAppsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1beta/{parent=projects/*/locations/*}/apps\x12\x8b\x01\n\x06GetApp\x12&.google.cloud.ces.v1beta.GetAppRequest\x1a\x1c.google.cloud.ces.v1beta.App\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1beta/{name=projects/*/locations/*/apps/*}\x12\xcc\x01\n\tCreateApp\x12).google.cloud.ces.v1beta.CreateAppRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x18\n\x03\x41pp\x12\x11OperationMetadata\xda\x41\x11parent,app,app_id\xda\x41\nparent,app\x82\xd3\xe4\x93\x02\x33\",/v1beta/{parent=projects/*/locations/*}/apps:\x03\x61pp\x12\xa5\x01\n\tUpdateApp\x12).google.cloud.ces.v1beta.UpdateAppRequest\x1a\x1c.google.cloud.ces.v1beta.App\"O\xda\x41\x0f\x61pp,update_mask\x82\xd3\xe4\x93\x02\x37\x32\x30/v1beta/{app.name=projects/*/locations/*/apps/*}:\x03\x61pp\x12\xbf\x01\n\tDeleteApp\x12).google.cloud.ces.v1beta.DeleteAppRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1beta/{name=projects/*/locations/*/apps/*}\x12\xc8\x01\n\tExportApp\x12).google.cloud.ces.v1beta.ExportAppRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41&\n\x11\x45xportAppResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta/{name=projects/*/locations/*/apps/*}:exportApp:\x01*\x12\xdf\x01\n\tImportApp\x12).google.cloud.ces.v1beta.ImportAppRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41&\n\x11ImportAppResponse\x12\x11OperationMetadata\xda\x41\x1aparent,display_name,app_id\x82\xd3\xe4\x93\x02;\"6/v1beta/{parent=projects/*/locations/*}/apps:importApp:\x01*\x12\xbc\x01\n\x13GetSecuritySettings\x12\x33.google.cloud.ces.v1beta.GetSecuritySettingsRequest\x1a).google.cloud.ces.v1beta.SecuritySettings\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta/{name=projects/*/locations/*/securitySettings}\x12\x81\x02\n\x16UpdateSecuritySettings\x12\x36.google.cloud.ces.v1beta.UpdateSecuritySettingsRequest\x1a).google.cloud.ces.v1beta.SecuritySettings\"\x83\x01\xda\x41\x1dsecurity_settings,update_mask\x82\xd3\xe4\x93\x02]2H/v1beta/{security_settings.name=projects/*/locations/*/securitySettings}:\x11security_settings\x12\xad\x01\n\nListAgents\x12*.google.cloud.ces.v1beta.ListAgentsRequest\x1a+.google.cloud.ces.v1beta.ListAgentsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*/apps/*}/agents\x12\x9a\x01\n\x08GetAgent\x12(.google.cloud.ces.v1beta.GetAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/apps/*/agents/*}\x12\xc7\x01\n\x0b\x43reateAgent\x12+.google.cloud.ces.v1beta.CreateAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"k\xda\x41\x15parent,agent,agent_id\xda\x41\x0cparent,agent\x82\xd3\xe4\x93\x02>\"5/v1beta/{parent=projects/*/locations/*/apps/*}/agents:\x05\x61gent\x12\xba\x01\n\x0bUpdateAgent\x12+.google.cloud.ces.v1beta.UpdateAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"^\xda\x41\x11\x61gent,update_mask\x82\xd3\xe4\x93\x02\x44\x32;/v1beta/{agent.name=projects/*/locations/*/apps/*/agents/*}:\x05\x61gent\x12\x98\x01\n\x0b\x44\x65leteAgent\x12+.google.cloud.ces.v1beta.DeleteAgentRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta/{name=projects/*/locations/*/apps/*/agents/*}\x12\xb5\x01\n\x0cListExamples\x12,.google.cloud.ces.v1beta.ListExamplesRequest\x1a-.google.cloud.ces.v1beta.ListExamplesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1beta/{parent=projects/*/locations/*/apps/*}/examples\x12\xa2\x01\n\nGetExample\x12*.google.cloud.ces.v1beta.GetExampleRequest\x1a .google.cloud.ces.v1beta.Example\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1beta/{name=projects/*/locations/*/apps/*/examples/*}\x12\xd7\x01\n\rCreateExample\x12-.google.cloud.ces.v1beta.CreateExampleRequest\x1a .google.cloud.ces.v1beta.Example\"u\xda\x41\x19parent,example,example_id\xda\x41\x0eparent,example\x82\xd3\xe4\x93\x02\x42\"7/v1beta/{parent=projects/*/locations/*/apps/*}/examples:\x07\x65xample\x12\xc8\x01\n\rUpdateExample\x12-.google.cloud.ces.v1beta.UpdateExampleRequest\x1a .google.cloud.ces.v1beta.Example\"f\xda\x41\x13\x65xample,update_mask\x82\xd3\xe4\x93\x02J2?/v1beta/{example.name=projects/*/locations/*/apps/*/examples/*}:\x07\x65xample\x12\x9e\x01\n\rDeleteExample\x12-.google.cloud.ces.v1beta.DeleteExampleRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1beta/{name=projects/*/locations/*/apps/*/examples/*}\x12\xa9\x01\n\tListTools\x12).google.cloud.ces.v1beta.ListToolsRequest\x1a*.google.cloud.ces.v1beta.ListToolsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1beta/{parent=projects/*/locations/*/apps/*}/tools\x12\x96\x01\n\x07GetTool\x12\'.google.cloud.ces.v1beta.GetToolRequest\x1a\x1d.google.cloud.ces.v1beta.Tool\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1beta/{name=projects/*/locations/*/apps/*/tools/*}\x12\xc9\x01\n\x11ListConversations\x12\x31.google.cloud.ces.v1beta.ListConversationsRequest\x1a\x32.google.cloud.ces.v1beta.ListConversationsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12*\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.ces.v1beta.SynthesizeSpeechConfig:\x02\x38\x01\"\xd9\x02\n\x12\x41mbientSoundConfig\x12i\n\x16prebuilt_ambient_noise\x18\x01 \x01(\x0e\x32@.google.cloud.ces.v1beta.AmbientSoundConfig.PrebuiltAmbientNoiseB\x05\x18\x01\xe0\x41\x01H\x00\x12\x16\n\x07gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12%\n\x16prebuilt_ambient_sound\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0evolume_gain_db\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01\"r\n\x14PrebuiltAmbientNoise\x12&\n\"PREBUILT_AMBIENT_NOISE_UNSPECIFIED\x10\x00\x12\x10\n\x0cRETAIL_STORE\x10\x01\x12\x13\n\x0f\x43ONVENTION_HALL\x10\x02\x12\x0b\n\x07OUTDOOR\x10\x03\x42\x08\n\x06source\"Q\n\rBargeInConfig\x12\x1f\n\x10\x64isable_barge_in\x18\x01 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x1f\n\x12\x62\x61rge_in_awareness\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"H\n\x16SynthesizeSpeechConfig\x12\x12\n\x05voice\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rspeaking_rate\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\"<\n\x16MetricAnalysisSettings\x12\"\n\x15llm_metrics_opted_out\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"\xd2\x05\n\x0fLoggingSettings\x12G\n\x10redaction_config\x18\x01 \x01(\x0b\x32(.google.cloud.ces.v1beta.RedactionConfigB\x03\xe0\x41\x01\x12R\n\x16\x61udio_recording_config\x18\x02 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12]\n!unredacted_audio_recording_config\x18\x08 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12V\n\x18\x62igquery_export_settings\x18\x03 \x01(\x0b\x32/.google.cloud.ces.v1beta.BigQueryExportSettingsB\x03\xe0\x41\x01\x12R\n\x16\x63loud_logging_settings\x18\x04 \x01(\x0b\x32-.google.cloud.ces.v1beta.CloudLoggingSettingsB\x03\xe0\x41\x01\x12`\n\x1d\x63onversation_logging_settings\x18\x05 \x01(\x0b\x32\x34.google.cloud.ces.v1beta.ConversationLoggingSettingsB\x03\xe0\x41\x01\x12]\n!evaluation_audio_recording_config\x18\x06 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12V\n\x18metric_analysis_settings\x18\x07 \x01(\x0b\x32/.google.cloud.ces.v1beta.MetricAnalysisSettingsB\x03\xe0\x41\x01\"\x9d\x06\n\x15\x45rrorHandlingSettings\x12j\n\x17\x65rror_handling_strategy\x18\x01 \x01(\x0e\x32\x44.google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategyB\x03\xe0\x41\x01\x12l\n\x18\x66\x61llback_response_config\x18\x02 \x01(\x0b\x32\x45.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfigB\x03\xe0\x41\x01\x12`\n\x12\x65nd_session_config\x18\x03 \x01(\x0b\x32?.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfigB\x03\xe0\x41\x01\x1a\x86\x02\n\x16\x46\x61llbackResponseConfig\x12\x88\x01\n\x18\x63ustom_fallback_messages\x18\x01 \x03(\x0b\x32\x61.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.CustomFallbackMessagesEntryB\x03\xe0\x41\x01\x12\"\n\x15max_fallback_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a=\n\x1b\x43ustomFallbackMessagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aK\n\x10\x45ndSessionConfig\x12\"\n\x10\x65scalate_session\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x13\n\x11_escalate_session\"r\n\x15\x45rrorHandlingStrategy\x12\'\n#ERROR_HANDLING_STRATEGY_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x15\n\x11\x46\x41LLBACK_RESPONSE\x10\x02\x12\x0f\n\x0b\x45ND_SESSION\x10\x03\"\xa8\x10\n\x1b\x45valuationMetricsThresholds\x12\x89\x01\n$golden_evaluation_metrics_thresholds\x18\x01 \x01(\x0b\x32V.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholdsB\x03\xe0\x41\x01\x12~\n\x1dhallucination_metric_behavior\x18\x03 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x05\x18\x01\xe0\x41\x01\x12\x83\x01\n$golden_hallucination_metric_behavior\x18\x05 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x12\x85\x01\n&scenario_hallucination_metric_behavior\x18\x04 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x1a\x8b\t\n!GoldenEvaluationMetricsThresholds\x12\x9d\x01\n\x1dturn_level_metrics_thresholds\x18\x01 \x01(\x0b\x32q.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholdsB\x03\xe0\x41\x01\x12\xab\x01\n$expectation_level_metrics_thresholds\x18\x02 \x01(\x0b\x32x.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholdsB\x03\xe0\x41\x01\x12n\n\x16tool_matching_settings\x18\x03 \x01(\x0b\x32I.google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettingsB\x03\xe0\x41\x01\x1a\x8a\x04\n\x1aTurnLevelMetricsThresholds\x12\x37\n%semantic_similarity_success_threshold\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12?\n-overall_tool_invocation_correctness_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\xb6\x01\n\x1bsemantic_similarity_channel\x18\x03 \x01(\x0e\x32\x8b\x01.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholds.SemanticSimilarityChannelB\x03\xe0\x41\x01\"]\n\x19SemanticSimilarityChannel\x12+\n\'SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\x42(\n&_semantic_similarity_success_thresholdB0\n._overall_tool_invocation_correctness_threshold\x1a\x9a\x01\n!ExpectationLevelMetricsThresholds\x12\x41\n/tool_invocation_parameter_correctness_threshold\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x32\n0_tool_invocation_parameter_correctness_threshold\x1a\xf7\x01\n\x14ToolMatchingSettings\x12\x86\x01\n\x18\x65xtra_tool_call_behavior\x18\x01 \x01(\x0e\x32_.google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettings.ExtraToolCallBehaviorB\x03\xe0\x41\x01\"V\n\x15\x45xtraToolCallBehavior\x12(\n$EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46\x41IL\x10\x01\x12\t\n\x05\x41LLOW\x10\x02\"g\n\x1bHallucinationMetricBehavior\x12-\n)HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\"\xba\x06\n\x12\x45valuationSettings\x12w\n\x1fscenario_conversation_initiator\x18\x01 \x01(\x0e\x32I.google.cloud.ces.v1beta.EvaluationSettings.ScenarioConversationInitiatorB\x03\xe0\x41\x01\x12H\n\x11golden_run_method\x18\x04 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x01\x12h\n%golden_evaluation_tool_call_behaviour\x18\x02 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\x12j\n\'scenario_evaluation_tool_call_behaviour\x18\x03 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\x12M\n\x0emetrics_config\x18\x05 \x01(\x0b\x32\x30.google.cloud.ces.v1beta.EvaluationMetricsConfigB\x03\xe0\x41\x01\x12g\n\x17scenario_execution_mode\x18\x06 \x01(\x0e\x32\x41.google.cloud.ces.v1beta.EvaluationSettings.ScenarioExecutionModeB\x03\xe0\x41\x01\"e\n\x1dScenarioConversationInitiator\x12/\n+SCENARIO_CONVERSATION_INITIATOR_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\t\n\x05\x41GENT\x10\x02\"l\n\x15ScenarioExecutionMode\x12\'\n#SCENARIO_EXECUTION_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11QUALITY_OPTIMIZED\x10\x01\x12\x13\n\x0fSPEED_OPTIMIZED\x10\x02\"\x9b\x01\n\x19\x43lientCertificateSettings\x12\x1c\n\x0ftls_certificate\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12G\n\x0bprivate_key\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x17\n\npassphrase\x18\x03 \x01(\tB\x03\xe0\x41\x01\"-\n\rVpcScSettings\x12\x1c\n\x0f\x61llowed_origins\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x82\x01\n\x1b\x43onversationLoggingSettings\x12)\n\x1c\x64isable_conversation_logging\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x38\n\x10retention_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"9\n\x14\x43loudLoggingSettings\x12!\n\x14\x65nable_cloud_logging\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"M\n\x14\x41udioRecordingConfig\x12\x17\n\ngcs_bucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fgcs_path_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xc2\x01\n\x0fRedactionConfig\x12\x1d\n\x10\x65nable_redaction\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x10inspect_template\x18\x02 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12J\n\x13\x64\x65identify_template\x18\x03 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xbb\x02\n\x11\x44\x61taStoreSettings\x12G\n\x07\x65ngines\x18\x03 \x03(\x0b\x32\x31.google.cloud.ces.v1beta.DataStoreSettings.EngineB\x03\xe0\x41\x03\x1a\xdc\x01\n\x06\x45ngine\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%discoveryengine.googleapis.com/Engine\x12I\n\x04type\x18\x02 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.DataStoreSettings.Engine.TypeB\x03\xe0\x41\x03\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x45NGINE_TYPE_SEARCH\x10\x01\x12\x14\n\x10\x45NGINE_TYPE_CHAT\x10\x02\"\xf0\x03\n\x11\x45valuationPersona\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bpersonality\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12S\n\rspeech_config\x18\x05 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.EvaluationPersona.SpeechConfigB\x03\xe0\x41\x01\x1a\xa3\x02\n\x0cSpeechConfig\x12\x1a\n\rspeaking_rate\x18\x01 \x01(\x01\x42\x03\xe0\x41\x01\x12g\n\x0b\x65nvironment\x18\x02 \x01(\x0e\x32M.google.cloud.ces.v1beta.EvaluationPersona.SpeechConfig.BackgroundEnvironmentB\x03\xe0\x41\x01\x12\x15\n\x08voice_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x15\x42\x61\x63kgroundEnvironment\x12&\n\"BACKGROUND_ENVIRONMENT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43\x41LL_CENTER\x10\x03\x12\x0b\n\x07TRAFFIC\x10\x04\x12\x0e\n\nKIDS_NOISE\x10\x05\x12\x08\n\x04\x43\x41\x46\x45\x10\x06\x42\xfc\x04\n\x1b\x63om.google.cloud.ces.v1betaB\x08\x41ppProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41\xc8\x01\n\"dlp.googleapis.com/InspectTemplate\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\xea\x41\xd7\x01\n%dlp.googleapis.com/DeidentifyTemplate\x12[organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}\x12Qprojects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}\xea\x41z\n%discoveryengine.googleapis.com/Engine\x12Qprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + App = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.App").msgclass + App::VariableDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.App.VariableDeclaration").msgclass + App::ToolExecutionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.App.ToolExecutionMode").enummodule + TimeZoneSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TimeZoneSettings").msgclass + LanguageSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LanguageSettings").msgclass + AudioProcessingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AudioProcessingConfig").msgclass + AmbientSoundConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AmbientSoundConfig").msgclass + AmbientSoundConfig::PrebuiltAmbientNoise = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AmbientSoundConfig.PrebuiltAmbientNoise").enummodule + BargeInConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.BargeInConfig").msgclass + SynthesizeSpeechConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SynthesizeSpeechConfig").msgclass + MetricAnalysisSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.MetricAnalysisSettings").msgclass + LoggingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LoggingSettings").msgclass + ErrorHandlingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ErrorHandlingSettings").msgclass + ErrorHandlingSettings::FallbackResponseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig").msgclass + ErrorHandlingSettings::EndSessionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig").msgclass + ErrorHandlingSettings::ErrorHandlingStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategy").enummodule + EvaluationMetricsThresholds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds").msgclass + EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds").msgclass + EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholds").msgclass + EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds::SemanticSimilarityChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholds.SemanticSimilarityChannel").enummodule + EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholds").msgclass + EvaluationMetricsThresholds::ToolMatchingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettings").msgclass + EvaluationMetricsThresholds::ToolMatchingSettings::ExtraToolCallBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettings.ExtraToolCallBehavior").enummodule + EvaluationMetricsThresholds::HallucinationMetricBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehavior").enummodule + EvaluationSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationSettings").msgclass + EvaluationSettings::ScenarioConversationInitiator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationSettings.ScenarioConversationInitiator").enummodule + EvaluationSettings::ScenarioExecutionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationSettings.ScenarioExecutionMode").enummodule + ClientCertificateSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ClientCertificateSettings").msgclass + VpcScSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.VpcScSettings").msgclass + ConversationLoggingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ConversationLoggingSettings").msgclass + CloudLoggingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.CloudLoggingSettings").msgclass + AudioRecordingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AudioRecordingConfig").msgclass + RedactionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RedactionConfig").msgclass + DataStoreSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreSettings").msgclass + DataStoreSettings::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreSettings.Engine").msgclass + DataStoreSettings::Engine::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreSettings.Engine.Type").enummodule + EvaluationPersona = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationPersona").msgclass + EvaluationPersona::SpeechConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationPersona.SpeechConfig").msgclass + EvaluationPersona::SpeechConfig::BackgroundEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationPersona.SpeechConfig.BackgroundEnvironment").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/app_version_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/app_version_pb.rb new file mode 100644 index 000000000000..828d062fbb06 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/app_version_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/app_version.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/ces/v1beta/agent_pb' +require 'google/cloud/ces/v1beta/app_pb' +require 'google/cloud/ces/v1beta/example_pb' +require 'google/cloud/ces/v1beta/guardrail_pb' +require 'google/cloud/ces/v1beta/tool_pb' +require 'google/cloud/ces/v1beta/toolset_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n)google/cloud/ces/v1beta/app_version.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/ces/v1beta/agent.proto\x1a!google/cloud/ces/v1beta/app.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a\'google/cloud/ces/v1beta/guardrail.proto\x1a\"google/cloud/ces/v1beta/tool.proto\x1a%google/cloud/ces/v1beta/toolset.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x02\n\x0b\x41ppSnapshot\x12.\n\x03\x61pp\x18\x01 \x01(\x0b\x32\x1c.google.cloud.ces.v1beta.AppB\x03\xe0\x41\x01\x12\x33\n\x06\x61gents\x18\x02 \x03(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentB\x03\xe0\x41\x01\x12\x31\n\x05tools\x18\x03 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolB\x03\xe0\x41\x01\x12\x37\n\x08\x65xamples\x18\x04 \x03(\x0b\x32 .google.cloud.ces.v1beta.ExampleB\x03\xe0\x41\x01\x12;\n\nguardrails\x18\x05 \x03(\x0b\x32\".google.cloud.ces.v1beta.GuardrailB\x03\xe0\x41\x01\x12\x37\n\x08toolsets\x18\x06 \x03(\x0b\x32 .google.cloud.ces.v1beta.ToolsetB\x03\xe0\x41\x01\"\xf5\x02\n\nAppVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63reator\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x08snapshot\x18\x08 \x01(\x0b\x32$.google.cloud.ces.v1beta.AppSnapshotB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x03:\x82\x01\xea\x41\x7f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x45projects/{project}/locations/{location}/apps/{app}/versions/{version}*\x0b\x61ppVersions2\nappVersionB_\n\x1b\x63om.google.cloud.ces.v1betaB\x0f\x41ppVersionProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + AppSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AppSnapshot").msgclass + AppVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AppVersion").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/auth_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/auth_pb.rb new file mode 100644 index 000000000000..2254bee60980 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/auth_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/auth.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n\"google/cloud/ces/v1beta/auth.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa2\x02\n\x0c\x41piKeyConfig\x12\x15\n\x08key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x16\x61pi_key_secret_version\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12T\n\x10request_location\x18\x03 \x01(\x0e\x32\x35.google.cloud.ces.v1beta.ApiKeyConfig.RequestLocationB\x03\xe0\x41\x02\"Q\n\x0fRequestLocation\x12 \n\x1cREQUEST_LOCATION_UNSPECIFIED\x10\x00\x12\n\n\x06HEADER\x10\x01\x12\x10\n\x0cQUERY_STRING\x10\x02\"\xc9\x02\n\x0bOAuthConfig\x12R\n\x10oauth_grant_type\x18\x01 \x01(\x0e\x32\x33.google.cloud.ces.v1beta.OAuthConfig.OauthGrantTypeB\x03\xe0\x41\x02\x12\x16\n\tclient_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x15\x63lient_secret_version\x18\x03 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x1b\n\x0etoken_endpoint\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06scopes\x18\x05 \x03(\tB\x03\xe0\x41\x01\"I\n\x0eOauthGrantType\x12 \n\x1cOAUTH_GRANT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43LIENT_CREDENTIAL\x10\x01\"\x1f\n\x1dServiceAgentIdTokenAuthConfig\"M\n\x18ServiceAccountAuthConfig\x12\x1c\n\x0fservice_account\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\'\n\x11\x42\x65\x61rerTokenConfig\x12\x12\n\x05token\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xfb\x02\n\x11\x45ndUserAuthConfig\x12\x62\n\x17oauth2_auth_code_config\x18\x02 \x01(\x0b\x32?.google.cloud.ces.v1beta.EndUserAuthConfig.Oauth2AuthCodeConfigH\x00\x12\x64\n\x18oauth2_jwt_bearer_config\x18\x03 \x01(\x0b\x32@.google.cloud.ces.v1beta.EndUserAuthConfig.Oauth2JwtBearerConfigH\x00\x1a\x30\n\x14Oauth2AuthCodeConfig\x12\x18\n\x0boauth_token\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a[\n\x15Oauth2JwtBearerConfig\x12\x13\n\x06issuer\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07subject\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nclient_key\x18\x03 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b\x61uth_config\"\xc5\x03\n\x11\x41piAuthentication\x12\x44\n\x0e\x61pi_key_config\x18\x01 \x01(\x0b\x32%.google.cloud.ces.v1beta.ApiKeyConfigB\x03\xe0\x41\x01H\x00\x12\x41\n\x0coauth_config\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.OAuthConfigB\x03\xe0\x41\x01H\x00\x12i\n\"service_agent_id_token_auth_config\x18\x03 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.ServiceAgentIdTokenAuthConfigB\x03\xe0\x41\x01H\x00\x12]\n\x1bservice_account_auth_config\x18\x04 \x01(\x0b\x32\x31.google.cloud.ces.v1beta.ServiceAccountAuthConfigB\x03\xe0\x41\x01H\x00\x12N\n\x13\x62\x65\x61rer_token_config\x18\x05 \x01(\x0b\x32*.google.cloud.ces.v1beta.BearerTokenConfigB\x03\xe0\x41\x01H\x00\x42\r\n\x0b\x61uth_configB\xc7\x01\n\x1b\x63om.google.cloud.ces.v1betaB\tAuthProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + ApiKeyConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ApiKeyConfig").msgclass + ApiKeyConfig::RequestLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ApiKeyConfig.RequestLocation").enummodule + OAuthConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.OAuthConfig").msgclass + OAuthConfig::OauthGrantType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.OAuthConfig.OauthGrantType").enummodule + ServiceAgentIdTokenAuthConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ServiceAgentIdTokenAuthConfig").msgclass + ServiceAccountAuthConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ServiceAccountAuthConfig").msgclass + BearerTokenConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.BearerTokenConfig").msgclass + EndUserAuthConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EndUserAuthConfig").msgclass + EndUserAuthConfig::Oauth2AuthCodeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EndUserAuthConfig.Oauth2AuthCodeConfig").msgclass + EndUserAuthConfig::Oauth2JwtBearerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EndUserAuthConfig.Oauth2JwtBearerConfig").msgclass + ApiAuthentication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ApiAuthentication").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb new file mode 100644 index 000000000000..032a20df05c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/bigquery_export.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n-google/cloud/ces/v1beta/bigquery_export.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"Z\n\x16\x42igQueryExportSettings\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07project\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x64\x61taset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x63\n\x1b\x63om.google.cloud.ces.v1betaB\x13\x42igQueryExportProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + BigQueryExportSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.BigQueryExportSettings").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bindings_override.rb new file mode 100644 index 000000000000..644f518edf81 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Ces + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/ces/v1beta/rest" + # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new + # + module V1beta + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Ces"] + 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-ces-v1beta/lib/google/cloud/ces/v1beta/changelog_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/changelog_pb.rb new file mode 100644 index 000000000000..adeee4fa2dc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/changelog_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/changelog.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/ces/v1beta/changelog.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x04\n\tChangelog\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x06\x61uthor\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08resource\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rresource_type\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x61\x63tion\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x37\n\x11original_resource\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x32\n\x0cnew_resource\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x39\n\x13\x64\x65pendent_resources\x18\t \x03(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0fsequence_number\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03:\x84\x01\xea\x41\x80\x01\n\x1c\x63\x65s.googleapis.com/Changelog\x12Iprojects/{project}/locations/{location}/apps/{app}/changelogs/{changelog}*\nchangelogs2\tchangelogB^\n\x1b\x63om.google.cloud.ces.v1betaB\x0e\x43hangelogProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + Changelog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Changelog").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/client_function_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/client_function_pb.rb new file mode 100644 index 000000000000..89a344dec4e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/client_function_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/client_function.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/ces/v1beta/schema_pb' + + +descriptor_data = "\n-google/cloud/ces/v1beta/client_function.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a$google/cloud/ces/v1beta/schema.proto\"\xaf\x01\n\x0e\x43lientFunction\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\nparameters\x18\x03 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x03\xe0\x41\x01\x12\x36\n\x08response\x18\x04 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x03\xe0\x41\x01\x42\x63\n\x1b\x63om.google.cloud.ces.v1betaB\x13\x43lientFunctionProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + ClientFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ClientFunction").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/common_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/common_pb.rb new file mode 100644 index 000000000000..90335aa29435 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/common_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n$google/cloud/ces/v1beta/common.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8d\x01\n\x08\x43\x61llback\x12\x1a\n\x0bpython_code\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1bproactive_execution_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\n\n\x08\x63\x61llback\"R\n\rModelSettings\x12\x12\n\x05model\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x0btemperature\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0e\n\x0c_temperature\"\xa8\x04\n\rTriggerAction\x12]\n\x13respond_immediately\x18\x01 \x01(\x0b\x32\x39.google.cloud.ces.v1beta.TriggerAction.RespondImmediatelyB\x03\xe0\x41\x01H\x00\x12S\n\x0etransfer_agent\x18\x02 \x01(\x0b\x32\x34.google.cloud.ces.v1beta.TriggerAction.TransferAgentB\x03\xe0\x41\x01H\x00\x12Y\n\x11generative_answer\x18\x03 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.TriggerAction.GenerativeAnswerB\x03\xe0\x41\x01H\x00\x1a\x34\n\x08Response\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a]\n\x12RespondImmediately\x12G\n\tresponses\x18\x01 \x03(\x0b\x32/.google.cloud.ces.v1beta.TriggerAction.ResponseB\x03\xe0\x41\x02\x1a\'\n\x10GenerativeAnswer\x12\x13\n\x06prompt\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a@\n\rTransferAgent\x12/\n\x05\x61gent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/AgentB\x08\n\x06\x61\x63tion\"\x85\x01\n\tTlsConfig\x12@\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32).google.cloud.ces.v1beta.TlsConfig.CaCertB\x03\xe0\x41\x02\x1a\x36\n\x06\x43\x61\x43\x65rt\x12\x19\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63\x65rt\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"Z\n\x16ServiceDirectoryConfig\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\xdf\n\n\x0e\x43hannelProfile\x12\x17\n\nprofile_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0c\x63hannel_type\x18\x03 \x01(\x0e\x32\x33.google.cloud.ces.v1beta.ChannelProfile.ChannelTypeB\x03\xe0\x41\x01\x12V\n\x10persona_property\x18\x02 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.ChannelProfile.PersonaPropertyB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isable_dtmf\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12%\n\x18\x64isable_barge_in_control\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12W\n\x11web_widget_config\x18\x07 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfigB\x03\xe0\x41\x01\x12$\n\x17noise_suppression_level\x18\x08 \x01(\tB\x03\xe0\x41\x01\x1a\x99\x01\n\x0fPersonaProperty\x12U\n\x07persona\x18\x01 \x01(\x0e\x32?.google.cloud.ces.v1beta.ChannelProfile.PersonaProperty.PersonaB\x03\xe0\x41\x01\"/\n\x07Persona\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07\x43ONCISE\x10\x01\x12\n\n\x06\x43HATTY\x10\x02\x1a\x85\x05\n\x0fWebWidgetConfig\x12W\n\x08modality\x18\x01 \x01(\x0e\x32@.google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.ModalityB\x03\xe0\x41\x01\x12Q\n\x05theme\x18\x02 \x01(\x0e\x32=.google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.ThemeB\x03\xe0\x41\x01\x12\x1d\n\x10web_widget_title\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12h\n\x11security_settings\x18\x04 \x01(\x0b\x32H.google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.SecuritySettingsB\x03\xe0\x41\x01\x1a\x94\x01\n\x10SecuritySettings\x12!\n\x14\x65nable_public_access\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13\x65nable_origin_check\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x61llowed_origins\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65nable_recaptcha\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\x08Modality\x12\x18\n\x14MODALITY_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43HAT_AND_VOICE\x10\x01\x12\x0e\n\nVOICE_ONLY\x10\x02\x12\r\n\tCHAT_ONLY\x10\x03\x12\x18\n\x14\x43HAT_VOICE_AND_VIDEO\x10\x04\"3\n\x05Theme\x12\x15\n\x11THEME_UNSPECIFIED\x10\x00\x12\t\n\x05LIGHT\x10\x01\x12\x08\n\x04\x44\x41RK\x10\x02\"\xa6\x01\n\x0b\x43hannelType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06WEB_UI\x10\x02\x12\x07\n\x03\x41PI\x10\x03\x12\n\n\x06TWILIO\x10\x04\x12\x1d\n\x19GOOGLE_TELEPHONY_PLATFORM\x10\x05\x12\x1f\n\x1b\x43ONTACT_CENTER_AS_A_SERVICE\x10\x06\x12\t\n\x05\x46IVE9\x10\x07\x12\x1e\n\x1a\x43ONTACT_CENTER_INTEGRATION\x10\x08\"\x9e\x02\n\x04Span\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x30\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x30\n\nattributes\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x37\n\x0b\x63hild_spans\x18\x05 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\x03\xe0\x41\x03*R\n\rExecutionType\x12\x1e\n\x1a\x45XECUTION_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSYNCHRONOUS\x10\x01\x12\x10\n\x0c\x41SYNCHRONOUS\x10\x02\x42\xda\x01\n\x1b\x63om.google.cloud.ces.v1betaB\x0b\x43ommonProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + Callback = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Callback").msgclass + ModelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ModelSettings").msgclass + TriggerAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TriggerAction").msgclass + TriggerAction::Response = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TriggerAction.Response").msgclass + TriggerAction::RespondImmediately = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TriggerAction.RespondImmediately").msgclass + TriggerAction::GenerativeAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TriggerAction.GenerativeAnswer").msgclass + TriggerAction::TransferAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TriggerAction.TransferAgent").msgclass + TlsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TlsConfig").msgclass + TlsConfig::CaCert = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TlsConfig.CaCert").msgclass + ServiceDirectoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ServiceDirectoryConfig").msgclass + ChannelProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile").msgclass + ChannelProfile::PersonaProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.PersonaProperty").msgclass + ChannelProfile::PersonaProperty::Persona = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.PersonaProperty.Persona").enummodule + ChannelProfile::WebWidgetConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig").msgclass + ChannelProfile::WebWidgetConfig::SecuritySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.SecuritySettings").msgclass + ChannelProfile::WebWidgetConfig::Modality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.Modality").enummodule + ChannelProfile::WebWidgetConfig::Theme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.Theme").enummodule + ChannelProfile::ChannelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.ChannelType").enummodule + Span = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Span").msgclass + ExecutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExecutionType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_tool_pb.rb new file mode 100644 index 000000000000..2eb6de77f08c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_tool_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/connector_tool.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/ces/v1beta/auth_pb' + + +descriptor_data = "\n,google/cloud/ces/v1beta/connector_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\"google/cloud/ces/v1beta/auth.proto\"\xa6\x03\n\x06\x41\x63tion\x12\x1e\n\x14\x63onnection_action_id\x18\x04 \x01(\tH\x00\x12K\n\x10\x65ntity_operation\x18\x05 \x01(\x0b\x32/.google.cloud.ces.v1beta.Action.EntityOperationH\x00\x12\x19\n\x0cinput_fields\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\routput_fields\x18\x03 \x03(\tB\x03\xe0\x41\x01\x1a\xe8\x01\n\x0f\x45ntityOperation\x12\x16\n\tentity_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\toperation\x18\x02 \x01(\x0e\x32=.google.cloud.ces.v1beta.Action.EntityOperation.OperationTypeB\x03\xe0\x41\x02\"f\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04LIST\x10\x01\x12\x07\n\x03GET\x10\x02\x12\n\n\x06\x43REATE\x10\x03\x12\n\n\x06UPDATE\x10\x04\x12\n\n\x06\x44\x45LETE\x10\x05\x42\r\n\x0b\x61\x63tion_spec\"\xd1\x01\n\rConnectorTool\x12\x17\n\nconnection\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.ActionB\x03\xe0\x41\x02\x12\x44\n\x0b\x61uth_config\x18\x03 \x01(\x0b\x32*.google.cloud.ces.v1beta.EndUserAuthConfigB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x42\x62\n\x1b\x63om.google.cloud.ces.v1betaB\x12\x43onnectorToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Action").msgclass + Action::EntityOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Action.EntityOperation").msgclass + Action::EntityOperation::OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Action.EntityOperation.OperationType").enummodule + ConnectorTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ConnectorTool").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb new file mode 100644 index 000000000000..624c3212b0e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/connector_toolset.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/ces/v1beta/auth_pb' +require 'google/cloud/ces/v1beta/connector_tool_pb' + + +descriptor_data = "\n/google/cloud/ces/v1beta/connector_toolset.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\"google/cloud/ces/v1beta/auth.proto\x1a,google/cloud/ces/v1beta/connector_tool.proto\"\xb2\x01\n\x10\x43onnectorToolset\x12\x17\n\nconnection\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0b\x61uth_config\x18\x02 \x01(\x0b\x32*.google.cloud.ces.v1beta.EndUserAuthConfigB\x03\xe0\x41\x01\x12?\n\x11\x63onnector_actions\x18\x03 \x03(\x0b\x32\x1f.google.cloud.ces.v1beta.ActionB\x03\xe0\x41\x02\x42\x65\n\x1b\x63om.google.cloud.ces.v1betaB\x15\x43onnectorToolsetProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + ConnectorToolset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ConnectorToolset").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb new file mode 100644 index 000000000000..9baba3305e94 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/conversation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/ces/v1beta/common_pb' +require 'google/cloud/ces/v1beta/example_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/cloud/ces/v1beta/conversation.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\n\n\x0c\x43onversation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x05turns\x18\x06 \x03(\x0b\x32*.google.cloud.ces.v1beta.Conversation.TurnB\x03\xe0\x41\x02\x12\x17\n\nturn_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x0c\x63hannel_type\x18\x08 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.Conversation.ChannelTypeB\x02\x18\x01\x12\x41\n\x06source\x18\t \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x03\xe0\x41\x03\x12I\n\x0binput_types\x18\n \x03(\x0e\x32/.google.cloud.ces.v1beta.Conversation.InputTypeB\x03\xe0\x41\x03\x12\x35\n\x0b\x65ntry_agent\x18\x0b \x01(\tB \xe0\x41\x03\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x39\n\ndeployment\x18\x0c \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\x12:\n\x0b\x61pp_version\x18\r \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x1a\n\rlanguage_code\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x36\n\x08messages\x18\x02 \x03(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x02\x18\x01\x1av\n\x04Turn\x12\x37\n\x08messages\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01\x12\x35\n\troot_span\x18\x02 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\x03\xe0\x41\x01\"P\n\x0b\x43hannelType\x12\x1c\n\x18\x43HANNEL_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\x12\x0e\n\nMULTIMODAL\x10\x03\"S\n\x06Source\x12\x16\n\x12SOURCE_UNSPECIFIED\x10\x00\x12\x08\n\x04LIVE\x10\x01\x12\r\n\tSIMULATOR\x10\x02\x12\x08\n\x04\x45VAL\x10\x03\x12\x0e\n\nAGENT_TOOL\x10\x04\"\xcb\x01\n\tInputType\x12\x1a\n\x16INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fINPUT_TYPE_TEXT\x10\x01\x12\x14\n\x10INPUT_TYPE_EVENT\x10\x07\x12\x14\n\x10INPUT_TYPE_AUDIO\x10\x02\x12\x14\n\x10INPUT_TYPE_IMAGE\x10\x03\x12\x13\n\x0fINPUT_TYPE_BLOB\x10\x04\x12\x1c\n\x18INPUT_TYPE_TOOL_RESPONSE\x10\x05\x12\x18\n\x14INPUT_TYPE_VARIABLES\x10\x06:\x93\x01\xea\x41\x8f\x01\n\x1f\x63\x65s.googleapis.com/Conversation\x12Oprojects/{project}/locations/{location}/apps/{app}/conversations/{conversation}*\rconversations2\x0c\x63onversationBa\n\x1b\x63om.google.cloud.ces.v1betaB\x11\x43onversationProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + Conversation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Conversation").msgclass + Conversation::Turn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Conversation.Turn").msgclass + Conversation::ChannelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Conversation.ChannelType").enummodule + Conversation::Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Conversation.Source").enummodule + Conversation::InputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Conversation.InputType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_pb.rb new file mode 100644 index 000000000000..cda9a1b50916 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/data_store.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/cloud/ces/v1beta/data_store.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x91\x05\n\tDataStore\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x04type\x18\x02 \x01(\x0e\x32\x30.google.cloud.ces.v1beta.DataStore.DataStoreTypeB\x03\xe0\x41\x03\x12`\n\x18\x64ocument_processing_mode\x18\x04 \x01(\x0e\x32\x39.google.cloud.ces.v1beta.DataStore.DocumentProcessingModeB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x10\x63onnector_config\x18\x07 \x01(\x0b\x32\x32.google.cloud.ces.v1beta.DataStore.ConnectorConfigB\x03\xe0\x41\x03\x1a[\n\x0f\x43onnectorConfig\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x1f\n\x17\x63ollection_display_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x61ta_source\x18\x03 \x01(\t\"j\n\rDataStoreType\x12\x1f\n\x1b\x44\x41TA_STORE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nPUBLIC_WEB\x10\x01\x12\x10\n\x0cUNSTRUCTURED\x10\x02\x12\x07\n\x03\x46\x41Q\x10\x03\x12\r\n\tCONNECTOR\x10\x04\"]\n\x16\x44ocumentProcessingMode\x12(\n$DOCUMENT_PROCESSING_MODE_UNSPECIFIED\x10\x00\x12\r\n\tDOCUMENTS\x10\x01\x12\n\n\x06\x43HUNKS\x10\x02\x42^\n\x1b\x63om.google.cloud.ces.v1betaB\x0e\x44\x61taStoreProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + DataStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStore").msgclass + DataStore::ConnectorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStore.ConnectorConfig").msgclass + DataStore::DataStoreType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStore.DataStoreType").enummodule + DataStore::DocumentProcessingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStore.DocumentProcessingMode").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb new file mode 100644 index 000000000000..32ec69a33649 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/data_store_tool.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/ces/v1beta/common_pb' +require 'google/cloud/ces/v1beta/data_store_pb' + + +descriptor_data = "\n-google/cloud/ces/v1beta/data_store_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a(google/cloud/ces/v1beta/data_store.proto\"\xb6\x15\n\rDataStoreTool\x12X\n\x11\x64\x61ta_store_source\x18\x03 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.DataStoreTool.DataStoreSourceB\x03\xe0\x41\x01H\x00\x12Q\n\rengine_source\x18\x04 \x01(\x0b\x32\x33.google.cloud.ces.v1beta.DataStoreTool.EngineSourceB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\x0b\x62oost_specs\x18\x08 \x03(\x0b\x32\x31.google.cloud.ces.v1beta.DataStoreTool.BoostSpecsB\x03\xe0\x41\x01\x12T\n\x10modality_configs\x18\t \x03(\x0b\x32\x35.google.cloud.ces.v1beta.DataStoreTool.ModalityConfigB\x03\xe0\x41\x01\x12\x66\n\x19\x66ilter_parameter_behavior\x18\n \x01(\x0e\x32>.google.cloud.ces.v1beta.DataStoreTool.FilterParameterBehaviorB\x03\xe0\x41\x01\x1a\x81\x01\n\x0eRewriterConfig\x12\x43\n\x0emodel_settings\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.ModelSettingsB\x03\xe0\x41\x02\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x86\x01\n\x13SummarizationConfig\x12\x43\n\x0emodel_settings\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.ModelSettingsB\x03\xe0\x41\x01\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x46\n\x0fGroundingConfig\x12\x1c\n\x0fgrounding_level\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x63\n\x0f\x44\x61taStoreSource\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\ndata_store\x18\x04 \x01(\x0b\x32\".google.cloud.ces.v1beta.DataStoreB\x03\xe0\x41\x01\x1a\x91\x01\n\x0c\x45ngineSource\x12\x13\n\x06\x65ngine\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\x12\x64\x61ta_store_sources\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.DataStoreTool.DataStoreSourceB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1ak\n\nBoostSpecs\x12\x18\n\x0b\x64\x61ta_stores\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x43\n\x04spec\x18\x02 \x03(\x0b\x32\x30.google.cloud.ces.v1beta.DataStoreTool.BoostSpecB\x03\xe0\x41\x02\x1a\xc4\x07\n\tBoostSpec\x12g\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32\x43.google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpecB\x03\xe0\x41\x02\x1a\xcd\x06\n\x12\x43onditionBoostSpec\x12\x16\n\tcondition\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05\x62oost\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x12u\n\x12\x62oost_control_spec\x18\x04 \x01(\x0b\x32T.google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpecB\x03\xe0\x41\x01\x1a\x93\x05\n\x10\x42oostControlSpec\x12\x17\n\nfield_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x7f\n\x0e\x61ttribute_type\x18\x02 \x01(\x0e\x32\x62.google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeTypeB\x03\xe0\x41\x01\x12\x87\x01\n\x12interpolation_type\x18\x03 \x01(\x0e\x32\x66.google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationTypeB\x03\xe0\x41\x01\x12~\n\x0e\x63ontrol_points\x18\x04 \x03(\x0b\x32\x61.google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPointB\x03\xe0\x41\x01\x1aG\n\x0c\x43ontrolPoint\x12\x1c\n\x0f\x61ttribute_value\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x62oost_amount\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\"M\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNUMERICAL\x10\x01\x12\r\n\tFRESHNESS\x10\x02\"C\n\x11InterpolationType\x12\"\n\x1eINTERPOLATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06LINEAR\x10\x01\x1a\xbf\x03\n\x0eModalityConfig\x12^\n\rmodality_type\x18\x01 \x01(\x0e\x32\x42.google.cloud.ces.v1beta.DataStoreTool.ModalityConfig.ModalityTypeB\x03\xe0\x41\x02\x12S\n\x0frewriter_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.DataStoreTool.RewriterConfigB\x03\xe0\x41\x01\x12]\n\x14summarization_config\x18\x03 \x01(\x0b\x32:.google.cloud.ces.v1beta.DataStoreTool.SummarizationConfigB\x03\xe0\x41\x01\x12U\n\x10grounding_config\x18\x04 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.DataStoreTool.GroundingConfigB\x03\xe0\x41\x01\"B\n\x0cModalityType\x12\x1d\n\x19MODALITY_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\"k\n\x17\x46ilterParameterBehavior\x12)\n%FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41LWAYS_INCLUDE\x10\x02\x12\x11\n\rNEVER_INCLUDE\x10\x03\x42\x0f\n\rsearch_sourceBb\n\x1b\x63om.google.cloud.ces.v1betaB\x12\x44\x61taStoreToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + DataStoreTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool").msgclass + DataStoreTool::RewriterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.RewriterConfig").msgclass + DataStoreTool::SummarizationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.SummarizationConfig").msgclass + DataStoreTool::GroundingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.GroundingConfig").msgclass + DataStoreTool::DataStoreSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.DataStoreSource").msgclass + DataStoreTool::EngineSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.EngineSource").msgclass + DataStoreTool::BoostSpecs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpecs").msgclass + DataStoreTool::BoostSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec").msgclass + DataStoreTool::BoostSpec::ConditionBoostSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec").msgclass + DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec").msgclass + DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint").msgclass + DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType").enummodule + DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType").enummodule + DataStoreTool::ModalityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.ModalityConfig").msgclass + DataStoreTool::ModalityConfig::ModalityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.ModalityConfig.ModalityType").enummodule + DataStoreTool::FilterParameterBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.FilterParameterBehavior").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb new file mode 100644 index 000000000000..f9361d4e170c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/deployment.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/ces/v1beta/common_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/cloud/ces/v1beta/deployment.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x04\n\x10\x45xperimentConfig\x12V\n\x0fversion_release\x18\x01 \x01(\x0b\x32\x38.google.cloud.ces.v1beta.ExperimentConfig.VersionReleaseB\x03\xe0\x41\x01\x1a\xc7\x02\n\x0eVersionRelease\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32/.google.cloud.ces.v1beta.ExperimentConfig.StateB\x03\xe0\x41\x01\x12l\n\x13traffic_allocations\x18\x02 \x03(\x0b\x32J.google.cloud.ces.v1beta.ExperimentConfig.VersionRelease.TrafficAllocationB\x03\xe0\x41\x01\x1a\x81\x01\n\x11TrafficAllocation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12traffic_percentage\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12:\n\x0b\x61pp_version\x18\x03 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"O\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0b\n\x07\x45XPIRED\x10\x04\"\x93\x04\n\nDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12:\n\x0b\x61pp_version\x18\x02 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x45\n\x0f\x63hannel_profile\x18\x03 \x01(\x0b\x32\'.google.cloud.ces.v1beta.ChannelProfileB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12I\n\x11\x65xperiment_config\x18\t \x01(\x0b\x32).google.cloud.ces.v1beta.ExperimentConfigB\x03\xe0\x41\x01:\x89\x01\xea\x41\x85\x01\n\x1d\x63\x65s.googleapis.com/Deployment\x12Kprojects/{project}/locations/{location}/apps/{app}/deployments/{deployment}*\x0b\x64\x65ployments2\ndeploymentBc\n\x1b\x63om.google.cloud.ces.v1betaB\x13\x43hannelProfileProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + ExperimentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig").msgclass + ExperimentConfig::VersionRelease = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig.VersionRelease").msgclass + ExperimentConfig::VersionRelease::TrafficAllocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig.VersionRelease.TrafficAllocation").msgclass + ExperimentConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig.State").enummodule + Deployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Deployment").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb new file mode 100644 index 000000000000..84993a2aeb31 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/evaluation_metrics_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n7google/cloud/ces/v1beta/evaluation_metrics_config.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"\x80\x0b\n\x17\x45valuationMetricsConfig\x12h\n\x15golden_metrics_config\x18\x01 \x01(\x0b\x32\x44.google.cloud.ces.v1beta.EvaluationMetricsConfig.GoldenMetricsConfigB\x03\xe0\x41\x01\x12l\n\x17scenario_metrics_config\x18\x02 \x01(\x0b\x32\x46.google.cloud.ces.v1beta.EvaluationMetricsConfig.ScenarioMetricsConfigB\x03\xe0\x41\x01\x1aR\n\x1fSemanticSimilarityMetricsConfig\x12/\n\"enable_semantic_similarity_metrics\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1aL\n\x1cToolCorrectnessMetricsConfig\x12,\n\x1f\x65nable_tool_correctness_metrics\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1aG\n\x1aHallucinationMetricsConfig\x12)\n\x1c\x65nable_hallucination_metrics\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x45\n\x18UserGoalMetMetricsConfig\x12)\n\x1c\x65nable_user_goal_met_metrics\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1aL\n\x1c\x45xpectationsMetMetricsConfig\x12,\n\x1f\x65nable_expectations_met_metrics\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x99\x03\n\x13GoldenMetricsConfig\x12\x81\x01\n\"semantic_similarity_metrics_config\x18\x01 \x01(\x0b\x32P.google.cloud.ces.v1beta.EvaluationMetricsConfig.SemanticSimilarityMetricsConfigB\x03\xe0\x41\x01\x12{\n\x1ftool_correctness_metrics_config\x18\x02 \x01(\x0b\x32M.google.cloud.ces.v1beta.EvaluationMetricsConfig.ToolCorrectnessMetricsConfigB\x03\xe0\x41\x01\x12\x80\x01\n$step_tool_correctness_metrics_config\x18\x06 \x01(\x0b\x32M.google.cloud.ces.v1beta.EvaluationMetricsConfig.ToolCorrectnessMetricsConfigB\x03\xe0\x41\x01\x1a\x8a\x02\n\x15ScenarioMetricsConfig\x12t\n\x1cuser_goal_met_metrics_config\x18\x02 \x01(\x0b\x32I.google.cloud.ces.v1beta.EvaluationMetricsConfig.UserGoalMetMetricsConfigB\x03\xe0\x41\x01\x12{\n\x1f\x65xpectations_met_metrics_config\x18\x03 \x01(\x0b\x32M.google.cloud.ces.v1beta.EvaluationMetricsConfig.ExpectationsMetMetricsConfigB\x03\xe0\x41\x01\"d\n\x0e\x43omparisonType\x12\x1f\n\x1b\x43OMPARISON_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45QUALS\x10\x01\x12\x0c\n\x08\x43ONTAINS\x10\x02\x12\x17\n\x13SEMANTIC_SIMILARITY\x10\x03\x42l\n\x1b\x63om.google.cloud.ces.v1betaB\x1c\x45valuationMetricsConfigProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + EvaluationMetricsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsConfig").msgclass + EvaluationMetricsConfig::SemanticSimilarityMetricsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsConfig.SemanticSimilarityMetricsConfig").msgclass + EvaluationMetricsConfig::ToolCorrectnessMetricsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsConfig.ToolCorrectnessMetricsConfig").msgclass + EvaluationMetricsConfig::HallucinationMetricsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsConfig.HallucinationMetricsConfig").msgclass + EvaluationMetricsConfig::UserGoalMetMetricsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsConfig.UserGoalMetMetricsConfig").msgclass + EvaluationMetricsConfig::ExpectationsMetMetricsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsConfig.ExpectationsMetMetricsConfig").msgclass + EvaluationMetricsConfig::GoldenMetricsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsConfig.GoldenMetricsConfig").msgclass + EvaluationMetricsConfig::ScenarioMetricsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsConfig.ScenarioMetricsConfig").msgclass + EvaluationMetricsConfig::ComparisonType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsConfig.ComparisonType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb new file mode 100644 index 000000000000..f8ffef53ac55 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/evaluation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/ces/v1beta/app_pb' +require 'google/cloud/ces/v1beta/common_pb' +require 'google/cloud/ces/v1beta/evaluation_metrics_config_pb' +require 'google/cloud/ces/v1beta/example_pb' +require 'google/cloud/ces/v1beta/fakes_pb' +require 'google/cloud/ces/v1beta/golden_run_pb' +require 'google/cloud/ces/v1beta/session_service_pb' +require 'google/cloud/ces/v1beta/toolset_tool_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n(google/cloud/ces/v1beta/evaluation.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a!google/cloud/ces/v1beta/app.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x37google/cloud/ces/v1beta/evaluation_metrics_config.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a#google/cloud/ces/v1beta/fakes.proto\x1a(google/cloud/ces/v1beta/golden_run.proto\x1a-google/cloud/ces/v1beta/session_service.proto\x1a*google/cloud/ces/v1beta/toolset_tool.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xeb\r\n\x11\x41ggregatedMetrics\x12\x63\n\x16metrics_by_app_version\x18\x03 \x03(\x0b\x32>.google.cloud.ces.v1beta.AggregatedMetrics.MetricsByAppVersionB\x03\xe0\x41\x03\x1an\n\x0bToolMetrics\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x17\n\npass_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nfail_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x1aM\n\x12TurnLatencyMetrics\x12\x37\n\x0f\x61verage_latency\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x80\x01\n\x16ToolCallLatencyMetrics\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x37\n\x0f\x61verage_latency\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a/\n\x19SemanticSimilarityMetrics\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a*\n\x14HallucinationMetrics\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a\xb1\x05\n\x13MetricsByAppVersion\x12\x1b\n\x0e\x61pp_version_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12Q\n\x0ctool_metrics\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.AggregatedMetrics.ToolMetricsB\x03\xe0\x41\x03\x12n\n\x1bsemantic_similarity_metrics\x18\x03 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.AggregatedMetrics.SemanticSimilarityMetricsB\x03\xe0\x41\x03\x12\x63\n\x15hallucination_metrics\x18\x05 \x03(\x0b\x32?.google.cloud.ces.v1beta.AggregatedMetrics.HallucinationMetricsB\x03\xe0\x41\x03\x12i\n\x19tool_call_latency_metrics\x18\x06 \x03(\x0b\x32\x41.google.cloud.ces.v1beta.AggregatedMetrics.ToolCallLatencyMetricsB\x03\xe0\x41\x03\x12`\n\x14turn_latency_metrics\x18\x07 \x03(\x0b\x32=.google.cloud.ces.v1beta.AggregatedMetrics.TurnLatencyMetricsB\x03\xe0\x41\x03\x12\x17\n\npass_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nfail_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12V\n\x0fmetrics_by_turn\x18\x04 \x03(\x0b\x32\x38.google.cloud.ces.v1beta.AggregatedMetrics.MetricsByTurnB\x03\xe0\x41\x03\x1a\x9d\x04\n\rMetricsByTurn\x12\x17\n\nturn_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12Q\n\x0ctool_metrics\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.AggregatedMetrics.ToolMetricsB\x03\xe0\x41\x03\x12n\n\x1bsemantic_similarity_metrics\x18\x03 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.AggregatedMetrics.SemanticSimilarityMetricsB\x03\xe0\x41\x03\x12\x63\n\x15hallucination_metrics\x18\x04 \x03(\x0b\x32?.google.cloud.ces.v1beta.AggregatedMetrics.HallucinationMetricsB\x03\xe0\x41\x03\x12i\n\x19tool_call_latency_metrics\x18\x05 \x03(\x0b\x32\x41.google.cloud.ces.v1beta.AggregatedMetrics.ToolCallLatencyMetricsB\x03\xe0\x41\x03\x12`\n\x14turn_latency_metrics\x18\x06 \x03(\x0b\x32=.google.cloud.ces.v1beta.AggregatedMetrics.TurnLatencyMetricsB\x03\xe0\x41\x03\"\xeb\"\n\nEvaluation\x12\x41\n\x06golden\x18\x0b \x01(\x0b\x32*.google.cloud.ces.v1beta.Evaluation.GoldenB\x03\xe0\x41\x01H\x00\x12\x45\n\x08scenario\x18\x0c \x01(\x0b\x32,.google.cloud.ces.v1beta.Evaluation.ScenarioB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12I\n\x13\x65valuation_datasets\x18\x05 \x03(\tB,\xe0\x41\x03\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x0f\x65valuation_runs\x18\x0f \x03(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x03\x12K\n\x12\x61ggregated_metrics\x18\x10 \x01(\x0b\x32*.google.cloud.ces.v1beta.AggregatedMetricsB\x03\xe0\x41\x03\x12M\n\x15last_completed_result\x18\x11 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationResultB\x03\xe0\x41\x03\x12\x14\n\x07invalid\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12H\n\x10last_ten_results\x18\x13 \x03(\x0b\x32).google.cloud.ces.v1beta.EvaluationResultB\x03\xe0\x41\x03\x12h\n%evaluation_metrics_threshold_override\x18\x14 \x01(\x0b\x32\x34.google.cloud.ces.v1beta.EvaluationMetricsThresholdsB\x03\xe0\x41\x01\x12\x61\n\"evaluation_metrics_config_override\x18\x15 \x01(\x0b\x32\x30.google.cloud.ces.v1beta.EvaluationMetricsConfigB\x03\xe0\x41\x01\x1a\xc1\x08\n\x11GoldenExpectation\x12;\n\ttool_call\x18\x02 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x01H\x00\x12\x43\n\rtool_response\x18\x03 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x01H\x00\x12?\n\x0e\x61gent_response\x18\x04 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01H\x00\x12\x45\n\x0e\x61gent_transfer\x18\x05 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x01H\x00\x12\x39\n\x11updated_variables\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x00\x12H\n\x12mock_tool_response\x18\x07 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x01H\x00\x12\x1c\n\rno_tool_calls\x18\r \x01(\x08\x42\x03\xe0\x41\x01H\x00\x12\x11\n\x04note\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fskip_evaluation\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\xb4\x01\n-expectation_level_metrics_thresholds_override\x18\t \x01(\x0b\x32x.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholdsB\x03\xe0\x41\x01\x12\x99\x01\n:agent_response_semantic_similarity_metrics_config_override\x18\n \x01(\x0b\x32P.google.cloud.ces.v1beta.EvaluationMetricsConfig.SemanticSimilarityMetricsConfigB\x03\xe0\x41\x01\x12\x8e\x01\n4agent_response_hallucination_metrics_config_override\x18\x0b \x01(\x0b\x32K.google.cloud.ces.v1beta.EvaluationMetricsConfig.HallucinationMetricsConfigB\x03\xe0\x41\x01\x12]\n\x0f\x63omparison_type\x18\x0c \x01(\x0e\x32?.google.cloud.ces.v1beta.EvaluationMetricsConfig.ComparisonTypeB\x03\xe0\x41\x01\x42\x0b\n\tcondition\x1a\xea\x01\n\x04Step\x12@\n\nuser_input\x18\x01 \x01(\x0b\x32%.google.cloud.ces.v1beta.SessionInputB\x03\xe0\x41\x01H\x00\x12\x45\n\x0e\x61gent_transfer\x18\x02 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x01H\x00\x12Q\n\x0b\x65xpectation\x18\x03 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.GoldenExpectationB\x03\xe0\x41\x01H\x00\x42\x06\n\x04step\x1a\xb2\x03\n\nGoldenTurn\x12<\n\x05steps\x18\x01 \x03(\x0b\x32(.google.cloud.ces.v1beta.Evaluation.StepB\x03\xe0\x41\x02\x12\x35\n\troot_span\x18\x02 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\x03\xe0\x41\x01\x12\xa6\x01\n&turn_level_metrics_thresholds_override\x18\x03 \x01(\x0b\x32q.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholdsB\x03\xe0\x41\x01\x12\x85\x01\n&hallucination_metric_behavior_override\x18\x04 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x1a\x9f\x01\n\x06Golden\x12\x42\n\x05turns\x18\x02 \x03(\x0b\x32..google.cloud.ces.v1beta.Evaluation.GoldenTurnB\x03\xe0\x41\x02\x12Q\n\x17\x65valuation_expectations\x18\x03 \x03(\tB0\xe0\x41\x01\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x1a\xef\x02\n\x13ScenarioExpectation\x12h\n\x10tool_expectation\x18\x01 \x01(\x0b\x32G.google.cloud.ces.v1beta.Evaluation.ScenarioExpectation.ToolExpectationB\x03\xe0\x41\x01H\x00\x12?\n\x0e\x61gent_response\x18\x02 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01H\x00\x1a\x9d\x01\n\x0fToolExpectation\x12\x42\n\x12\x65xpected_tool_call\x18\x01 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x02\x12\x46\n\x12mock_tool_response\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x02\x42\r\n\x0b\x65xpectation\x1a\xda\x07\n\x08Scenario\x12\x11\n\x04task\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\nuser_facts\x18\x04 \x03(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.Scenario.UserFactB\x03\xe0\x41\x01\x12\x16\n\tmax_turns\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07rubrics\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12[\n\x15scenario_expectations\x18\x03 \x03(\x0b\x32\x37.google.cloud.ces.v1beta.Evaluation.ScenarioExpectationB\x03\xe0\x41\x02\x12\x38\n\x12variable_overrides\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12l\n\x18task_completion_behavior\x18\x07 \x01(\x0e\x32\x43.google.cloud.ces.v1beta.Evaluation.Scenario.TaskCompletionBehaviorB\x05\x18\x01\xe0\x41\x01\x12^\n\x12user_goal_behavior\x18\x08 \x01(\x0e\x32=.google.cloud.ces.v1beta.Evaluation.Scenario.UserGoalBehaviorB\x03\xe0\x41\x01\x12Q\n\x17\x65valuation_expectations\x18\n \x03(\tB0\xe0\x41\x01\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12g\n\x17scenario_execution_mode\x18\x0c \x01(\x0e\x32\x41.google.cloud.ces.v1beta.EvaluationSettings.ScenarioExecutionModeB\x03\xe0\x41\x01\x1a\x31\n\x08UserFact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x16TaskCompletionBehavior\x12(\n$TASK_COMPLETION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x12\n\x0eTASK_SATISFIED\x10\x01\x12\x11\n\rTASK_REJECTED\x10\x02\"~\n\x10UserGoalBehavior\x12\"\n\x1eUSER_GOAL_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x17\n\x13USER_GOAL_SATISFIED\x10\x01\x12\x16\n\x12USER_GOAL_REJECTED\x10\x02\x12\x15\n\x11USER_GOAL_IGNORED\x10\x03:\x89\x01\xea\x41\x85\x01\n\x1d\x63\x65s.googleapis.com/Evaluation\x12Kprojects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}*\x0b\x65valuations2\nevaluationB\x08\n\x06inputs\"\xb0\x04\n\x11\x45valuationDataset\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12:\n\x0b\x65valuations\x18\x03 \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12K\n\x12\x61ggregated_metrics\x18\t \x01(\x0b\x32*.google.cloud.ces.v1beta.AggregatedMetricsB\x03\xe0\x41\x03:\xad\x01\xea\x41\xa9\x01\n$ces.googleapis.com/EvaluationDataset\x12Zprojects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluation_dataset}*\x12\x65valuationDatasets2\x11\x65valuationDataset\"\x95\x38\n\x10\x45valuationResult\x12T\n\rgolden_result\x18\x07 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.EvaluationResult.GoldenResultB\x03\xe0\x41\x03H\x00\x12X\n\x0fscenario_result\x18\x08 \x01(\x0b\x32\x38.google.cloud.ces.v1beta.EvaluationResult.ScenarioResultB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x11\x65valuation_status\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12@\n\x0e\x65valuation_run\x18\x06 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12@\n\x07persona\x18\x11 \x01(\x0b\x32*.google.cloud.ces.v1beta.EvaluationPersonaB\x03\xe0\x41\x03\x12\x45\n\nerror_info\x18\x0f \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12(\n\x05\x65rror\x18\x0e \x01(\x0b\x32\x12.google.rpc.StatusB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cinitiated_by\x18\t \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x61pp_version\x18\n \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12%\n\x18\x61pp_version_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x37\n\tchangelog\x18\x15 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\x12>\n\x15\x63hangelog_create_time\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x0f\x65xecution_state\x18\x0b \x01(\x0e\x32\x38.google.cloud.ces.v1beta.EvaluationResult.ExecutionStateB\x03\xe0\x41\x03\x12`\n\x1d\x65valuation_metrics_thresholds\x18\x0c \x01(\x0b\x32\x34.google.cloud.ces.v1beta.EvaluationMetricsThresholdsB\x03\xe0\x41\x03\x12>\n\x06\x63onfig\x18\x12 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x03\x12H\n\x11golden_run_method\x18\x13 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x03\x1a\xde\x07\n\x18GoldenExpectationOutcome\x12\x44\n\x12observed_tool_call\x18\x02 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x03H\x00\x12L\n\x16observed_tool_response\x18\x03 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x03H\x00\x12H\n\x17observed_agent_response\x18\x04 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x03H\x00\x12N\n\x17observed_agent_transfer\x18\x05 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x03H\x00\x12\x38\n\x10observed_payload\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03H\x00\x12O\n\x0b\x65xpectation\x18\x01 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.GoldenExpectationB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x06 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12m\n\x1asemantic_similarity_result\x18\x07 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResultB\x05\x18\x01\xe0\x41\x03\x12|\n\x16tool_invocation_result\x18\x08 \x01(\x0b\x32W.google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcome.ToolInvocationResultB\x03\xe0\x41\x03\x1a\xc8\x01\n\x14ToolInvocationResult\x12-\n\x1bparameter_correctness_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12G\n\x07outcome\x18\x02 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x1e\n\x1c_parameter_correctness_scoreB\x08\n\x06result\x1a\xe7\x01\n\x1b\x45valuationExpectationResult\x12P\n\x16\x65valuation_expectation\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x03 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\x91\t\n\x0cGoldenResult\x12i\n\x13turn_replay_results\x18\x01 \x03(\x0b\x32G.google.cloud.ces.v1beta.EvaluationResult.GoldenResult.TurnReplayResultB\x03\xe0\x41\x03\x12r\n\x1e\x65valuation_expectation_results\x18\x02 \x03(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.EvaluationExpectationResultB\x03\xe0\x41\x03\x1a\xa1\x07\n\x10TurnReplayResult\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x64\n\x13\x65xpectation_outcome\x18\x02 \x03(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcomeB\x03\xe0\x41\x03\x12`\n\x14hallucination_result\x18\x03 \x01(\x0b\x32=.google.cloud.ces.v1beta.EvaluationResult.HallucinationResultB\x03\xe0\x41\x03\x12$\n\x15tool_invocation_score\x18\x04 \x01(\x02\x42\x05\x18\x01\xe0\x41\x03\x12/\n\x1dtool_ordered_invocation_score\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x34\n\x0cturn_latency\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12[\n\x13tool_call_latencies\x18\x07 \x03(\x0b\x32\x39.google.cloud.ces.v1beta.EvaluationResult.ToolCallLatencyB\x03\xe0\x41\x03\x12k\n\x1asemantic_similarity_result\x18\x08 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResultB\x03\xe0\x41\x03\x12r\n\x1eoverall_tool_invocation_result\x18\t \x01(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.OverallToolInvocationResultB\x03\xe0\x41\x03\x12\x45\n\nerror_info\x18\n \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12R\n\x0espan_latencies\x18\x0b \x03(\x0b\x32\x35.google.cloud.ces.v1beta.EvaluationResult.SpanLatencyB\x03\xe0\x41\x03\x42 \n\x1e_tool_ordered_invocation_score\x1ao\n\x15ScenarioRubricOutcome\x12\x13\n\x06rubric\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\x05score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x11score_explanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\x99\x04\n\x1aScenarioExpectationOutcome\x12x\n\x12observed_tool_call\x18\x02 \x01(\x0b\x32U.google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcome.ObservedToolCallB\x03\xe0\x41\x03H\x00\x12H\n\x17observed_agent_response\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x03H\x00\x12Q\n\x0b\x65xpectation\x18\x01 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.Evaluation.ScenarioExpectationB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x1a\x90\x01\n\x10ObservedToolCall\x12\x39\n\ttool_call\x18\x01 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x03\x12\x41\n\rtool_response\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x03\x42\x08\n\x06result\x1a\xdc\x08\n\x0eScenarioResult\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x11\n\x04task\x18\n \x01(\tB\x03\xe0\x41\x03\x12N\n\nuser_facts\x18\x0b \x03(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.Scenario.UserFactB\x03\xe0\x41\x03\x12g\n\x14\x65xpectation_outcomes\x18\x02 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcomeB\x03\xe0\x41\x03\x12]\n\x0frubric_outcomes\x18\x03 \x03(\x0b\x32?.google.cloud.ces.v1beta.EvaluationResult.ScenarioRubricOutcomeB\x03\xe0\x41\x03\x12`\n\x14hallucination_result\x18\x04 \x03(\x0b\x32=.google.cloud.ces.v1beta.EvaluationResult.HallucinationResultB\x03\xe0\x41\x03\x12\x65\n\x16task_completion_result\x18\x05 \x01(\x0b\x32>.google.cloud.ces.v1beta.EvaluationResult.TaskCompletionResultB\x05\x18\x01\xe0\x41\x03\x12[\n\x13tool_call_latencies\x18\x06 \x03(\x0b\x32\x39.google.cloud.ces.v1beta.EvaluationResult.ToolCallLatencyB\x03\xe0\x41\x03\x12p\n\x1duser_goal_satisfaction_result\x18\x07 \x01(\x0b\x32\x44.google.cloud.ces.v1beta.EvaluationResult.UserGoalSatisfactionResultB\x03\xe0\x41\x03\x12,\n\x1a\x61ll_expectations_satisfied\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12 \n\x0etask_completed\x18\t \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12R\n\x0espan_latencies\x18\x0c \x03(\x0b\x32\x35.google.cloud.ces.v1beta.EvaluationResult.SpanLatencyB\x03\xe0\x41\x03\x12r\n\x1e\x65valuation_expectation_results\x18\r \x03(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.EvaluationExpectationResultB\x03\xe0\x41\x03\x42\x1d\n\x1b_all_expectations_satisfiedB\x11\n\x0f_task_completed\x1a\x81\x04\n\x0bSpanLatency\x12\x17\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12<\n\x07toolset\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x03H\x00\x12\x14\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x17\n\x08\x63\x61llback\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x12M\n\x04type\x18\x01 \x01(\x0e\x32:.google.cloud.ces.v1beta.EvaluationResult.SpanLatency.TypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x11\x65xecution_latency\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\"Q\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TOOL\x10\x01\x12\x11\n\rUSER_CALLBACK\x10\x02\x12\r\n\tGUARDRAIL\x10\x03\x12\x07\n\x03LLM\x10\x04\x42\x0c\n\nidentifier\x1a\xfe\x01\n\x0fToolCallLatency\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x11\x65xecution_latency\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x66\n\x13HallucinationResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1am\n\x1aUserGoalSatisfactionResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\xb4\x01\n\x18SemanticSimilarityResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\xa4\x01\n\x1bOverallToolInvocationResult\x12\"\n\x15tool_invocation_score\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12G\n\x07outcome\x18\x02 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x42\x18\n\x16_tool_invocation_score\x1ag\n\x14TaskCompletionResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\"C\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x08\n\x04PASS\x10\x01\x12\x08\n\x04\x46\x41IL\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"s\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x05\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\r\n\tCANCELLED\x10\x04:\xb7\x01\xea\x41\xb3\x01\n#ces.googleapis.com/EvaluationResult\x12gprojects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result}*\x11\x65valuationResults2\x10\x65valuationResultB\x08\n\x06result\"\xfa\x11\n\rEvaluationRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12G\n\x12\x65valuation_results\x18\x03 \x03(\tB+\xe0\x41\x03\xfa\x41%\n#ces.googleapis.com/EvaluationResult\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0cinitiated_by\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x61pp_version\x18\x06 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12%\n\x18\x61pp_version_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x37\n\tchangelog\x18\x16 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\x12>\n\x15\x63hangelog_create_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12:\n\x0b\x65valuations\x18\x07 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12H\n\x12\x65valuation_dataset\x18\x08 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12S\n\x0f\x65valuation_type\x18\t \x01(\x0e\x32\x35.google.cloud.ces.v1beta.EvaluationRun.EvaluationTypeB\x03\xe0\x41\x03\x12M\n\x05state\x18\n \x01(\x0e\x32\x39.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunStateB\x03\xe0\x41\x03\x12\x46\n\x08progress\x18\x0b \x01(\x0b\x32/.google.cloud.ces.v1beta.EvaluationRun.ProgressB\x03\xe0\x41\x03\x12>\n\x06\x63onfig\x18\x0c \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x03\x12(\n\x05\x65rror\x18\x0e \x01(\x0b\x32\x12.google.rpc.StatusB\x05\x18\x01\xe0\x41\x03\x12\x45\n\nerror_info\x18\x11 \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12i\n\x18\x65valuation_run_summaries\x18\x0f \x03(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunSummariesEntryB\x03\xe0\x41\x03\x12\x43\n\x0elatency_report\x18\x19 \x01(\x0b\x32&.google.cloud.ces.v1beta.LatencyReportB\x03\xe0\x41\x03\x12\x16\n\trun_count\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x13persona_run_configs\x18\x12 \x03(\x0b\x32).google.cloud.ces.v1beta.PersonaRunConfigB\x03\xe0\x41\x03\x12M\n\x13optimization_config\x18\x13 \x01(\x0b\x32+.google.cloud.ces.v1beta.OptimizationConfigB\x03\xe0\x41\x01\x12S\n\x18scheduled_evaluation_run\x18\x14 \x01(\tB1\xe0\x41\x03\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12H\n\x11golden_run_method\x18\x15 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x03\x12\x16\n\toperation\x18\x1a \x01(\tB\x03\xe0\x41\x03\x1a\xb0\x01\n\x08Progress\x12\x18\n\x0btotal_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65rror_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63ompleted_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cpassed_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63\x61ncelled_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x1a\x66\n\x14\x45valuationRunSummary\x12\x19\n\x0cpassed_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65rror_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x1az\n\x1b\x45valuationRunSummariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunSummary:\x02\x38\x01\"V\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOLDEN\x10\x01\x12\x0c\n\x08SCENARIO\x10\x02\x12\t\n\x05MIXED\x10\x03\"|\n\x12\x45valuationRunState\x12$\n EVALUATION_RUN_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x05\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\r\n\tCANCELLED\x10\x04:\x99\x01\xea\x41\x95\x01\n ces.googleapis.com/EvaluationRun\x12Rprojects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}*\x0e\x65valuationRuns2\revaluationRun\"\xaa\n\n\rLatencyReport\x12R\n\x0etool_latencies\x18\x01 \x03(\x0b\x32\x32.google.cloud.ces.v1beta.LatencyReport.ToolLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12Z\n\x12\x63\x61llback_latencies\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.LatencyReport.CallbackLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12\\\n\x13guardrail_latencies\x18\x03 \x03(\x0b\x32\x37.google.cloud.ces.v1beta.LatencyReport.GuardrailLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12Y\n\x12llm_call_latencies\x18\x04 \x03(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LlmCallLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12\x1a\n\rsession_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x1a\xc8\x01\n\x0eLatencyMetrics\x12\x33\n\x0bp50_latency\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x33\n\x0bp90_latency\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x33\n\x0bp99_latency\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x17\n\ncall_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x1a\x89\x02\n\x0bToolLatency\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x03H\x00\x12\x1e\n\x11tool_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x04 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x42\x11\n\x0ftool_identifier\x1az\n\x0f\x43\x61llbackLatency\x12\x12\n\x05stage\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x02 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x1a\xc5\x01\n\x10GuardrailLatency\x12\x37\n\tguardrail\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12#\n\x16guardrail_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x03 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x1ay\n\x0eLlmCallLatency\x12\x12\n\x05model\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x02 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\"\xa4\x04\n\x15\x45valuationExpectation\x12W\n\x0cllm_criteria\x18\x03 \x01(\x0b\x32:.google.cloud.ces.v1beta.EvaluationExpectation.LlmCriteriaB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04tags\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x1a\"\n\x0bLlmCriteria\x12\x13\n\x06prompt\x18\x01 \x01(\tB\x03\xe0\x41\x02:\xc1\x01\xea\x41\xbd\x01\n(ces.googleapis.com/EvaluationExpectation\x12\x62projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}*\x16\x65valuationExpectations2\x15\x65valuationExpectationB\n\n\x08\x63riteria\"\xb4\x03\n\x10\x45valuationConfig\x12L\n\x12input_audio_config\x18\x01 \x01(\x0b\x32).google.cloud.ces.v1beta.InputAudioConfigB\x05\x18\x01\xe0\x41\x01\x12N\n\x13output_audio_config\x18\x02 \x01(\x0b\x32*.google.cloud.ces.v1beta.OutputAudioConfigB\x05\x18\x01\xe0\x41\x01\x12\\\n\x12\x65valuation_channel\x18\x03 \x01(\x0e\x32;.google.cloud.ces.v1beta.EvaluationConfig.EvaluationChannelB\x03\xe0\x41\x01\x12V\n\x13tool_call_behaviour\x18\x04 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\"L\n\x11\x45valuationChannel\x12\"\n\x1e\x45VALUATION_CHANNEL_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\"\x97\x03\n\x13\x45valuationErrorInfo\x12O\n\nerror_type\x18\x01 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.EvaluationErrorInfo.ErrorTypeB\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsession_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19user_facing_error_message\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\tErrorType\x12\x1a\n\x16\x45RROR_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fRUNTIME_FAILURE\x10\x01\x12\"\n\x1e\x43ONVERSATION_RETRIEVAL_FAILURE\x10\x02\x12\x1e\n\x1aMETRIC_CALCULATION_FAILURE\x10\x03\x12\x1d\n\x19\x45VALUATION_UPDATE_FAILURE\x10\x04\x12\x13\n\x0fQUOTA_EXHAUSTED\x10\x05\x12\x1b\n\x17USER_SIMULATION_FAILURE\x10\x06\"\xec\x05\n\x14RunEvaluationRequest\x12+\n\x03\x61pp\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12:\n\x0b\x65valuations\x18\x02 \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12H\n\x12\x65valuation_dataset\x18\x03 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12:\n\x0b\x61pp_version\x18\x06 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12>\n\x06\x63onfig\x18\x08 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x01\x12\x1b\n\trun_count\x18\t \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12K\n\x13persona_run_configs\x18\n \x03(\x0b\x32).google.cloud.ces.v1beta.PersonaRunConfigB\x03\xe0\x41\x01\x12M\n\x13optimization_config\x18\x0b \x01(\x0b\x32+.google.cloud.ces.v1beta.OptimizationConfigB\x03\xe0\x41\x01\x12S\n\x18scheduled_evaluation_run\x18\x0c \x01(\tB1\xe0\x41\x01\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12H\n\x11golden_run_method\x18\r \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x01\x12$\n\x17generate_latency_report\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x42\x0c\n\n_run_count\"\xe9\x08\n\x16ScheduledEvaluationRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07request\x18\x03 \x01(\x0b\x32-.google.cloud.ces.v1beta.RunEvaluationRequestB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12`\n\x11scheduling_config\x18\x05 \x01(\x0b\x32@.google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfigB\x03\xe0\x41\x02\x12\x13\n\x06\x61\x63tive\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x12last_completed_run\x18\x07 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x1d\n\x10total_executions\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x46\n\x1dnext_scheduled_execution_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0e \x01(\tB\x03\xe0\x41\x03\x1a\x9d\x02\n\x10SchedulingConfig\x12\x62\n\tfrequency\x18\x01 \x01(\x0e\x32J.google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfig.FrequencyB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x19\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x05\x42\x03\xe0\x41\x01\"U\n\tFrequency\x12\x19\n\x15\x46REQUENCY_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0c\n\x08\x42IWEEKLY\x10\x04:\xc7\x01\xea\x41\xc3\x01\n)ces.googleapis.com/ScheduledEvaluationRun\x12\x65projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}*\x17scheduledEvaluationRuns2\x16scheduledEvaluationRun\"A\n\x10PersonaRunConfig\x12\x14\n\x07persona\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ntask_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"\x9b\x03\n\x12OptimizationConfig\x12!\n\x14generate_loss_report\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11\x61ssistant_session\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0ereport_summary\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12should_suggest_fix\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12S\n\x06status\x18\x04 \x01(\x0e\x32>.google.cloud.ces.v1beta.OptimizationConfig.OptimizationStatusB\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x31\n\x0bloss_report\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\"`\n\x12OptimizationStatus\x12#\n\x1fOPTIMIZATION_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42_\n\x1b\x63om.google.cloud.ces.v1betaB\x0f\x45valuationProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + AggregatedMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics").msgclass + AggregatedMetrics::ToolMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.ToolMetrics").msgclass + AggregatedMetrics::TurnLatencyMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.TurnLatencyMetrics").msgclass + AggregatedMetrics::ToolCallLatencyMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.ToolCallLatencyMetrics").msgclass + AggregatedMetrics::SemanticSimilarityMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.SemanticSimilarityMetrics").msgclass + AggregatedMetrics::HallucinationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.HallucinationMetrics").msgclass + AggregatedMetrics::MetricsByAppVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.MetricsByAppVersion").msgclass + AggregatedMetrics::MetricsByTurn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.MetricsByTurn").msgclass + Evaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation").msgclass + Evaluation::GoldenExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.GoldenExpectation").msgclass + Evaluation::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Step").msgclass + Evaluation::GoldenTurn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.GoldenTurn").msgclass + Evaluation::Golden = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Golden").msgclass + Evaluation::ScenarioExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.ScenarioExpectation").msgclass + Evaluation::ScenarioExpectation::ToolExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.ScenarioExpectation.ToolExpectation").msgclass + Evaluation::Scenario = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Scenario").msgclass + Evaluation::Scenario::UserFact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Scenario.UserFact").msgclass + Evaluation::Scenario::TaskCompletionBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Scenario.TaskCompletionBehavior").enummodule + Evaluation::Scenario::UserGoalBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Scenario.UserGoalBehavior").enummodule + EvaluationDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationDataset").msgclass + EvaluationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult").msgclass + EvaluationResult::GoldenExpectationOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcome").msgclass + EvaluationResult::GoldenExpectationOutcome::ToolInvocationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcome.ToolInvocationResult").msgclass + EvaluationResult::EvaluationExpectationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.EvaluationExpectationResult").msgclass + EvaluationResult::GoldenResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.GoldenResult").msgclass + EvaluationResult::GoldenResult::TurnReplayResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.GoldenResult.TurnReplayResult").msgclass + EvaluationResult::ScenarioRubricOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ScenarioRubricOutcome").msgclass + EvaluationResult::ScenarioExpectationOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcome").msgclass + EvaluationResult::ScenarioExpectationOutcome::ObservedToolCall = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcome.ObservedToolCall").msgclass + EvaluationResult::ScenarioResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ScenarioResult").msgclass + EvaluationResult::SpanLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.SpanLatency").msgclass + EvaluationResult::SpanLatency::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.SpanLatency.Type").enummodule + EvaluationResult::ToolCallLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ToolCallLatency").msgclass + EvaluationResult::HallucinationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.HallucinationResult").msgclass + EvaluationResult::UserGoalSatisfactionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.UserGoalSatisfactionResult").msgclass + EvaluationResult::SemanticSimilarityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResult").msgclass + EvaluationResult::OverallToolInvocationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.OverallToolInvocationResult").msgclass + EvaluationResult::TaskCompletionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.TaskCompletionResult").msgclass + EvaluationResult::Outcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.Outcome").enummodule + EvaluationResult::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ExecutionState").enummodule + EvaluationRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationRun").msgclass + EvaluationRun::Progress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationRun.Progress").msgclass + EvaluationRun::EvaluationRunSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationRun.EvaluationRunSummary").msgclass + EvaluationRun::EvaluationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationRun.EvaluationType").enummodule + EvaluationRun::EvaluationRunState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationRun.EvaluationRunState").enummodule + LatencyReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport").msgclass + LatencyReport::LatencyMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport.LatencyMetrics").msgclass + LatencyReport::ToolLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport.ToolLatency").msgclass + LatencyReport::CallbackLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport.CallbackLatency").msgclass + LatencyReport::GuardrailLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport.GuardrailLatency").msgclass + LatencyReport::LlmCallLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport.LlmCallLatency").msgclass + EvaluationExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationExpectation").msgclass + EvaluationExpectation::LlmCriteria = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationExpectation.LlmCriteria").msgclass + EvaluationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationConfig").msgclass + EvaluationConfig::EvaluationChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationConfig.EvaluationChannel").enummodule + EvaluationErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationErrorInfo").msgclass + EvaluationErrorInfo::ErrorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationErrorInfo.ErrorType").enummodule + RunEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RunEvaluationRequest").msgclass + ScheduledEvaluationRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ScheduledEvaluationRun").msgclass + ScheduledEvaluationRun::SchedulingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfig").msgclass + ScheduledEvaluationRun::SchedulingConfig::Frequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfig.Frequency").enummodule + PersonaRunConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.PersonaRunConfig").msgclass + OptimizationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.OptimizationConfig").msgclass + OptimizationConfig::OptimizationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.OptimizationConfig.OptimizationStatus").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service.rb new file mode 100644 index 000000000000..5ee4d4fdbd88 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/ces/v1beta/version" + +require "google/cloud/ces/v1beta/evaluation_service/credentials" +require "google/cloud/ces/v1beta/evaluation_service/paths" +require "google/cloud/ces/v1beta/evaluation_service/operations" +require "google/cloud/ces/v1beta/evaluation_service/client" +require "google/cloud/ces/v1beta/evaluation_service/rest" + +module Google + module Cloud + module Ces + module V1beta + ## + # EvaluationService exposes methods to perform evaluation for the CES app. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/ces/v1beta/evaluation_service" + # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/ces/v1beta/evaluation_service/rest" + # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + module EvaluationService + end + end + end + end +end + +helper_path = ::File.join __dir__, "evaluation_service", "helpers.rb" +require "google/cloud/ces/v1beta/evaluation_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb new file mode 100644 index 000000000000..e11d4a03ed5d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb @@ -0,0 +1,4048 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/evaluation_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module Ces + module V1beta + module EvaluationService + ## + # Client for the EvaluationService service. + # + # EvaluationService exposes methods to perform evaluation for the CES app. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :evaluation_service_stub + + ## + # Configure the EvaluationService Client class. + # + # See {::Google::Cloud::Ces::V1beta::EvaluationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EvaluationService clients + # ::Google::Cloud::Ces::V1beta::EvaluationService::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", "Ces", "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 = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EvaluationService 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::Ces::V1beta::EvaluationService::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 + @evaluation_service_stub.universe_domain + end + + ## + # Create a new EvaluationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EvaluationService 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/ces/v1beta/evaluation_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 + + @evaluation_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Ces::V1beta::EvaluationService::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 + ) + + @evaluation_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 = @evaluation_service_stub.endpoint + config.universe_domain = @evaluation_service_stub.universe_domain + config.logger = @evaluation_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationService::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 + @evaluation_service_stub.logger + end + + # Service calls + + ## + # Runs an evaluation of the app. + # + # @overload run_evaluation(request, options = nil) + # Pass arguments to `run_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RunEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_evaluation(app: nil, evaluations: nil, evaluation_dataset: nil, display_name: nil, app_version: nil, config: nil, run_count: nil, persona_run_configs: nil, optimization_config: nil, scheduled_evaluation_run: nil, golden_run_method: nil, generate_latency_report: nil) + # Pass arguments to `run_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param app [::String] + # Required. The app to evaluate. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param evaluations [::Array<::String>] + # Optional. List of evaluations to run. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @param evaluation_dataset [::String] + # Optional. An evaluation dataset to run. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` + # @param display_name [::String] + # Optional. The display name of the evaluation run. + # @param app_version [::String] + # Optional. The app version to evaluate. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # @param config [::Google::Cloud::Ces::V1beta::EvaluationConfig, ::Hash] + # Optional. The configuration to use for the run. + # @param run_count [::Integer] + # Optional. The number of times to run the evaluation. If not set, the + # default value is 1 per golden, and 5 per scenario. + # @param persona_run_configs [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig, ::Hash>] + # Optional. The configuration to use for the run per persona. + # @param optimization_config [::Google::Cloud::Ces::V1beta::OptimizationConfig, ::Hash] + # Optional. Configuration for running the optimization step after the + # evaluation run. If not set, the optimization step will not be run. + # @param scheduled_evaluation_run [::String] + # Optional. The resource name of the `ScheduledEvaluationRun` that is + # triggering this evaluation run. + # + # If this field is set, the `scheduled_evaluation_run` field on the created + # `EvaluationRun` resource will be populated from this value. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}` + # @param golden_run_method [::Google::Cloud::Ces::V1beta::GoldenRunMethod] + # Optional. The method to run the evaluation if it is a golden evaluation. If + # not set, default to STABLE. + # @param generate_latency_report [::Boolean] + # Optional. Whether to generate a latency report for the evaluation run. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RunEvaluationRequest.new + # + # # Call the run_evaluation method. + # result = client.run_evaluation 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 run_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.app + header_params["app"] = request.app + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :run_evaluation, 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 + + ## + # Uploads audio for use in Golden Evaluations. Stores the audio in the Cloud + # Storage bucket defined in + # 'App.logging_settings.evaluation_audio_recording_config.gcs_bucket' and + # returns a transcript. + # + # @overload upload_evaluation_audio(request, options = nil) + # Pass arguments to `upload_evaluation_audio` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload upload_evaluation_audio(name: nil, audio_content: nil, previous_audio_gcs_uri: nil) + # Pass arguments to `upload_evaluation_audio` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Evaluation for which to upload the + # evaluation audio. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @param audio_content [::String] + # Required. The raw audio bytes. + # The format of the audio must be single-channel LINEAR16 with a sample + # rate of 16kHz (default InputAudioConfig). + # @param previous_audio_gcs_uri [::String] + # Optional. The Google Cloud Storage URI of the previously uploaded audio + # file to be deleted. Format: `gs:///` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new + # + # # Call the upload_evaluation_audio method. + # result = client.upload_evaluation_audio request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse. + # p result + # + def upload_evaluation_audio request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.upload_evaluation_audio.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.upload_evaluation_audio.timeout, + metadata: metadata, + retry_policy: @config.rpcs.upload_evaluation_audio.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :upload_evaluation_audio, 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 an evaluation. + # + # @overload create_evaluation(request, options = nil) + # Pass arguments to `create_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation(parent: nil, evaluation_id: nil, evaluation: nil) + # Pass arguments to `create_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The app to create the evaluation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param evaluation_id [::String] + # Optional. The ID to use for the evaluation, which will become the final + # component of the evaluation's resource name. If not provided, a unique ID + # will be automatically assigned for the evaluation. + # @param evaluation [::Google::Cloud::Ces::V1beta::Evaluation, ::Hash] + # Required. The evaluation to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Evaluation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new + # + # # Call the create_evaluation method. + # result = client.create_evaluation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. + # p result + # + def create_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest + + # Converts hash and nil to 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_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :create_evaluation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a golden evaluation from a conversation. + # + # @overload generate_evaluation(request, options = nil) + # Pass arguments to `generate_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_evaluation(conversation: nil, source: nil) + # Pass arguments to `generate_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversation [::String] + # Required. The conversation to create the golden evaluation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` + # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, all sources + # will be searched. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new + # + # # Call the generate_evaluation method. + # result = client.generate_evaluation 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 generate_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.conversation + header_params["conversation"] = request.conversation + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :generate_evaluation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports evaluations into the app. + # + # @overload import_evaluations(request, options = nil) + # Pass arguments to `import_evaluations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_evaluations(conversation_list: nil, gcs_uri: nil, csv_content: nil, parent: nil, import_options: nil) + # Pass arguments to `import_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversation_list [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ConversationList, ::Hash] + # The conversations to import the evaluations from. + # + # Note: The following parameters are mutually exclusive: `conversation_list`, `gcs_uri`, `csv_content`. 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 gcs_uri [::String] + # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + # from which to import evaluations. The format of this URI must be + # `gs:///`. + # + # Note: The following parameters are mutually exclusive: `gcs_uri`, `conversation_list`, `csv_content`. 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 csv_content [::String] + # Raw bytes representing the csv file with the evaluations structure. + # + # Note: The following parameters are mutually exclusive: `csv_content`, `conversation_list`, `gcs_uri`. 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 parent [::String] + # Required. The app to import the evaluations into. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param import_options [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions, ::Hash] + # Optional. Options governing the import process for the evaluations. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new + # + # # Call the import_evaluations method. + # result = client.import_evaluations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.import_evaluations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :import_evaluations, 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 + + ## + # Creates an evaluation dataset. + # + # @overload create_evaluation_dataset(request, options = nil) + # Pass arguments to `create_evaluation_dataset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_dataset(parent: nil, evaluation_dataset_id: nil, evaluation_dataset: nil) + # Pass arguments to `create_evaluation_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The app to create the evaluation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param evaluation_dataset_id [::String] + # Optional. The ID to use for the evaluation dataset, which will become the + # final component of the evaluation dataset's resource name. If not provided, + # a unique ID will be automatically assigned for the evaluation. + # @param evaluation_dataset [::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash] + # Required. The evaluation dataset to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new + # + # # Call the create_evaluation_dataset method. + # result = client.create_evaluation_dataset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. + # p result + # + def create_evaluation_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest + + # Converts hash and nil to 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_evaluation_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_evaluation_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :create_evaluation_dataset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an evaluation. + # + # @overload update_evaluation(request, options = nil) + # Pass arguments to `update_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation(evaluation: nil, update_mask: nil) + # Pass arguments to `update_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param evaluation [::Google::Cloud::Ces::V1beta::Evaluation, ::Hash] + # Required. The evaluation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Evaluation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new + # + # # Call the update_evaluation method. + # result = client.update_evaluation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. + # p result + # + def update_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest + + # Converts hash and nil to 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_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.evaluation&.name + header_params["evaluation.name"] = request.evaluation.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_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :update_evaluation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an evaluation dataset. + # + # @overload update_evaluation_dataset(request, options = nil) + # Pass arguments to `update_evaluation_dataset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_dataset(evaluation_dataset: nil, update_mask: nil) + # Pass arguments to `update_evaluation_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param evaluation_dataset [::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash] + # Required. The evaluation dataset to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new + # + # # Call the update_evaluation_dataset method. + # result = client.update_evaluation_dataset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. + # p result + # + def update_evaluation_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest + + # Converts hash and nil to 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_evaluation_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.evaluation_dataset&.name + header_params["evaluation_dataset.name"] = request.evaluation_dataset.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_evaluation_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_evaluation_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :update_evaluation_dataset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an evaluation. + # + # @overload delete_evaluation(request, options = nil) + # Pass arguments to `delete_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation(name: nil, force: nil, etag: nil) + # Pass arguments to `delete_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation to delete. + # @param force [::Boolean] + # Optional. Indicates whether to forcefully delete the evaluation, even if it + # is still referenced by evaluation datasets. + # + # * If `force = false`, the deletion will fail if any datasets still + # reference the evaluation. + # * If `force = true`, all existing references from datasets will be removed + # and the evaluation will be deleted. + # @param etag [::String] + # Optional. The current etag of the evaluation. If an etag is not provided, + # the deletion will overwrite any concurrent changes. If an etag is provided + # and does not match the current etag of the evaluation, deletion will be + # blocked and an ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new + # + # # Call the delete_evaluation method. + # result = client.delete_evaluation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest + + # Converts hash and nil to 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_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :delete_evaluation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an evaluation result. + # + # @overload delete_evaluation_result(request, options = nil) + # Pass arguments to `delete_evaluation_result` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_result(name: nil) + # Pass arguments to `delete_evaluation_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation result to delete. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new + # + # # Call the delete_evaluation_result method. + # result = client.delete_evaluation_result request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_evaluation_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest + + # Converts hash and nil to 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_evaluation_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_result.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_evaluation_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :delete_evaluation_result, 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 an evaluation dataset. + # + # @overload delete_evaluation_dataset(request, options = nil) + # Pass arguments to `delete_evaluation_dataset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_dataset(name: nil, etag: nil) + # Pass arguments to `delete_evaluation_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation dataset to delete. + # @param etag [::String] + # Optional. The current etag of the evaluation dataset. If an etag is not + # provided, the deletion will overwrite any concurrent changes. If an etag is + # provided and does not match the current etag of the evaluation dataset, + # deletion will be blocked and an ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new + # + # # Call the delete_evaluation_dataset method. + # result = client.delete_evaluation_dataset request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_evaluation_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest + + # Converts hash and nil to 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_evaluation_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_evaluation_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :delete_evaluation_dataset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an evaluation run. + # + # @overload delete_evaluation_run(request, options = nil) + # Pass arguments to `delete_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_run(name: nil) + # Pass arguments to `delete_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation run to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new + # + # # Call the delete_evaluation_run method. + # result = client.delete_evaluation_run 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_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest + + # Converts hash and nil to 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_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :delete_evaluation_run, 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 details of the specified evaluation. + # + # @overload get_evaluation(request, options = nil) + # Pass arguments to `get_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation(name: nil) + # Pass arguments to `get_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::Evaluation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetEvaluationRequest.new + # + # # Call the get_evaluation method. + # result = client.get_evaluation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. + # p result + # + def get_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRequest + + # Converts hash and nil to 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_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :get_evaluation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified evaluation result. + # + # @overload get_evaluation_result(request, options = nil) + # Pass arguments to `get_evaluation_result` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_result(name: nil) + # Pass arguments to `get_evaluation_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation result to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationResult] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new + # + # # Call the get_evaluation_result method. + # result = client.get_evaluation_result request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationResult. + # p result + # + def get_evaluation_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest + + # Converts hash and nil to 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_evaluation_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_result.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_evaluation_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :get_evaluation_result, 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 the specified evaluation dataset. + # + # @overload get_evaluation_dataset(request, options = nil) + # Pass arguments to `get_evaluation_dataset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_dataset(name: nil) + # Pass arguments to `get_evaluation_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation dataset to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new + # + # # Call the get_evaluation_dataset method. + # result = client.get_evaluation_dataset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. + # p result + # + def get_evaluation_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest + + # Converts hash and nil to 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_evaluation_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_evaluation_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :get_evaluation_dataset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified evaluation run. + # + # @overload get_evaluation_run(request, options = nil) + # Pass arguments to `get_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_run(name: nil) + # Pass arguments to `get_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation run to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new + # + # # Call the get_evaluation_run method. + # result = client.get_evaluation_run request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationRun. + # p result + # + def get_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest + + # Converts hash and nil to 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_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :get_evaluation_run, 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 evaluations in the given app. + # + # @overload list_evaluations(request, options = nil) + # Pass arguments to `list_evaluations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, evaluation_filter: nil, evaluation_run_filter: nil, order_by: nil, last_ten_results: nil) + # Pass arguments to `list_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list evaluations from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations} + # call. + # @param filter [::String] + # Optional. Deprecated: Use evaluation_filter and evaluation_run_filter + # instead. + # @param evaluation_filter [::String] + # Optional. Filter to be applied on the evaluation when listing the + # evaluations. See https://google.aip.dev/160 for more details. Supported + # fields: evaluation_datasets + # @param evaluation_run_filter [::String] + # Optional. Filter string for fields on the associated EvaluationRun + # resources. See https://google.aip.dev/160 for more details. Supported + # fields: create_time, initiated_by, app_version_display_name + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # @param last_ten_results [::Boolean] + # Optional. Whether to include the last 10 evaluation results for each + # evaluation in the response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new + # + # # Call the list_evaluations method. + # result = client.list_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Ces::V1beta::Evaluation. + # p item + # end + # + def list_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest + + # Converts hash and nil to 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_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :list_evaluations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all evaluation results for a given evaluation. + # + # @overload list_evaluation_results(request, options = nil) + # Pass arguments to `list_evaluation_results` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_evaluation_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the evaluation to list evaluation results + # from. To filter by evaluation run, use `-` as the evaluation ID and specify + # the evaluation run ID in the filter. For example: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/-` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the evaluation results. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new + # + # # Call the list_evaluation_results method. + # result = client.list_evaluation_results 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::Ces::V1beta::EvaluationResult. + # p item + # end + # + def list_evaluation_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest + + # Converts hash and nil to 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_evaluation_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_results.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_evaluation_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :list_evaluation_results, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_results, 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 evaluation datasets in the given app. + # + # @overload list_evaluation_datasets(request, options = nil) + # Pass arguments to `list_evaluation_datasets` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_evaluation_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list evaluation datasets from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the evaluation datasets. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new + # + # # Call the list_evaluation_datasets method. + # result = client.list_evaluation_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Ces::V1beta::EvaluationDataset. + # p item + # end + # + def list_evaluation_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest + + # Converts hash and nil to 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_evaluation_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_datasets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_evaluation_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :list_evaluation_datasets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_datasets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all evaluation runs in the given app. + # + # @overload list_evaluation_runs(request, options = nil) + # Pass arguments to `list_evaluation_runs` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_evaluation_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list evaluation runs from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the evaluation runs. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new + # + # # Call the list_evaluation_runs method. + # result = client.list_evaluation_runs 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::Ces::V1beta::EvaluationRun. + # p item + # end + # + def list_evaluation_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest + + # Converts hash and nil to 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_evaluation_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_evaluation_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :list_evaluation_runs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_runs, 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 evaluation expectations in the given app. + # + # @overload list_evaluation_expectations(request, options = nil) + # Pass arguments to `list_evaluation_expectations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_expectations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_evaluation_expectations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list evaluation expectations + # from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the evaluation expectations. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new + # + # # Call the list_evaluation_expectations method. + # result = client.list_evaluation_expectations 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::Ces::V1beta::EvaluationExpectation. + # p item + # end + # + def list_evaluation_expectations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest + + # Converts hash and nil to 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_evaluation_expectations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_expectations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_evaluation_expectations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :list_evaluation_expectations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_expectations, 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 the specified evaluation expectation. + # + # @overload get_evaluation_expectation(request, options = nil) + # Pass arguments to `get_evaluation_expectation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_expectation(name: nil) + # Pass arguments to `get_evaluation_expectation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation expectation to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new + # + # # Call the get_evaluation_expectation method. + # result = client.get_evaluation_expectation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. + # p result + # + def get_evaluation_expectation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest + + # Converts hash and nil to 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_evaluation_expectation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_evaluation_expectation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :get_evaluation_expectation, 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 an evaluation expectation. + # + # @overload create_evaluation_expectation(request, options = nil) + # Pass arguments to `create_evaluation_expectation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_expectation(parent: nil, evaluation_expectation_id: nil, evaluation_expectation: nil) + # Pass arguments to `create_evaluation_expectation` via keyword arguments. Note that at + # least one keyword argument is 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 app to create the evaluation expectation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param evaluation_expectation_id [::String] + # Optional. The ID to use for the evaluation expectation, which will become + # the final component of the evaluation expectation's resource name. If not + # provided, a unique ID will be automatically assigned for the evaluation + # expectation. + # @param evaluation_expectation [::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash] + # Required. The evaluation expectation to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new + # + # # Call the create_evaluation_expectation method. + # result = client.create_evaluation_expectation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. + # p result + # + def create_evaluation_expectation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest + + # Converts hash and nil to 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_evaluation_expectation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_evaluation_expectation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :create_evaluation_expectation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an evaluation expectation. + # + # @overload update_evaluation_expectation(request, options = nil) + # Pass arguments to `update_evaluation_expectation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_expectation(evaluation_expectation: nil, update_mask: nil) + # Pass arguments to `update_evaluation_expectation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param evaluation_expectation [::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash] + # Required. The evaluation expectation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new + # + # # Call the update_evaluation_expectation method. + # result = client.update_evaluation_expectation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. + # p result + # + def update_evaluation_expectation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest + + # Converts hash and nil to 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_evaluation_expectation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.evaluation_expectation&.name + header_params["evaluation_expectation.name"] = request.evaluation_expectation.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_evaluation_expectation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_evaluation_expectation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :update_evaluation_expectation, 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 an evaluation expectation. + # + # @overload delete_evaluation_expectation(request, options = nil) + # Pass arguments to `delete_evaluation_expectation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_expectation(name: nil, etag: nil) + # Pass arguments to `delete_evaluation_expectation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation expectation to delete. + # @param etag [::String] + # Optional. The current etag of the evaluation expectation. If an etag is not + # provided, the deletion will overwrite any concurrent changes. If an etag is + # provided and does not match the current etag of the evaluation expectation, + # deletion will be blocked and an ABORTED error will be returned. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new + # + # # Call the delete_evaluation_expectation method. + # result = client.delete_evaluation_expectation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_evaluation_expectation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest + + # Converts hash and nil to 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_evaluation_expectation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_evaluation_expectation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :delete_evaluation_expectation, 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 scheduled evaluation run. + # + # @overload create_scheduled_evaluation_run(request, options = nil) + # Pass arguments to `create_scheduled_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(parent: nil, scheduled_evaluation_run_id: nil, scheduled_evaluation_run: nil) + # Pass arguments to `create_scheduled_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is 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 app to create the scheduled evaluation run for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param scheduled_evaluation_run_id [::String] + # Optional. The ID to use for the scheduled evaluation run, which will become + # the final component of the scheduled evaluation run's resource name. If not + # provided, a unique ID will be automatically assigned. + # @param scheduled_evaluation_run [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash] + # Required. The scheduled evaluation run to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new + # + # # Call the create_scheduled_evaluation_run method. + # result = client.create_scheduled_evaluation_run request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. + # p result + # + def create_scheduled_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest + + # Converts hash and nil to 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_scheduled_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_scheduled_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :create_scheduled_evaluation_run, 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 the specified scheduled evaluation run. + # + # @overload get_scheduled_evaluation_run(request, options = nil) + # Pass arguments to `get_scheduled_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(name: nil) + # Pass arguments to `get_scheduled_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the scheduled evaluation run to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new + # + # # Call the get_scheduled_evaluation_run method. + # result = client.get_scheduled_evaluation_run request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. + # p result + # + def get_scheduled_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest + + # Converts hash and nil to 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_scheduled_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scheduled_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :get_scheduled_evaluation_run, 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 scheduled evaluation runs in the given app. + # + # @overload list_scheduled_evaluation_runs(request, options = nil) + # Pass arguments to `list_scheduled_evaluation_runs` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scheduled_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_scheduled_evaluation_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list scheduled evaluation runs + # from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the scheduled evaluation runs. + # See https://google.aip.dev/160 for more details. + # Currently supports filtering by: + # * request.evaluations:evaluation_id + # * request.evaluation_dataset:evaluation_dataset_id + # @param order_by [::String] + # Optional. Field to sort by. Supported fields are: + # "name" (ascending), "create_time" (descending), "update_time" (descending), + # "next_scheduled_execution" (ascending), and + # "last_completed_run.create_time" (descending). + # If not included, "update_time" will be the default. + # See https://google.aip.dev/132#ordering for more details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new + # + # # Call the list_scheduled_evaluation_runs method. + # result = client.list_scheduled_evaluation_runs 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::Ces::V1beta::ScheduledEvaluationRun. + # p item + # end + # + def list_scheduled_evaluation_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest + + # Converts hash and nil to 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_scheduled_evaluation_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scheduled_evaluation_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :list_scheduled_evaluation_runs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_scheduled_evaluation_runs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a scheduled evaluation run. + # + # @overload update_scheduled_evaluation_run(request, options = nil) + # Pass arguments to `update_scheduled_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(scheduled_evaluation_run: nil, update_mask: nil) + # Pass arguments to `update_scheduled_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param scheduled_evaluation_run [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash] + # Required. The scheduled evaluation run to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new + # + # # Call the update_scheduled_evaluation_run method. + # result = client.update_scheduled_evaluation_run request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. + # p result + # + def update_scheduled_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest + + # Converts hash and nil to 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_scheduled_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.scheduled_evaluation_run&.name + header_params["scheduled_evaluation_run.name"] = request.scheduled_evaluation_run.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_scheduled_evaluation_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_scheduled_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :update_scheduled_evaluation_run, 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 scheduled evaluation run. + # + # @overload delete_scheduled_evaluation_run(request, options = nil) + # Pass arguments to `delete_scheduled_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(name: nil, etag: nil) + # Pass arguments to `delete_scheduled_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the scheduled evaluation run to delete. + # @param etag [::String] + # Optional. The etag of the ScheduledEvaluationRun. + # If provided, it must match the server's etag. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new + # + # # Call the delete_scheduled_evaluation_run method. + # result = client.delete_scheduled_evaluation_run request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_scheduled_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest + + # Converts hash and nil to 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_scheduled_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_scheduled_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :delete_scheduled_evaluation_run, 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 + + ## + # Tests the voice of a persona. Also accepts a default persona. + # + # @overload test_persona_voice(request, options = nil) + # Pass arguments to `test_persona_voice` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_persona_voice(app: nil, persona_id: nil, text: nil) + # Pass arguments to `test_persona_voice` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param app [::String] + # Required. the resource name of the app to test the persona voice for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param persona_id [::String] + # Required. The persona ID to test the voice for. Also accepts "default". + # @param text [::String] + # Required. The text to test the voice for. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new + # + # # Call the test_persona_voice method. + # result = client.test_persona_voice request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse. + # p result + # + def test_persona_voice request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_persona_voice.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.app + header_params["app"] = request.app + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_persona_voice.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_persona_voice.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :test_persona_voice, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports evaluations. + # + # @overload export_evaluations(request, options = nil) + # Pass arguments to `export_evaluations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_evaluations(parent: nil, names: nil, export_options: nil, include_evaluation_results: nil, include_evaluations: nil) + # Pass arguments to `export_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to export evaluations from. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @param names [::Array<::String>] + # Required. The resource names of the evaluations to export. + # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] + # Optional. The export options for the evaluations. + # @param include_evaluation_results [::Boolean] + # Optional. Includes evaluation results in the export. At least one of + # include_evaluation_results or include_evaluations must be set. + # @param include_evaluations [::Boolean] + # Optional. Includes evaluations in the export. At least one of + # include_evaluation_results or include_evaluations must be set. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new + # + # # Call the export_evaluations method. + # result = client.export_evaluations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_evaluations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :export_evaluations, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports evaluations runs. + # + # @overload export_evaluation_runs(request, options = nil) + # Pass arguments to `export_evaluation_runs` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_evaluation_runs(parent: nil, names: nil, export_options: nil) + # Pass arguments to `export_evaluation_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to export evaluation runs from. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @param names [::Array<::String>] + # Required. The resource names of the evaluation runs to export. + # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] + # Optional. The export options for the evaluation runs. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new + # + # # Call the export_evaluation_runs method. + # result = client.export_evaluation_runs request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluation_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_evaluation_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_evaluation_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_evaluation_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :export_evaluation_runs, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports evaluations results. + # + # @overload export_evaluation_results(request, options = nil) + # Pass arguments to `export_evaluation_results` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_evaluation_results(parent: nil, names: nil, export_options: nil) + # Pass arguments to `export_evaluation_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the evaluation to export evaluation results + # from. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @param names [::Array<::String>] + # Required. The resource names of the evaluation results to export. + # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] + # Optional. The export options for the evaluation results. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new + # + # # Call the export_evaluation_results method. + # result = client.export_evaluation_results request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluation_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_evaluation_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_evaluation_results.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_evaluation_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :export_evaluation_results, 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 + + ## + # Runs metrics on an existing evaluation result. + # + # @overload run_evaluation_result_metrics(request, options = nil) + # Pass arguments to `run_evaluation_result_metrics` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_evaluation_result_metrics(evaluation_result_id: nil) + # Pass arguments to `run_evaluation_result_metrics` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param evaluation_result_id [::String] + # Required. The evaluation result to run metrics for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}` + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new + # + # # Call the run_evaluation_result_metrics method. + # result = client.run_evaluation_result_metrics 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 run_evaluation_result_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_evaluation_result_metrics.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.evaluation_result_id + header_params["evaluation_result_id"] = request.evaluation_result_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_evaluation_result_metrics.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_evaluation_result_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :run_evaluation_result_metrics, 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 EvaluationService API. + # + # This class represents the configuration for EvaluationService, + # 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::Ces::V1beta::EvaluationService::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 + # # run_evaluation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Ces::V1beta::EvaluationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.run_evaluation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.run_evaluation.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::Ces::V1beta::EvaluationService::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 = "ces.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 EvaluationService 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 `run_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :run_evaluation + ## + # RPC-specific configuration for `upload_evaluation_audio` + # @return [::Gapic::Config::Method] + # + attr_reader :upload_evaluation_audio + ## + # RPC-specific configuration for `create_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_evaluation + ## + # RPC-specific configuration for `generate_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_evaluation + ## + # RPC-specific configuration for `import_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :import_evaluations + ## + # RPC-specific configuration for `create_evaluation_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_evaluation_dataset + ## + # RPC-specific configuration for `update_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_evaluation + ## + # RPC-specific configuration for `update_evaluation_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_evaluation_dataset + ## + # RPC-specific configuration for `delete_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation + ## + # RPC-specific configuration for `delete_evaluation_result` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation_result + ## + # RPC-specific configuration for `delete_evaluation_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation_dataset + ## + # RPC-specific configuration for `delete_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation_run + ## + # RPC-specific configuration for `get_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation + ## + # RPC-specific configuration for `get_evaluation_result` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation_result + ## + # RPC-specific configuration for `get_evaluation_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation_dataset + ## + # RPC-specific configuration for `get_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation_run + ## + # RPC-specific configuration for `list_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluations + ## + # RPC-specific configuration for `list_evaluation_results` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluation_results + ## + # RPC-specific configuration for `list_evaluation_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluation_datasets + ## + # RPC-specific configuration for `list_evaluation_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluation_runs + ## + # RPC-specific configuration for `list_evaluation_expectations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluation_expectations + ## + # RPC-specific configuration for `get_evaluation_expectation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation_expectation + ## + # RPC-specific configuration for `create_evaluation_expectation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_evaluation_expectation + ## + # RPC-specific configuration for `update_evaluation_expectation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_evaluation_expectation + ## + # RPC-specific configuration for `delete_evaluation_expectation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation_expectation + ## + # RPC-specific configuration for `create_scheduled_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scheduled_evaluation_run + ## + # RPC-specific configuration for `get_scheduled_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scheduled_evaluation_run + ## + # RPC-specific configuration for `list_scheduled_evaluation_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scheduled_evaluation_runs + ## + # RPC-specific configuration for `update_scheduled_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scheduled_evaluation_run + ## + # RPC-specific configuration for `delete_scheduled_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scheduled_evaluation_run + ## + # RPC-specific configuration for `test_persona_voice` + # @return [::Gapic::Config::Method] + # + attr_reader :test_persona_voice + ## + # RPC-specific configuration for `export_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluations + ## + # RPC-specific configuration for `export_evaluation_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluation_runs + ## + # RPC-specific configuration for `export_evaluation_results` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluation_results + ## + # RPC-specific configuration for `run_evaluation_result_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :run_evaluation_result_metrics + + # @private + def initialize parent_rpcs = nil + run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation + @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config + upload_evaluation_audio_config = parent_rpcs.upload_evaluation_audio if parent_rpcs.respond_to? :upload_evaluation_audio + @upload_evaluation_audio = ::Gapic::Config::Method.new upload_evaluation_audio_config + create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation + @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config + generate_evaluation_config = parent_rpcs.generate_evaluation if parent_rpcs.respond_to? :generate_evaluation + @generate_evaluation = ::Gapic::Config::Method.new generate_evaluation_config + import_evaluations_config = parent_rpcs.import_evaluations if parent_rpcs.respond_to? :import_evaluations + @import_evaluations = ::Gapic::Config::Method.new import_evaluations_config + create_evaluation_dataset_config = parent_rpcs.create_evaluation_dataset if parent_rpcs.respond_to? :create_evaluation_dataset + @create_evaluation_dataset = ::Gapic::Config::Method.new create_evaluation_dataset_config + update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation + @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config + update_evaluation_dataset_config = parent_rpcs.update_evaluation_dataset if parent_rpcs.respond_to? :update_evaluation_dataset + @update_evaluation_dataset = ::Gapic::Config::Method.new update_evaluation_dataset_config + delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation + @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config + delete_evaluation_result_config = parent_rpcs.delete_evaluation_result if parent_rpcs.respond_to? :delete_evaluation_result + @delete_evaluation_result = ::Gapic::Config::Method.new delete_evaluation_result_config + delete_evaluation_dataset_config = parent_rpcs.delete_evaluation_dataset if parent_rpcs.respond_to? :delete_evaluation_dataset + @delete_evaluation_dataset = ::Gapic::Config::Method.new delete_evaluation_dataset_config + delete_evaluation_run_config = parent_rpcs.delete_evaluation_run if parent_rpcs.respond_to? :delete_evaluation_run + @delete_evaluation_run = ::Gapic::Config::Method.new delete_evaluation_run_config + get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation + @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config + get_evaluation_result_config = parent_rpcs.get_evaluation_result if parent_rpcs.respond_to? :get_evaluation_result + @get_evaluation_result = ::Gapic::Config::Method.new get_evaluation_result_config + get_evaluation_dataset_config = parent_rpcs.get_evaluation_dataset if parent_rpcs.respond_to? :get_evaluation_dataset + @get_evaluation_dataset = ::Gapic::Config::Method.new get_evaluation_dataset_config + get_evaluation_run_config = parent_rpcs.get_evaluation_run if parent_rpcs.respond_to? :get_evaluation_run + @get_evaluation_run = ::Gapic::Config::Method.new get_evaluation_run_config + list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations + @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config + list_evaluation_results_config = parent_rpcs.list_evaluation_results if parent_rpcs.respond_to? :list_evaluation_results + @list_evaluation_results = ::Gapic::Config::Method.new list_evaluation_results_config + list_evaluation_datasets_config = parent_rpcs.list_evaluation_datasets if parent_rpcs.respond_to? :list_evaluation_datasets + @list_evaluation_datasets = ::Gapic::Config::Method.new list_evaluation_datasets_config + list_evaluation_runs_config = parent_rpcs.list_evaluation_runs if parent_rpcs.respond_to? :list_evaluation_runs + @list_evaluation_runs = ::Gapic::Config::Method.new list_evaluation_runs_config + list_evaluation_expectations_config = parent_rpcs.list_evaluation_expectations if parent_rpcs.respond_to? :list_evaluation_expectations + @list_evaluation_expectations = ::Gapic::Config::Method.new list_evaluation_expectations_config + get_evaluation_expectation_config = parent_rpcs.get_evaluation_expectation if parent_rpcs.respond_to? :get_evaluation_expectation + @get_evaluation_expectation = ::Gapic::Config::Method.new get_evaluation_expectation_config + create_evaluation_expectation_config = parent_rpcs.create_evaluation_expectation if parent_rpcs.respond_to? :create_evaluation_expectation + @create_evaluation_expectation = ::Gapic::Config::Method.new create_evaluation_expectation_config + update_evaluation_expectation_config = parent_rpcs.update_evaluation_expectation if parent_rpcs.respond_to? :update_evaluation_expectation + @update_evaluation_expectation = ::Gapic::Config::Method.new update_evaluation_expectation_config + delete_evaluation_expectation_config = parent_rpcs.delete_evaluation_expectation if parent_rpcs.respond_to? :delete_evaluation_expectation + @delete_evaluation_expectation = ::Gapic::Config::Method.new delete_evaluation_expectation_config + create_scheduled_evaluation_run_config = parent_rpcs.create_scheduled_evaluation_run if parent_rpcs.respond_to? :create_scheduled_evaluation_run + @create_scheduled_evaluation_run = ::Gapic::Config::Method.new create_scheduled_evaluation_run_config + get_scheduled_evaluation_run_config = parent_rpcs.get_scheduled_evaluation_run if parent_rpcs.respond_to? :get_scheduled_evaluation_run + @get_scheduled_evaluation_run = ::Gapic::Config::Method.new get_scheduled_evaluation_run_config + list_scheduled_evaluation_runs_config = parent_rpcs.list_scheduled_evaluation_runs if parent_rpcs.respond_to? :list_scheduled_evaluation_runs + @list_scheduled_evaluation_runs = ::Gapic::Config::Method.new list_scheduled_evaluation_runs_config + update_scheduled_evaluation_run_config = parent_rpcs.update_scheduled_evaluation_run if parent_rpcs.respond_to? :update_scheduled_evaluation_run + @update_scheduled_evaluation_run = ::Gapic::Config::Method.new update_scheduled_evaluation_run_config + delete_scheduled_evaluation_run_config = parent_rpcs.delete_scheduled_evaluation_run if parent_rpcs.respond_to? :delete_scheduled_evaluation_run + @delete_scheduled_evaluation_run = ::Gapic::Config::Method.new delete_scheduled_evaluation_run_config + test_persona_voice_config = parent_rpcs.test_persona_voice if parent_rpcs.respond_to? :test_persona_voice + @test_persona_voice = ::Gapic::Config::Method.new test_persona_voice_config + export_evaluations_config = parent_rpcs.export_evaluations if parent_rpcs.respond_to? :export_evaluations + @export_evaluations = ::Gapic::Config::Method.new export_evaluations_config + export_evaluation_runs_config = parent_rpcs.export_evaluation_runs if parent_rpcs.respond_to? :export_evaluation_runs + @export_evaluation_runs = ::Gapic::Config::Method.new export_evaluation_runs_config + export_evaluation_results_config = parent_rpcs.export_evaluation_results if parent_rpcs.respond_to? :export_evaluation_results + @export_evaluation_results = ::Gapic::Config::Method.new export_evaluation_results_config + run_evaluation_result_metrics_config = parent_rpcs.run_evaluation_result_metrics if parent_rpcs.respond_to? :run_evaluation_result_metrics + @run_evaluation_result_metrics = ::Gapic::Config::Method.new run_evaluation_result_metrics_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/credentials.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/credentials.rb new file mode 100644 index 000000000000..17912db6d86d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/credentials.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Ces + module V1beta + module EvaluationService + # Credentials for the EvaluationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/ces", + "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-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb new file mode 100644 index 000000000000..e0208688cc5a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Ces + module V1beta + module EvaluationService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the EvaluationService 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 EvaluationService 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::Ces::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::Ces::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::Ces::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::Ces::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::Ces::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 = "ces.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-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/paths.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/paths.rb new file mode 100644 index 000000000000..152664329fa3 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/paths.rb @@ -0,0 +1,306 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + module EvaluationService + # Path helper methods for the EvaluationService API. + module Paths + ## + # Create a fully-qualified Agent resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param agent [String] + # + # @return [::String] + def agent_path project:, location:, app:, agent: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/agents/#{agent}" + end + + ## + # Create a fully-qualified App resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # + # @return [::String] + def app_path project:, location:, app: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}" + end + + ## + # Create a fully-qualified AppVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param version [String] + # + # @return [::String] + def app_version_path project:, location:, app:, version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/versions/#{version}" + end + + ## + # Create a fully-qualified Changelog resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/changelogs/{changelog}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param changelog [String] + # + # @return [::String] + def changelog_path project:, location:, app:, changelog: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/changelogs/#{changelog}" + end + + ## + # Create a fully-qualified Conversation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param conversation [String] + # + # @return [::String] + def conversation_path project:, location:, app:, conversation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/conversations/#{conversation}" + end + + ## + # Create a fully-qualified Evaluation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param evaluation [String] + # + # @return [::String] + def evaluation_path project:, location:, app:, evaluation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/evaluations/#{evaluation}" + end + + ## + # Create a fully-qualified EvaluationDataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluation_dataset}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param evaluation_dataset [String] + # + # @return [::String] + def evaluation_dataset_path project:, location:, app:, evaluation_dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/evaluationDatasets/#{evaluation_dataset}" + end + + ## + # Create a fully-qualified EvaluationExpectation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param evaluation_expectation [String] + # + # @return [::String] + def evaluation_expectation_path project:, location:, app:, evaluation_expectation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/evaluationExpectations/#{evaluation_expectation}" + end + + ## + # Create a fully-qualified EvaluationResult resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param evaluation [String] + # @param evaluation_result [String] + # + # @return [::String] + def evaluation_result_path project:, location:, app:, evaluation:, evaluation_result: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + raise ::ArgumentError, "evaluation cannot contain /" if evaluation.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/evaluations/#{evaluation}/results/#{evaluation_result}" + end + + ## + # Create a fully-qualified EvaluationRun resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param evaluation_run [String] + # + # @return [::String] + def evaluation_run_path project:, location:, app:, evaluation_run: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/evaluationRuns/#{evaluation_run}" + end + + ## + # Create a fully-qualified ScheduledEvaluationRun resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param scheduled_evaluation_run [String] + # + # @return [::String] + def scheduled_evaluation_run_path project:, location:, app:, scheduled_evaluation_run: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/scheduledEvaluationRuns/#{scheduled_evaluation_run}" + end + + ## + # Create a fully-qualified Tool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param tool [String] + # + # @return [::String] + def tool_path project:, location:, app:, tool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/tools/#{tool}" + end + + ## + # Create a fully-qualified Toolset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param toolset [String] + # + # @return [::String] + def toolset_path project:, location:, app:, toolset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/toolsets/#{toolset}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest.rb new file mode 100644 index 000000000000..5b2921fd15f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/ces/v1beta/version" +require "google/cloud/ces/v1beta/bindings_override" + +require "google/cloud/ces/v1beta/evaluation_service/credentials" +require "google/cloud/ces/v1beta/evaluation_service/paths" +require "google/cloud/ces/v1beta/evaluation_service/rest/operations" +require "google/cloud/ces/v1beta/evaluation_service/rest/client" + +module Google + module Cloud + module Ces + module V1beta + ## + # EvaluationService exposes methods to perform evaluation for the CES app. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/ces/v1beta/evaluation_service/rest" + # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + module EvaluationService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/ces/v1beta/evaluation_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb new file mode 100644 index 000000000000..55a5efdb1de4 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb @@ -0,0 +1,3768 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/evaluation_service_pb" +require "google/cloud/ces/v1beta/evaluation_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Ces + module V1beta + module EvaluationService + module Rest + ## + # REST client for the EvaluationService service. + # + # EvaluationService exposes methods to perform evaluation for the CES app. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :evaluation_service_stub + + ## + # Configure the EvaluationService Client class. + # + # See {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EvaluationService clients + # ::Google::Cloud::Ces::V1beta::EvaluationService::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", "Ces", "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 = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EvaluationService 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::Ces::V1beta::EvaluationService::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 + @evaluation_service_stub.universe_domain + end + + ## + # Create a new EvaluationService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EvaluationService 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::Ces::V1beta::EvaluationService::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 + + @evaluation_service_stub = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @evaluation_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 = @evaluation_service_stub.endpoint + config.universe_domain = @evaluation_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @evaluation_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationService::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 + @evaluation_service_stub.logger + end + + # Service calls + + ## + # Runs an evaluation of the app. + # + # @overload run_evaluation(request, options = nil) + # Pass arguments to `run_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RunEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_evaluation(app: nil, evaluations: nil, evaluation_dataset: nil, display_name: nil, app_version: nil, config: nil, run_count: nil, persona_run_configs: nil, optimization_config: nil, scheduled_evaluation_run: nil, golden_run_method: nil, generate_latency_report: nil) + # Pass arguments to `run_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param app [::String] + # Required. The app to evaluate. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param evaluations [::Array<::String>] + # Optional. List of evaluations to run. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @param evaluation_dataset [::String] + # Optional. An evaluation dataset to run. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` + # @param display_name [::String] + # Optional. The display name of the evaluation run. + # @param app_version [::String] + # Optional. The app version to evaluate. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # @param config [::Google::Cloud::Ces::V1beta::EvaluationConfig, ::Hash] + # Optional. The configuration to use for the run. + # @param run_count [::Integer] + # Optional. The number of times to run the evaluation. If not set, the + # default value is 1 per golden, and 5 per scenario. + # @param persona_run_configs [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig, ::Hash>] + # Optional. The configuration to use for the run per persona. + # @param optimization_config [::Google::Cloud::Ces::V1beta::OptimizationConfig, ::Hash] + # Optional. Configuration for running the optimization step after the + # evaluation run. If not set, the optimization step will not be run. + # @param scheduled_evaluation_run [::String] + # Optional. The resource name of the `ScheduledEvaluationRun` that is + # triggering this evaluation run. + # + # If this field is set, the `scheduled_evaluation_run` field on the created + # `EvaluationRun` resource will be populated from this value. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}` + # @param golden_run_method [::Google::Cloud::Ces::V1beta::GoldenRunMethod] + # Optional. The method to run the evaluation if it is a golden evaluation. If + # not set, default to STABLE. + # @param generate_latency_report [::Boolean] + # Optional. Whether to generate a latency report for the evaluation run. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RunEvaluationRequest.new + # + # # Call the run_evaluation method. + # result = client.run_evaluation 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 run_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.run_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.run_evaluation 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 + + ## + # Uploads audio for use in Golden Evaluations. Stores the audio in the Cloud + # Storage bucket defined in + # 'App.logging_settings.evaluation_audio_recording_config.gcs_bucket' and + # returns a transcript. + # + # @overload upload_evaluation_audio(request, options = nil) + # Pass arguments to `upload_evaluation_audio` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload upload_evaluation_audio(name: nil, audio_content: nil, previous_audio_gcs_uri: nil) + # Pass arguments to `upload_evaluation_audio` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Evaluation for which to upload the + # evaluation audio. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @param audio_content [::String] + # Required. The raw audio bytes. + # The format of the audio must be single-channel LINEAR16 with a sample + # rate of 16kHz (default InputAudioConfig). + # @param previous_audio_gcs_uri [::String] + # Optional. The Google Cloud Storage URI of the previously uploaded audio + # file to be deleted. Format: `gs:///` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new + # + # # Call the upload_evaluation_audio method. + # result = client.upload_evaluation_audio request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse. + # p result + # + def upload_evaluation_audio request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.upload_evaluation_audio.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.upload_evaluation_audio.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.upload_evaluation_audio.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.upload_evaluation_audio 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 an evaluation. + # + # @overload create_evaluation(request, options = nil) + # Pass arguments to `create_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation(parent: nil, evaluation_id: nil, evaluation: nil) + # Pass arguments to `create_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The app to create the evaluation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param evaluation_id [::String] + # Optional. The ID to use for the evaluation, which will become the final + # component of the evaluation's resource name. If not provided, a unique ID + # will be automatically assigned for the evaluation. + # @param evaluation [::Google::Cloud::Ces::V1beta::Evaluation, ::Hash] + # Required. The evaluation to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Evaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new + # + # # Call the create_evaluation method. + # result = client.create_evaluation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. + # p result + # + def create_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest + + # Converts hash and nil to an 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_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.create_evaluation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a golden evaluation from a conversation. + # + # @overload generate_evaluation(request, options = nil) + # Pass arguments to `generate_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload generate_evaluation(conversation: nil, source: nil) + # Pass arguments to `generate_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversation [::String] + # Required. The conversation to create the golden evaluation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` + # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, all sources + # will be searched. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new + # + # # Call the generate_evaluation method. + # result = client.generate_evaluation 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 generate_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.generate_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.generate_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.generate_evaluation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports evaluations into the app. + # + # @overload import_evaluations(request, options = nil) + # Pass arguments to `import_evaluations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_evaluations(conversation_list: nil, gcs_uri: nil, csv_content: nil, parent: nil, import_options: nil) + # Pass arguments to `import_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversation_list [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ConversationList, ::Hash] + # The conversations to import the evaluations from. + # + # Note: The following parameters are mutually exclusive: `conversation_list`, `gcs_uri`, `csv_content`. 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 gcs_uri [::String] + # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + # from which to import evaluations. The format of this URI must be + # `gs:///`. + # + # Note: The following parameters are mutually exclusive: `gcs_uri`, `conversation_list`, `csv_content`. 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 csv_content [::String] + # Raw bytes representing the csv file with the evaluations structure. + # + # Note: The following parameters are mutually exclusive: `csv_content`, `conversation_list`, `gcs_uri`. 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 parent [::String] + # Required. The app to import the evaluations into. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param import_options [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions, ::Hash] + # Optional. Options governing the import process for the evaluations. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new + # + # # Call the import_evaluations method. + # result = client.import_evaluations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.import_evaluations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.import_evaluations 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 + + ## + # Creates an evaluation dataset. + # + # @overload create_evaluation_dataset(request, options = nil) + # Pass arguments to `create_evaluation_dataset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_dataset(parent: nil, evaluation_dataset_id: nil, evaluation_dataset: nil) + # Pass arguments to `create_evaluation_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The app to create the evaluation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param evaluation_dataset_id [::String] + # Optional. The ID to use for the evaluation dataset, which will become the + # final component of the evaluation dataset's resource name. If not provided, + # a unique ID will be automatically assigned for the evaluation. + # @param evaluation_dataset [::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash] + # Required. The evaluation dataset to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new + # + # # Call the create_evaluation_dataset method. + # result = client.create_evaluation_dataset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. + # p result + # + def create_evaluation_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest + + # Converts hash and nil to an 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_evaluation_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_evaluation_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.create_evaluation_dataset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an evaluation. + # + # @overload update_evaluation(request, options = nil) + # Pass arguments to `update_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation(evaluation: nil, update_mask: nil) + # Pass arguments to `update_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param evaluation [::Google::Cloud::Ces::V1beta::Evaluation, ::Hash] + # Required. The evaluation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Evaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new + # + # # Call the update_evaluation method. + # result = client.update_evaluation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. + # p result + # + def update_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest + + # Converts hash and nil to an 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_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.update_evaluation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an evaluation dataset. + # + # @overload update_evaluation_dataset(request, options = nil) + # Pass arguments to `update_evaluation_dataset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_dataset(evaluation_dataset: nil, update_mask: nil) + # Pass arguments to `update_evaluation_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param evaluation_dataset [::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash] + # Required. The evaluation dataset to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new + # + # # Call the update_evaluation_dataset method. + # result = client.update_evaluation_dataset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. + # p result + # + def update_evaluation_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest + + # Converts hash and nil to an 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_evaluation_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_evaluation_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.update_evaluation_dataset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an evaluation. + # + # @overload delete_evaluation(request, options = nil) + # Pass arguments to `delete_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation(name: nil, force: nil, etag: nil) + # Pass arguments to `delete_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation to delete. + # @param force [::Boolean] + # Optional. Indicates whether to forcefully delete the evaluation, even if it + # is still referenced by evaluation datasets. + # + # * If `force = false`, the deletion will fail if any datasets still + # reference the evaluation. + # * If `force = true`, all existing references from datasets will be removed + # and the evaluation will be deleted. + # @param etag [::String] + # Optional. The current etag of the evaluation. If an etag is not provided, + # the deletion will overwrite any concurrent changes. If an etag is provided + # and does not match the current etag of the evaluation, deletion will be + # blocked and an ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new + # + # # Call the delete_evaluation method. + # result = client.delete_evaluation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest + + # Converts hash and nil to an 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_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.delete_evaluation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an evaluation result. + # + # @overload delete_evaluation_result(request, options = nil) + # Pass arguments to `delete_evaluation_result` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_result(name: nil) + # Pass arguments to `delete_evaluation_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation result to delete. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new + # + # # Call the delete_evaluation_result method. + # result = client.delete_evaluation_result request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_evaluation_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest + + # Converts hash and nil to an 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_evaluation_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_result.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_evaluation_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.delete_evaluation_result 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 an evaluation dataset. + # + # @overload delete_evaluation_dataset(request, options = nil) + # Pass arguments to `delete_evaluation_dataset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_dataset(name: nil, etag: nil) + # Pass arguments to `delete_evaluation_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation dataset to delete. + # @param etag [::String] + # Optional. The current etag of the evaluation dataset. If an etag is not + # provided, the deletion will overwrite any concurrent changes. If an etag is + # provided and does not match the current etag of the evaluation dataset, + # deletion will be blocked and an ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new + # + # # Call the delete_evaluation_dataset method. + # result = client.delete_evaluation_dataset request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_evaluation_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest + + # Converts hash and nil to an 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_evaluation_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_evaluation_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.delete_evaluation_dataset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an evaluation run. + # + # @overload delete_evaluation_run(request, options = nil) + # Pass arguments to `delete_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_run(name: nil) + # Pass arguments to `delete_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation run to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new + # + # # Call the delete_evaluation_run method. + # result = client.delete_evaluation_run 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_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest + + # Converts hash and nil to an 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_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.delete_evaluation_run 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 details of the specified evaluation. + # + # @overload get_evaluation(request, options = nil) + # Pass arguments to `get_evaluation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetEvaluationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation(name: nil) + # Pass arguments to `get_evaluation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::Evaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetEvaluationRequest.new + # + # # Call the get_evaluation method. + # result = client.get_evaluation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. + # p result + # + def get_evaluation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRequest + + # Converts hash and nil to an 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_evaluation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_evaluation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.get_evaluation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified evaluation result. + # + # @overload get_evaluation_result(request, options = nil) + # Pass arguments to `get_evaluation_result` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_result(name: nil) + # Pass arguments to `get_evaluation_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation result to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationResult] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new + # + # # Call the get_evaluation_result method. + # result = client.get_evaluation_result request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationResult. + # p result + # + def get_evaluation_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest + + # Converts hash and nil to an 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_evaluation_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_result.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_evaluation_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.get_evaluation_result 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 the specified evaluation dataset. + # + # @overload get_evaluation_dataset(request, options = nil) + # Pass arguments to `get_evaluation_dataset` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_dataset(name: nil) + # Pass arguments to `get_evaluation_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation dataset to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new + # + # # Call the get_evaluation_dataset method. + # result = client.get_evaluation_dataset request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. + # p result + # + def get_evaluation_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest + + # Converts hash and nil to an 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_evaluation_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_evaluation_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.get_evaluation_dataset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified evaluation run. + # + # @overload get_evaluation_run(request, options = nil) + # Pass arguments to `get_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_run(name: nil) + # Pass arguments to `get_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation run to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new + # + # # Call the get_evaluation_run method. + # result = client.get_evaluation_run request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationRun. + # p result + # + def get_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest + + # Converts hash and nil to an 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_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.get_evaluation_run 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 evaluations in the given app. + # + # @overload list_evaluations(request, options = nil) + # Pass arguments to `list_evaluations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, evaluation_filter: nil, evaluation_run_filter: nil, order_by: nil, last_ten_results: nil) + # Pass arguments to `list_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list evaluations from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluations EvaluationService.ListEvaluations} + # call. + # @param filter [::String] + # Optional. Deprecated: Use evaluation_filter and evaluation_run_filter + # instead. + # @param evaluation_filter [::String] + # Optional. Filter to be applied on the evaluation when listing the + # evaluations. See https://google.aip.dev/160 for more details. Supported + # fields: evaluation_datasets + # @param evaluation_run_filter [::String] + # Optional. Filter string for fields on the associated EvaluationRun + # resources. See https://google.aip.dev/160 for more details. Supported + # fields: create_time, initiated_by, app_version_display_name + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # @param last_ten_results [::Boolean] + # Optional. Whether to include the last 10 evaluation results for each + # evaluation in the response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new + # + # # Call the list_evaluations method. + # result = client.list_evaluations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Ces::V1beta::Evaluation. + # p item + # end + # + def list_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest + + # Converts hash and nil to an 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_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.list_evaluations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluations, "evaluations", 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 evaluation results for a given evaluation. + # + # @overload list_evaluation_results(request, options = nil) + # Pass arguments to `list_evaluation_results` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_evaluation_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the evaluation to list evaluation results + # from. To filter by evaluation run, use `-` as the evaluation ID and specify + # the evaluation run ID in the filter. For example: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/-` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_results EvaluationService.ListEvaluationResults} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the evaluation results. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new + # + # # Call the list_evaluation_results method. + # result = client.list_evaluation_results 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::Ces::V1beta::EvaluationResult. + # p item + # end + # + def list_evaluation_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest + + # Converts hash and nil to an 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_evaluation_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_results.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_evaluation_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.list_evaluation_results request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_results, "evaluation_results", 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 evaluation datasets in the given app. + # + # @overload list_evaluation_datasets(request, options = nil) + # Pass arguments to `list_evaluation_datasets` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_evaluation_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list evaluation datasets from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the evaluation datasets. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new + # + # # Call the list_evaluation_datasets method. + # result = client.list_evaluation_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Ces::V1beta::EvaluationDataset. + # p item + # end + # + def list_evaluation_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest + + # Converts hash and nil to an 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_evaluation_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_datasets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_evaluation_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.list_evaluation_datasets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_datasets, "evaluation_datasets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all evaluation runs in the given app. + # + # @overload list_evaluation_runs(request, options = nil) + # Pass arguments to `list_evaluation_runs` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_evaluation_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list evaluation runs from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the evaluation runs. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new + # + # # Call the list_evaluation_runs method. + # result = client.list_evaluation_runs 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::Ces::V1beta::EvaluationRun. + # p item + # end + # + def list_evaluation_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest + + # Converts hash and nil to an 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_evaluation_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_evaluation_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.list_evaluation_runs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_runs, "evaluation_runs", 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 evaluation expectations in the given app. + # + # @overload list_evaluation_expectations(request, options = nil) + # Pass arguments to `list_evaluation_expectations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_expectations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_evaluation_expectations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list evaluation expectations + # from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the evaluation expectations. + # See https://google.aip.dev/160 for more details. + # @param order_by [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new + # + # # Call the list_evaluation_expectations method. + # result = client.list_evaluation_expectations 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::Ces::V1beta::EvaluationExpectation. + # p item + # end + # + def list_evaluation_expectations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest + + # Converts hash and nil to an 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_evaluation_expectations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_expectations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_evaluation_expectations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.list_evaluation_expectations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_expectations, "evaluation_expectations", 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 the specified evaluation expectation. + # + # @overload get_evaluation_expectation(request, options = nil) + # Pass arguments to `get_evaluation_expectation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_expectation(name: nil) + # Pass arguments to `get_evaluation_expectation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation expectation to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new + # + # # Call the get_evaluation_expectation method. + # result = client.get_evaluation_expectation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. + # p result + # + def get_evaluation_expectation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest + + # Converts hash and nil to an 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_evaluation_expectation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_evaluation_expectation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.get_evaluation_expectation 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 an evaluation expectation. + # + # @overload create_evaluation_expectation(request, options = nil) + # Pass arguments to `create_evaluation_expectation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_expectation(parent: nil, evaluation_expectation_id: nil, evaluation_expectation: nil) + # Pass arguments to `create_evaluation_expectation` via keyword arguments. Note that at + # least one keyword argument is 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 app to create the evaluation expectation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param evaluation_expectation_id [::String] + # Optional. The ID to use for the evaluation expectation, which will become + # the final component of the evaluation expectation's resource name. If not + # provided, a unique ID will be automatically assigned for the evaluation + # expectation. + # @param evaluation_expectation [::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash] + # Required. The evaluation expectation to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new + # + # # Call the create_evaluation_expectation method. + # result = client.create_evaluation_expectation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. + # p result + # + def create_evaluation_expectation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest + + # Converts hash and nil to an 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_evaluation_expectation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_evaluation_expectation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.create_evaluation_expectation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an evaluation expectation. + # + # @overload update_evaluation_expectation(request, options = nil) + # Pass arguments to `update_evaluation_expectation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_expectation(evaluation_expectation: nil, update_mask: nil) + # Pass arguments to `update_evaluation_expectation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param evaluation_expectation [::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash] + # Required. The evaluation expectation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new + # + # # Call the update_evaluation_expectation method. + # result = client.update_evaluation_expectation request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. + # p result + # + def update_evaluation_expectation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest + + # Converts hash and nil to an 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_evaluation_expectation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_evaluation_expectation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.update_evaluation_expectation 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 an evaluation expectation. + # + # @overload delete_evaluation_expectation(request, options = nil) + # Pass arguments to `delete_evaluation_expectation` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_evaluation_expectation(name: nil, etag: nil) + # Pass arguments to `delete_evaluation_expectation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the evaluation expectation to delete. + # @param etag [::String] + # Optional. The current etag of the evaluation expectation. If an etag is not + # provided, the deletion will overwrite any concurrent changes. If an etag is + # provided and does not match the current etag of the evaluation expectation, + # deletion will be blocked and an ABORTED error will be returned. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new + # + # # Call the delete_evaluation_expectation method. + # result = client.delete_evaluation_expectation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_evaluation_expectation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest + + # Converts hash and nil to an 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_evaluation_expectation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_evaluation_expectation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.delete_evaluation_expectation 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 scheduled evaluation run. + # + # @overload create_scheduled_evaluation_run(request, options = nil) + # Pass arguments to `create_scheduled_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(parent: nil, scheduled_evaluation_run_id: nil, scheduled_evaluation_run: nil) + # Pass arguments to `create_scheduled_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is 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 app to create the scheduled evaluation run for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param scheduled_evaluation_run_id [::String] + # Optional. The ID to use for the scheduled evaluation run, which will become + # the final component of the scheduled evaluation run's resource name. If not + # provided, a unique ID will be automatically assigned. + # @param scheduled_evaluation_run [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash] + # Required. The scheduled evaluation run to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new + # + # # Call the create_scheduled_evaluation_run method. + # result = client.create_scheduled_evaluation_run request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. + # p result + # + def create_scheduled_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest + + # Converts hash and nil to an 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_scheduled_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_scheduled_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.create_scheduled_evaluation_run 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 the specified scheduled evaluation run. + # + # @overload get_scheduled_evaluation_run(request, options = nil) + # Pass arguments to `get_scheduled_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(name: nil) + # Pass arguments to `get_scheduled_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the scheduled evaluation run to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new + # + # # Call the get_scheduled_evaluation_run method. + # result = client.get_scheduled_evaluation_run request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. + # p result + # + def get_scheduled_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest + + # Converts hash and nil to an 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_scheduled_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scheduled_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.get_scheduled_evaluation_run 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 scheduled evaluation runs in the given app. + # + # @overload list_scheduled_evaluation_runs(request, options = nil) + # Pass arguments to `list_scheduled_evaluation_runs` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scheduled_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_scheduled_evaluation_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to list scheduled evaluation runs + # from. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns} + # call. + # @param filter [::String] + # Optional. Filter to be applied when listing the scheduled evaluation runs. + # See https://google.aip.dev/160 for more details. + # Currently supports filtering by: + # * request.evaluations:evaluation_id + # * request.evaluation_dataset:evaluation_dataset_id + # @param order_by [::String] + # Optional. Field to sort by. Supported fields are: + # "name" (ascending), "create_time" (descending), "update_time" (descending), + # "next_scheduled_execution" (ascending), and + # "last_completed_run.create_time" (descending). + # If not included, "update_time" will be the default. + # See https://google.aip.dev/132#ordering for more details. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new + # + # # Call the list_scheduled_evaluation_runs method. + # result = client.list_scheduled_evaluation_runs 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::Ces::V1beta::ScheduledEvaluationRun. + # p item + # end + # + def list_scheduled_evaluation_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest + + # Converts hash and nil to an 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_scheduled_evaluation_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scheduled_evaluation_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.list_scheduled_evaluation_runs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_scheduled_evaluation_runs, "scheduled_evaluation_runs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a scheduled evaluation run. + # + # @overload update_scheduled_evaluation_run(request, options = nil) + # Pass arguments to `update_scheduled_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(scheduled_evaluation_run: nil, update_mask: nil) + # Pass arguments to `update_scheduled_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param scheduled_evaluation_run [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash] + # Required. The scheduled evaluation run to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new + # + # # Call the update_scheduled_evaluation_run method. + # result = client.update_scheduled_evaluation_run request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. + # p result + # + def update_scheduled_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest + + # Converts hash and nil to an 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_scheduled_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_scheduled_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.update_scheduled_evaluation_run 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 scheduled evaluation run. + # + # @overload delete_scheduled_evaluation_run(request, options = nil) + # Pass arguments to `delete_scheduled_evaluation_run` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(name: nil, etag: nil) + # Pass arguments to `delete_scheduled_evaluation_run` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the scheduled evaluation run to delete. + # @param etag [::String] + # Optional. The etag of the ScheduledEvaluationRun. + # If provided, it must match the server's etag. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new + # + # # Call the delete_scheduled_evaluation_run method. + # result = client.delete_scheduled_evaluation_run request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_scheduled_evaluation_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest + + # Converts hash and nil to an 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_scheduled_evaluation_run.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_scheduled_evaluation_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.delete_scheduled_evaluation_run 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 + + ## + # Tests the voice of a persona. Also accepts a default persona. + # + # @overload test_persona_voice(request, options = nil) + # Pass arguments to `test_persona_voice` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_persona_voice(app: nil, persona_id: nil, text: nil) + # Pass arguments to `test_persona_voice` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param app [::String] + # Required. the resource name of the app to test the persona voice for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @param persona_id [::String] + # Required. The persona ID to test the voice for. Also accepts "default". + # @param text [::String] + # Required. The text to test the voice for. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new + # + # # Call the test_persona_voice method. + # result = client.test_persona_voice request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse. + # p result + # + def test_persona_voice request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_persona_voice.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.test_persona_voice.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_persona_voice.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.test_persona_voice request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports evaluations. + # + # @overload export_evaluations(request, options = nil) + # Pass arguments to `export_evaluations` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_evaluations(parent: nil, names: nil, export_options: nil, include_evaluation_results: nil, include_evaluations: nil) + # Pass arguments to `export_evaluations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to export evaluations from. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @param names [::Array<::String>] + # Required. The resource names of the evaluations to export. + # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] + # Optional. The export options for the evaluations. + # @param include_evaluation_results [::Boolean] + # Optional. Includes evaluation results in the export. At least one of + # include_evaluation_results or include_evaluations must be set. + # @param include_evaluations [::Boolean] + # Optional. Includes evaluations in the export. At least one of + # include_evaluation_results or include_evaluations must be set. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new + # + # # Call the export_evaluations method. + # result = client.export_evaluations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_evaluations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_evaluations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_evaluations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.export_evaluations request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports evaluations runs. + # + # @overload export_evaluation_runs(request, options = nil) + # Pass arguments to `export_evaluation_runs` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_evaluation_runs(parent: nil, names: nil, export_options: nil) + # Pass arguments to `export_evaluation_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to export evaluation runs from. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @param names [::Array<::String>] + # Required. The resource names of the evaluation runs to export. + # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] + # Optional. The export options for the evaluation runs. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new + # + # # Call the export_evaluation_runs method. + # result = client.export_evaluation_runs request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluation_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_evaluation_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_evaluation_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_evaluation_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.export_evaluation_runs request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports evaluations results. + # + # @overload export_evaluation_results(request, options = nil) + # Pass arguments to `export_evaluation_results` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_evaluation_results(parent: nil, names: nil, export_options: nil) + # Pass arguments to `export_evaluation_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the evaluation to export evaluation results + # from. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @param names [::Array<::String>] + # Required. The resource names of the evaluation results to export. + # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] + # Optional. The export options for the evaluation results. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new + # + # # Call the export_evaluation_results method. + # result = client.export_evaluation_results request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluation_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_evaluation_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_evaluation_results.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_evaluation_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.export_evaluation_results 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 + + ## + # Runs metrics on an existing evaluation result. + # + # @overload run_evaluation_result_metrics(request, options = nil) + # Pass arguments to `run_evaluation_result_metrics` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_evaluation_result_metrics(evaluation_result_id: nil) + # Pass arguments to `run_evaluation_result_metrics` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param evaluation_result_id [::String] + # Required. The evaluation result to run metrics for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}` + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new + # + # # Call the run_evaluation_result_metrics method. + # result = client.run_evaluation_result_metrics 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 run_evaluation_result_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_evaluation_result_metrics.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.run_evaluation_result_metrics.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_evaluation_result_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.run_evaluation_result_metrics request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the EvaluationService REST API. + # + # This class represents the configuration for EvaluationService 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::Ces::V1beta::EvaluationService::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 + # # run_evaluation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.run_evaluation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.run_evaluation.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 = "ces.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 EvaluationService 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 `run_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :run_evaluation + ## + # RPC-specific configuration for `upload_evaluation_audio` + # @return [::Gapic::Config::Method] + # + attr_reader :upload_evaluation_audio + ## + # RPC-specific configuration for `create_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_evaluation + ## + # RPC-specific configuration for `generate_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_evaluation + ## + # RPC-specific configuration for `import_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :import_evaluations + ## + # RPC-specific configuration for `create_evaluation_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_evaluation_dataset + ## + # RPC-specific configuration for `update_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_evaluation + ## + # RPC-specific configuration for `update_evaluation_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_evaluation_dataset + ## + # RPC-specific configuration for `delete_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation + ## + # RPC-specific configuration for `delete_evaluation_result` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation_result + ## + # RPC-specific configuration for `delete_evaluation_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation_dataset + ## + # RPC-specific configuration for `delete_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation_run + ## + # RPC-specific configuration for `get_evaluation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation + ## + # RPC-specific configuration for `get_evaluation_result` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation_result + ## + # RPC-specific configuration for `get_evaluation_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation_dataset + ## + # RPC-specific configuration for `get_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation_run + ## + # RPC-specific configuration for `list_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluations + ## + # RPC-specific configuration for `list_evaluation_results` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluation_results + ## + # RPC-specific configuration for `list_evaluation_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluation_datasets + ## + # RPC-specific configuration for `list_evaluation_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluation_runs + ## + # RPC-specific configuration for `list_evaluation_expectations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_evaluation_expectations + ## + # RPC-specific configuration for `get_evaluation_expectation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_evaluation_expectation + ## + # RPC-specific configuration for `create_evaluation_expectation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_evaluation_expectation + ## + # RPC-specific configuration for `update_evaluation_expectation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_evaluation_expectation + ## + # RPC-specific configuration for `delete_evaluation_expectation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_evaluation_expectation + ## + # RPC-specific configuration for `create_scheduled_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scheduled_evaluation_run + ## + # RPC-specific configuration for `get_scheduled_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scheduled_evaluation_run + ## + # RPC-specific configuration for `list_scheduled_evaluation_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scheduled_evaluation_runs + ## + # RPC-specific configuration for `update_scheduled_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scheduled_evaluation_run + ## + # RPC-specific configuration for `delete_scheduled_evaluation_run` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scheduled_evaluation_run + ## + # RPC-specific configuration for `test_persona_voice` + # @return [::Gapic::Config::Method] + # + attr_reader :test_persona_voice + ## + # RPC-specific configuration for `export_evaluations` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluations + ## + # RPC-specific configuration for `export_evaluation_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluation_runs + ## + # RPC-specific configuration for `export_evaluation_results` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluation_results + ## + # RPC-specific configuration for `run_evaluation_result_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :run_evaluation_result_metrics + + # @private + def initialize parent_rpcs = nil + run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation + @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config + upload_evaluation_audio_config = parent_rpcs.upload_evaluation_audio if parent_rpcs.respond_to? :upload_evaluation_audio + @upload_evaluation_audio = ::Gapic::Config::Method.new upload_evaluation_audio_config + create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation + @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config + generate_evaluation_config = parent_rpcs.generate_evaluation if parent_rpcs.respond_to? :generate_evaluation + @generate_evaluation = ::Gapic::Config::Method.new generate_evaluation_config + import_evaluations_config = parent_rpcs.import_evaluations if parent_rpcs.respond_to? :import_evaluations + @import_evaluations = ::Gapic::Config::Method.new import_evaluations_config + create_evaluation_dataset_config = parent_rpcs.create_evaluation_dataset if parent_rpcs.respond_to? :create_evaluation_dataset + @create_evaluation_dataset = ::Gapic::Config::Method.new create_evaluation_dataset_config + update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation + @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config + update_evaluation_dataset_config = parent_rpcs.update_evaluation_dataset if parent_rpcs.respond_to? :update_evaluation_dataset + @update_evaluation_dataset = ::Gapic::Config::Method.new update_evaluation_dataset_config + delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation + @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config + delete_evaluation_result_config = parent_rpcs.delete_evaluation_result if parent_rpcs.respond_to? :delete_evaluation_result + @delete_evaluation_result = ::Gapic::Config::Method.new delete_evaluation_result_config + delete_evaluation_dataset_config = parent_rpcs.delete_evaluation_dataset if parent_rpcs.respond_to? :delete_evaluation_dataset + @delete_evaluation_dataset = ::Gapic::Config::Method.new delete_evaluation_dataset_config + delete_evaluation_run_config = parent_rpcs.delete_evaluation_run if parent_rpcs.respond_to? :delete_evaluation_run + @delete_evaluation_run = ::Gapic::Config::Method.new delete_evaluation_run_config + get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation + @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config + get_evaluation_result_config = parent_rpcs.get_evaluation_result if parent_rpcs.respond_to? :get_evaluation_result + @get_evaluation_result = ::Gapic::Config::Method.new get_evaluation_result_config + get_evaluation_dataset_config = parent_rpcs.get_evaluation_dataset if parent_rpcs.respond_to? :get_evaluation_dataset + @get_evaluation_dataset = ::Gapic::Config::Method.new get_evaluation_dataset_config + get_evaluation_run_config = parent_rpcs.get_evaluation_run if parent_rpcs.respond_to? :get_evaluation_run + @get_evaluation_run = ::Gapic::Config::Method.new get_evaluation_run_config + list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations + @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config + list_evaluation_results_config = parent_rpcs.list_evaluation_results if parent_rpcs.respond_to? :list_evaluation_results + @list_evaluation_results = ::Gapic::Config::Method.new list_evaluation_results_config + list_evaluation_datasets_config = parent_rpcs.list_evaluation_datasets if parent_rpcs.respond_to? :list_evaluation_datasets + @list_evaluation_datasets = ::Gapic::Config::Method.new list_evaluation_datasets_config + list_evaluation_runs_config = parent_rpcs.list_evaluation_runs if parent_rpcs.respond_to? :list_evaluation_runs + @list_evaluation_runs = ::Gapic::Config::Method.new list_evaluation_runs_config + list_evaluation_expectations_config = parent_rpcs.list_evaluation_expectations if parent_rpcs.respond_to? :list_evaluation_expectations + @list_evaluation_expectations = ::Gapic::Config::Method.new list_evaluation_expectations_config + get_evaluation_expectation_config = parent_rpcs.get_evaluation_expectation if parent_rpcs.respond_to? :get_evaluation_expectation + @get_evaluation_expectation = ::Gapic::Config::Method.new get_evaluation_expectation_config + create_evaluation_expectation_config = parent_rpcs.create_evaluation_expectation if parent_rpcs.respond_to? :create_evaluation_expectation + @create_evaluation_expectation = ::Gapic::Config::Method.new create_evaluation_expectation_config + update_evaluation_expectation_config = parent_rpcs.update_evaluation_expectation if parent_rpcs.respond_to? :update_evaluation_expectation + @update_evaluation_expectation = ::Gapic::Config::Method.new update_evaluation_expectation_config + delete_evaluation_expectation_config = parent_rpcs.delete_evaluation_expectation if parent_rpcs.respond_to? :delete_evaluation_expectation + @delete_evaluation_expectation = ::Gapic::Config::Method.new delete_evaluation_expectation_config + create_scheduled_evaluation_run_config = parent_rpcs.create_scheduled_evaluation_run if parent_rpcs.respond_to? :create_scheduled_evaluation_run + @create_scheduled_evaluation_run = ::Gapic::Config::Method.new create_scheduled_evaluation_run_config + get_scheduled_evaluation_run_config = parent_rpcs.get_scheduled_evaluation_run if parent_rpcs.respond_to? :get_scheduled_evaluation_run + @get_scheduled_evaluation_run = ::Gapic::Config::Method.new get_scheduled_evaluation_run_config + list_scheduled_evaluation_runs_config = parent_rpcs.list_scheduled_evaluation_runs if parent_rpcs.respond_to? :list_scheduled_evaluation_runs + @list_scheduled_evaluation_runs = ::Gapic::Config::Method.new list_scheduled_evaluation_runs_config + update_scheduled_evaluation_run_config = parent_rpcs.update_scheduled_evaluation_run if parent_rpcs.respond_to? :update_scheduled_evaluation_run + @update_scheduled_evaluation_run = ::Gapic::Config::Method.new update_scheduled_evaluation_run_config + delete_scheduled_evaluation_run_config = parent_rpcs.delete_scheduled_evaluation_run if parent_rpcs.respond_to? :delete_scheduled_evaluation_run + @delete_scheduled_evaluation_run = ::Gapic::Config::Method.new delete_scheduled_evaluation_run_config + test_persona_voice_config = parent_rpcs.test_persona_voice if parent_rpcs.respond_to? :test_persona_voice + @test_persona_voice = ::Gapic::Config::Method.new test_persona_voice_config + export_evaluations_config = parent_rpcs.export_evaluations if parent_rpcs.respond_to? :export_evaluations + @export_evaluations = ::Gapic::Config::Method.new export_evaluations_config + export_evaluation_runs_config = parent_rpcs.export_evaluation_runs if parent_rpcs.respond_to? :export_evaluation_runs + @export_evaluation_runs = ::Gapic::Config::Method.new export_evaluation_runs_config + export_evaluation_results_config = parent_rpcs.export_evaluation_results if parent_rpcs.respond_to? :export_evaluation_results + @export_evaluation_results = ::Gapic::Config::Method.new export_evaluation_results_config + run_evaluation_result_metrics_config = parent_rpcs.run_evaluation_result_metrics if parent_rpcs.respond_to? :run_evaluation_result_metrics + @run_evaluation_result_metrics = ::Gapic::Config::Method.new run_evaluation_result_metrics_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb new file mode 100644 index 000000000000..f163054b6d8c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Ces + module V1beta + module EvaluationService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the EvaluationService 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 EvaluationService 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::Ces::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::Ces::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::Ces::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::Ces::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 = "ces.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-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb new file mode 100644 index 000000000000..b0a19ecc1815 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb @@ -0,0 +1,2233 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/evaluation_service_pb" + +module Google + module Cloud + module Ces + module V1beta + module EvaluationService + module Rest + ## + # REST service stub for the EvaluationService 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 run_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 run_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_evaluation", + 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 upload_evaluation_audio REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::UploadEvaluationAudioResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse] + # A result object deserialized from the server's reply + def upload_evaluation_audio request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_upload_evaluation_audio_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "upload_evaluation_audio", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse.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_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Evaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # A result object deserialized from the server's reply + def create_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Evaluation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the generate_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 generate_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "generate_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_evaluations REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_evaluations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_evaluations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_evaluations", + 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 create_evaluation_dataset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::EvaluationDataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # A result object deserialized from the server's reply + def create_evaluation_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_evaluation_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_evaluation_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.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_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Evaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # A result object deserialized from the server's reply + def update_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Evaluation.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_evaluation_dataset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::EvaluationDataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # A result object deserialized from the server's reply + def update_evaluation_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_evaluation_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_evaluation_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.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_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_evaluation", + 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 delete_evaluation_result REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_evaluation_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_result", + 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 delete_evaluation_dataset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_evaluation_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_evaluation_dataset", + 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 delete_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_evaluation_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_run_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_run", + 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_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::Evaluation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # A result object deserialized from the server's reply + def get_evaluation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_evaluation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::Evaluation.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_evaluation_result REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::EvaluationResult] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult] + # A result object deserialized from the server's reply + def get_evaluation_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_result", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::EvaluationResult.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_evaluation_dataset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::EvaluationDataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # A result object deserialized from the server's reply + def get_evaluation_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_evaluation_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.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_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::EvaluationRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationRun] + # A result object deserialized from the server's reply + def get_evaluation_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_run_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::EvaluationRun.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_evaluations REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListEvaluationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListEvaluationsResponse] + # A result object deserialized from the server's reply + def list_evaluations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_evaluations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListEvaluationsResponse.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_evaluation_results REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListEvaluationResultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse] + # A result object deserialized from the server's reply + def list_evaluation_results request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluation_results_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_results", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse.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_evaluation_datasets REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListEvaluationDatasetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse] + # A result object deserialized from the server's reply + def list_evaluation_datasets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluation_datasets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_evaluation_datasets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse.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_evaluation_runs REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListEvaluationRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse] + # A result object deserialized from the server's reply + def list_evaluation_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluation_runs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse.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_evaluation_expectations REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListEvaluationExpectationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse] + # A result object deserialized from the server's reply + def list_evaluation_expectations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluation_expectations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_expectations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse.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_evaluation_expectation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::EvaluationExpectation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # A result object deserialized from the server's reply + def get_evaluation_expectation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_expectation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_expectation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.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_evaluation_expectation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::EvaluationExpectation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # A result object deserialized from the server's reply + def create_evaluation_expectation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_evaluation_expectation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_expectation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.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_evaluation_expectation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::EvaluationExpectation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # A result object deserialized from the server's reply + def update_evaluation_expectation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_evaluation_expectation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_expectation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.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_evaluation_expectation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_evaluation_expectation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_expectation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_evaluation_expectation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_scheduled_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ScheduledEvaluationRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # A result object deserialized from the server's reply + def create_scheduled_evaluation_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_scheduled_evaluation_run_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_scheduled_evaluation_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.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_scheduled_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ScheduledEvaluationRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # A result object deserialized from the server's reply + def get_scheduled_evaluation_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scheduled_evaluation_run_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_scheduled_evaluation_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.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_scheduled_evaluation_runs REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ListScheduledEvaluationRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse] + # A result object deserialized from the server's reply + def list_scheduled_evaluation_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scheduled_evaluation_runs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_scheduled_evaluation_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse.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_scheduled_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ScheduledEvaluationRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # A result object deserialized from the server's reply + def update_scheduled_evaluation_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_scheduled_evaluation_run_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_scheduled_evaluation_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.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_scheduled_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_scheduled_evaluation_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_scheduled_evaluation_run_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_scheduled_evaluation_run", + 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 test_persona_voice REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::TestPersonaVoiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse] + # A result object deserialized from the server's reply + def test_persona_voice request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_persona_voice_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_persona_voice", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_evaluations REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_evaluations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_evaluations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_evaluation_runs REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_evaluation_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluation_runs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_evaluation_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_evaluation_results REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_evaluation_results request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluation_results_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_evaluation_results", + 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 run_evaluation_result_metrics REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 run_evaluation_result_metrics request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_evaluation_result_metrics_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_evaluation_result_metrics", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the run_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{app}:runEvaluation", + body: "*", + matches: [ + ["app", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the upload_evaluation_audio REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_upload_evaluation_audio_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:uploadEvaluationAudio", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationRequest] + # 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_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/evaluations", + body: "evaluation", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{conversation}:generateEvaluation", + body: "*", + matches: [ + ["conversation", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_evaluations REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_evaluations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}:importEvaluations", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_evaluation_dataset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest] + # 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_evaluation_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/evaluationDatasets", + body: "evaluation_dataset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest] + # 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_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{evaluation.name}", + body: "evaluation", + matches: [ + ["evaluation.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_evaluation_dataset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest] + # 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_evaluation_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{evaluation_dataset.name}", + body: "evaluation_dataset", + matches: [ + ["evaluation_dataset.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationDatasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest] + # 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_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_evaluation_result REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest] + # 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_evaluation_result_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/results/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_evaluation_dataset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest] + # 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_evaluation_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationDatasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest] + # 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_evaluation_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_evaluation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationRequest] + # 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_evaluation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_evaluation_result REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest] + # 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_evaluation_result_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/results/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_evaluation_dataset REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest] + # 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_evaluation_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationDatasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest] + # 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_evaluation_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_evaluations REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationsRequest] + # 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_evaluations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/evaluations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_evaluation_results REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest] + # 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_evaluation_results_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/results", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_evaluation_datasets REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest] + # 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_evaluation_datasets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/evaluationDatasets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_evaluation_runs REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest] + # 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_evaluation_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/evaluationRuns", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_evaluation_expectations REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest] + # 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_evaluation_expectations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/evaluationExpectations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_evaluation_expectation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest] + # 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_evaluation_expectation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationExpectations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_evaluation_expectation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest] + # 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_evaluation_expectation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/evaluationExpectations", + body: "evaluation_expectation", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_evaluation_expectation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest] + # 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_evaluation_expectation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{evaluation_expectation.name}", + body: "evaluation_expectation", + matches: [ + ["evaluation_expectation.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationExpectations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_evaluation_expectation REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest] + # 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_evaluation_expectation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationExpectations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_scheduled_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest] + # 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_scheduled_evaluation_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/scheduledEvaluationRuns", + body: "scheduled_evaluation_run", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scheduled_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest] + # 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_scheduled_evaluation_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/scheduledEvaluationRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_scheduled_evaluation_runs REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest] + # 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_scheduled_evaluation_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/scheduledEvaluationRuns", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_scheduled_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest] + # 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_scheduled_evaluation_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{scheduled_evaluation_run.name}", + body: "scheduled_evaluation_run", + matches: [ + ["scheduled_evaluation_run.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/scheduledEvaluationRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_scheduled_evaluation_run REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest] + # 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_scheduled_evaluation_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/scheduledEvaluationRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_persona_voice REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_persona_voice_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{app}:testPersonaVoice", + body: "*", + matches: [ + ["app", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_evaluations REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_evaluations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/evaluations:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_evaluation_runs REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_evaluation_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/evaluationRuns:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_evaluation_results REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_evaluation_results_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/results:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_evaluation_result_metrics REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_evaluation_result_metrics_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{evaluation_result_id}:runEvaluationResultMetrics", + body: "*", + matches: [ + ["evaluation_result_id", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/results/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb new file mode 100644 index 000000000000..de69e9e840e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb @@ -0,0 +1,93 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/evaluation_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/ces/v1beta/agent_service_pb' +require 'google/cloud/ces/v1beta/conversation_pb' +require 'google/cloud/ces/v1beta/evaluation_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/ces/v1beta/evaluation_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/ces/v1beta/agent_service.proto\x1a*google/cloud/ces/v1beta/conversation.proto\x1a(google/cloud/ces/v1beta/evaluation.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"n\n!RunEvaluationResultMetricsRequest\x12I\n\x14\x65valuation_result_id\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\"l\n\"RunEvaluationResultMetricsResponse\x12\x46\n\x06status\x18\x01 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\"V\n\x15RunEvaluationResponse\x12=\n\x0e\x65valuation_run\x18\x01 \x01(\tB%\xfa\x41\"\n ces.googleapis.com/EvaluationRun\"\xb9\x02\n\x1eRunEvaluationOperationMetadata\x12:\n\x0b\x65valuations\x18\x01 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12@\n\x0e\x65valuation_run\x18\x02 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\"%\n#GenerateEvaluationOperationMetadata\"&\n$DeleteEvaluationRunOperationMetadata\"\xa3\x01\n\x17\x43reateEvaluationRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x1a\n\revaluation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12<\n\nevaluation\x18\x03 \x01(\x0b\x32#.google.cloud.ces.v1beta.EvaluationB\x03\xe0\x41\x02\"\x9f\x01\n\x19GenerateEvaluationRequest\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x43\n\x06source\x18\x02 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x05\x18\x01\xe0\x41\x01\"\xfb\x04\n\x18ImportEvaluationsRequest\x12_\n\x11\x63onversation_list\x18\x02 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.ImportEvaluationsRequest.ConversationListH\x00\x12\x11\n\x07gcs_uri\x18\x03 \x01(\tH\x00\x12\x15\n\x0b\x63sv_content\x18\x04 \x01(\x0cH\x00\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\\\n\x0eimport_options\x18\x05 \x01(\x0b\x32?.google.cloud.ces.v1beta.ImportEvaluationsRequest.ImportOptionsB\x03\xe0\x41\x01\x1a.\n\x10\x43onversationList\x12\x1a\n\rconversations\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\x8b\x02\n\rImportOptions\x12\x85\x01\n\x1c\x63onflict_resolution_strategy\x18\x01 \x01(\x0e\x32Z.google.cloud.ces.v1beta.ImportEvaluationsRequest.ImportOptions.ConflictResolutionStrategyB\x03\xe0\x41\x01\"r\n\x1a\x43onflictResolutionStrategy\x12,\n(CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED\x10\x00\x12\r\n\tOVERWRITE\x10\x01\x12\x08\n\x04SKIP\x10\x02\x12\r\n\tDUPLICATE\x10\x03\x42\x08\n\x06source\"\xf5\x02\n\x19ImportEvaluationsResponse\x12\x38\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x12\x45\n\x12\x65valuation_results\x18\x04 \x03(\x0b\x32).google.cloud.ces.v1beta.EvaluationResult\x12?\n\x0f\x65valuation_runs\x18\x05 \x03(\x0b\x32&.google.cloud.ces.v1beta.EvaluationRun\x12\x1b\n\x0e\x65rror_messages\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x14import_failure_count\x18\x03 \x01(\x05\x12.\n&evaluation_result_import_failure_count\x18\x06 \x01(\x05\x12+\n#evaluation_run_import_failure_count\x18\x07 \x01(\x05\"\xaa\x01\n\"ImportEvaluationsOperationMetadata\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\x1b\n\x0estatus_message\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc1\x01\n\x1e\x43reateEvaluationDatasetRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\"\n\x15\x65valuation_dataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\x12\x65valuation_dataset\x18\x03 \x01(\x0b\x32*.google.cloud.ces.v1beta.EvaluationDatasetB\x03\xe0\x41\x02\"\x8d\x01\n\x17UpdateEvaluationRequest\x12<\n\nevaluation\x18\x01 \x01(\x0b\x32#.google.cloud.ces.v1beta.EvaluationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xa3\x01\n\x1eUpdateEvaluationDatasetRequest\x12K\n\x12\x65valuation_dataset\x18\x01 \x01(\x0b\x32*.google.cloud.ces.v1beta.EvaluationDatasetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"u\n\x17\x44\x65leteEvaluationRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Z\n\x1d\x44\x65leteEvaluationResultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\"o\n\x1e\x44\x65leteEvaluationDatasetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x1a\x44\x65leteEvaluationRunRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\"K\n\x14GetEvaluationRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\"W\n\x1aGetEvaluationResultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\"Y\n\x1bGetEvaluationDatasetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\"Q\n\x17GetEvaluationRunRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\"\x91\x02\n\x16ListEvaluationsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Evaluation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x06\x66ilter\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01\x12\x1e\n\x11\x65valuation_filter\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15\x65valuation_run_filter\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10last_ten_results\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x01\n\x1cListEvaluationResultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#ces.googleapis.com/EvaluationResult\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\"\xba\x01\n\x1dListEvaluationDatasetsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$ces.googleapis.com/EvaluationDataset\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\"\xb2\x01\n\x19ListEvaluationRunsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 ces.googleapis.com/EvaluationRun\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\"l\n\x17ListEvaluationsResponse\x12\x38\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x7f\n\x1dListEvaluationResultsResponse\x12\x45\n\x12\x65valuation_results\x18\x01 \x03(\x0b\x32).google.cloud.ces.v1beta.EvaluationResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x01\n\x1eListEvaluationDatasetsResponse\x12G\n\x13\x65valuation_datasets\x18\x01 \x03(\x0b\x32*.google.cloud.ces.v1beta.EvaluationDataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"v\n\x1aListEvaluationRunsResponse\x12?\n\x0f\x65valuation_runs\x18\x01 \x03(\x0b\x32&.google.cloud.ces.v1beta.EvaluationRun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd7\x01\n#CreateScheduledEvaluationRunRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12(\n\x1bscheduled_evaluation_run_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12V\n\x18scheduled_evaluation_run\x18\x03 \x01(\x0b\x32/.google.cloud.ces.v1beta.ScheduledEvaluationRunB\x03\xe0\x41\x02\"c\n GetScheduledEvaluationRunRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\"\xc4\x01\n\"ListScheduledEvaluationRunsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)ces.googleapis.com/ScheduledEvaluationRun\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\"\x92\x01\n#ListScheduledEvaluationRunsResponse\x12R\n\x19scheduled_evaluation_runs\x18\x01 \x03(\x0b\x32/.google.cloud.ces.v1beta.ScheduledEvaluationRun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb3\x01\n#UpdateScheduledEvaluationRunRequest\x12V\n\x18scheduled_evaluation_run\x18\x01 \x01(\x0b\x32/.google.cloud.ces.v1beta.ScheduledEvaluationRunB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"y\n#DeleteScheduledEvaluationRunRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n\x17TestPersonaVoiceRequest\x12+\n\x03\x61pp\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x17\n\npersona_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04text\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1cUploadEvaluationAudioRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x1a\n\raudio_content\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12#\n\x16previous_audio_gcs_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x1dUploadEvaluationAudioResponse\x12\x15\n\raudio_gcs_uri\x18\x01 \x01(\t\x12\x12\n\ntranscript\x18\x02 \x01(\t\x12+\n\x08\x64uration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\")\n\x18TestPersonaVoiceResponse\x12\r\n\x05\x61udio\x18\x01 \x01(\x0c\"\xd1\x01\n\"CreateEvaluationExpectationRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12&\n\x19\x65valuation_expectation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12S\n\x16\x65valuation_expectation\x18\x03 \x01(\x0b\x32..google.cloud.ces.v1beta.EvaluationExpectationB\x03\xe0\x41\x02\"\xaf\x01\n\"UpdateEvaluationExpectationRequest\x12S\n\x16\x65valuation_expectation\x18\x01 \x01(\x0b\x32..google.cloud.ces.v1beta.EvaluationExpectationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"w\n\"DeleteEvaluationExpectationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"a\n\x1fGetEvaluationExpectationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\"\xc2\x01\n!ListEvaluationExpectationsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(ces.googleapis.com/EvaluationExpectation\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\"\x8e\x01\n\"ListEvaluationExpectationsResponse\x12O\n\x17\x65valuation_expectations\x18\x01 \x03(\x0b\x32..google.cloud.ces.v1beta.EvaluationExpectation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb9\x01\n\rExportOptions\x12O\n\rexport_format\x18\x01 \x01(\x0e\x32\x33.google.cloud.ces.v1beta.ExportOptions.ExportFormatB\x03\xe0\x41\x01\x12\x14\n\x07gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\"A\n\x0c\x45xportFormat\x12\x1d\n\x19\x45XPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x08\n\x04YAML\x10\x02\"\x90\x02\n\x18\x45xportEvaluationsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x34\n\x05names\x18\x02 \x03(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x43\n\x0e\x65xport_options\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ExportOptionsB\x03\xe0\x41\x01\x12\'\n\x1ainclude_evaluation_results\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13include_evaluations\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x02\n\x19\x45xportEvaluationsResponse\x12\x1d\n\x13\x65valuations_content\x18\x01 \x01(\x0cH\x00\x12\x19\n\x0f\x65valuations_uri\x18\x02 \x01(\tH\x00\x12j\n\x12\x66\x61iled_evaluations\x18\x03 \x03(\x0b\x32I.google.cloud.ces.v1beta.ExportEvaluationsResponse.FailedEvaluationsEntryB\x03\xe0\x41\x03\x1a\x38\n\x16\x46\x61iledEvaluationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x65valuations\"\xd8\x01\n\x1e\x45xportEvaluationResultsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12:\n\x05names\x18\x02 \x03(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\x12\x43\n\x0e\x65xport_options\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ExportOptionsB\x03\xe0\x41\x01\"\x7f\n\x1f\x45xportEvaluationResultsResponse\x12$\n\x1a\x65valuation_results_content\x18\x01 \x01(\x0cH\x00\x12 \n\x16\x65valuation_results_uri\x18\x02 \x01(\tH\x00\x42\x14\n\x12\x65valuation_results\"\xcb\x01\n\x1b\x45xportEvaluationRunsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x37\n\x05names\x18\x02 \x03(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x43\n\x0e\x65xport_options\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ExportOptionsB\x03\xe0\x41\x01\"s\n\x1c\x45xportEvaluationRunsResponse\x12!\n\x17\x65valuation_runs_content\x18\x01 \x01(\x0cH\x00\x12\x1d\n\x13\x65valuation_runs_uri\x18\x02 \x01(\tH\x00\x42\x11\n\x0f\x65valuation_runs\"\'\n%ExportEvaluationRunsOperationMetadata\"*\n(ExportEvaluationResultsOperationMetadata\"-\n+RunEvaluationResultMetricsOperationMetadata2\xb9\x43\n\x11\x45valuationService\x12\xe4\x01\n\rRunEvaluation\x12-.google.cloud.ces.v1beta.RunEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\x37\n\x15RunEvaluationResponse\x12\x1eRunEvaluationOperationMetadata\xda\x41\x03\x61pp\x82\xd3\xe4\x93\x02>\"9/v1beta/{app=projects/*/locations/*/apps/*}:runEvaluation:\x01*\x12\xf8\x01\n\x15UploadEvaluationAudio\x12\x35.google.cloud.ces.v1beta.UploadEvaluationAudioRequest\x1a\x36.google.cloud.ces.v1beta.UploadEvaluationAudioResponse\"p\xda\x41\x12name,audio_content\x82\xd3\xe4\x93\x02U\"P/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}:uploadEvaluationAudio:\x01*\x12\xf0\x01\n\x10\x43reateEvaluation\x12\x30.google.cloud.ces.v1beta.CreateEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"\x84\x01\xda\x41\x1fparent,evaluation,evaluation_id\xda\x41\x11parent,evaluation\x82\xd3\xe4\x93\x02H\":/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations:\nevaluation\x12\x8f\x02\n\x12GenerateEvaluation\x12\x32.google.cloud.ces.v1beta.GenerateEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41\x31\n\nEvaluation\x12#GenerateEvaluationOperationMetadata\xda\x41\x0c\x63onversation\x82\xd3\xe4\x93\x02\\\"W/v1beta/{conversation=projects/*/locations/*/apps/*/conversations/*}:generateEvaluation:\x01*\x12\xfe\x01\n\x11ImportEvaluations\x12\x31.google.cloud.ces.v1beta.ImportEvaluationsRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41?\n\x19ImportEvaluationsResponse\x12\"ImportEvaluationsOperationMetadata\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\"@/v1beta/{parent=projects/*/locations/*/apps/*}:importEvaluations:\x01*\x12\xac\x02\n\x17\x43reateEvaluationDataset\x12\x37.google.cloud.ces.v1beta.CreateEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"\xab\x01\xda\x41/parent,evaluation_dataset,evaluation_dataset_id\xda\x41\x19parent,evaluation_dataset\x82\xd3\xe4\x93\x02W\"A/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationDatasets:\x12\x65valuation_dataset\x12\xdd\x01\n\x10UpdateEvaluation\x12\x30.google.cloud.ces.v1beta.UpdateEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"r\xda\x41\x16\x65valuation,update_mask\x82\xd3\xe4\x93\x02S2E/v1beta/{evaluation.name=projects/*/locations/*/apps/*/evaluations/*}:\nevaluation\x12\x92\x02\n\x17UpdateEvaluationDataset\x12\x37.google.cloud.ces.v1beta.UpdateEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"\x91\x01\xda\x41\x1e\x65valuation_dataset,update_mask\x82\xd3\xe4\x93\x02j2T/v1beta/{evaluation_dataset.name=projects/*/locations/*/apps/*/evaluationDatasets/*}:\x12\x65valuation_dataset\x12\xa7\x01\n\x10\x44\x65leteEvaluation\x12\x30.google.cloud.ces.v1beta.DeleteEvaluationRequest\x1a\x16.google.protobuf.Empty\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}\x12\xbd\x01\n\x16\x44\x65leteEvaluationResult\x12\x36.google.cloud.ces.v1beta.DeleteEvaluationResultRequest\x1a\x16.google.protobuf.Empty\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*/results/*}\x12\xbc\x01\n\x17\x44\x65leteEvaluationDataset\x12\x37.google.cloud.ces.v1beta.DeleteEvaluationDatasetRequest\x1a\x16.google.protobuf.Empty\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43*A/v1beta/{name=projects/*/locations/*/apps/*/evaluationDatasets/*}\x12\xf8\x01\n\x13\x44\x65leteEvaluationRun\x12\x33.google.cloud.ces.v1beta.DeleteEvaluationRunRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41=\n\x15google.protobuf.Empty\x12$DeleteEvaluationRunOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1beta/{name=projects/*/locations/*/apps/*/evaluationRuns/*}\x12\xae\x01\n\rGetEvaluation\x12-.google.cloud.ces.v1beta.GetEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}\x12\xca\x01\n\x13GetEvaluationResult\x12\x33.google.cloud.ces.v1beta.GetEvaluationResultRequest\x1a).google.cloud.ces.v1beta.EvaluationResult\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*/results/*}\x12\xca\x01\n\x14GetEvaluationDataset\x12\x34.google.cloud.ces.v1beta.GetEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta/{name=projects/*/locations/*/apps/*/evaluationDatasets/*}\x12\xba\x01\n\x10GetEvaluationRun\x12\x30.google.cloud.ces.v1beta.GetEvaluationRunRequest\x1a&.google.cloud.ces.v1beta.EvaluationRun\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1beta/{name=projects/*/locations/*/apps/*/evaluationRuns/*}\x12\xc1\x01\n\x0fListEvaluations\x12/.google.cloud.ces.v1beta.ListEvaluationsRequest\x1a\x30.google.cloud.ces.v1beta.ListEvaluationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations\x12\xdd\x01\n\x15ListEvaluationResults\x12\x35.google.cloud.ces.v1beta.ListEvaluationResultsRequest\x1a\x36.google.cloud.ces.v1beta.ListEvaluationResultsResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1beta/{parent=projects/*/locations/*/apps/*/evaluations/*}/results\x12\xdd\x01\n\x16ListEvaluationDatasets\x12\x36.google.cloud.ces.v1beta.ListEvaluationDatasetsRequest\x1a\x37.google.cloud.ces.v1beta.ListEvaluationDatasetsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationDatasets\x12\xcd\x01\n\x12ListEvaluationRuns\x12\x32.google.cloud.ces.v1beta.ListEvaluationRunsRequest\x1a\x33.google.cloud.ces.v1beta.ListEvaluationRunsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationRuns\x12\xed\x01\n\x1aListEvaluationExpectations\x12:.google.cloud.ces.v1beta.ListEvaluationExpectationsRequest\x1a;.google.cloud.ces.v1beta.ListEvaluationExpectationsResponse\"V\xda\x41\x06parent\x82\xd3\xe4\x93\x02G\x12\x45/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationExpectations\x12\xda\x01\n\x18GetEvaluationExpectation\x12\x38.google.cloud.ces.v1beta.GetEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1beta/{name=projects/*/locations/*/apps/*/evaluationExpectations/*}\x12\xcc\x02\n\x1b\x43reateEvaluationExpectation\x12;.google.cloud.ces.v1beta.CreateEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"\xbf\x01\xda\x41\x37parent,evaluation_expectation,evaluation_expectation_id\xda\x41\x1dparent,evaluation_expectation\x82\xd3\xe4\x93\x02_\"E/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationExpectations:\x16\x65valuation_expectation\x12\xae\x02\n\x1bUpdateEvaluationExpectation\x12;.google.cloud.ces.v1beta.UpdateEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"\xa1\x01\xda\x41\"evaluation_expectation,update_mask\x82\xd3\xe4\x93\x02v2\\/v1beta/{evaluation_expectation.name=projects/*/locations/*/apps/*/evaluationExpectations/*}:\x16\x65valuation_expectation\x12\xc8\x01\n\x1b\x44\x65leteEvaluationExpectation\x12;.google.cloud.ces.v1beta.DeleteEvaluationExpectationRequest\x1a\x16.google.protobuf.Empty\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G*E/v1beta/{name=projects/*/locations/*/apps/*/evaluationExpectations/*}\x12\xd8\x02\n\x1c\x43reateScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.CreateScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"\xc8\x01\xda\x41;parent,scheduled_evaluation_run,scheduled_evaluation_run_id\xda\x41\x1fparent,scheduled_evaluation_run\x82\xd3\xe4\x93\x02\x62\"F/v1beta/{parent=projects/*/locations/*/apps/*}/scheduledEvaluationRuns:\x18scheduled_evaluation_run\x12\xde\x01\n\x19GetScheduledEvaluationRun\x12\x39.google.cloud.ces.v1beta.GetScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1beta/{name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}\x12\xf1\x01\n\x1bListScheduledEvaluationRuns\x12;.google.cloud.ces.v1beta.ListScheduledEvaluationRunsRequest\x1a<.google.cloud.ces.v1beta.ListScheduledEvaluationRunsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1beta/{parent=projects/*/locations/*/apps/*}/scheduledEvaluationRuns\x12\xb8\x02\n\x1cUpdateScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.UpdateScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"\xa8\x01\xda\x41$scheduled_evaluation_run,update_mask\x82\xd3\xe4\x93\x02{2_/v1beta/{scheduled_evaluation_run.name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}:\x18scheduled_evaluation_run\x12\xcb\x01\n\x1c\x44\x65leteScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.DeleteScheduledEvaluationRunRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1beta/{name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}\x12\xc6\x01\n\x10TestPersonaVoice\x12\x30.google.cloud.ces.v1beta.TestPersonaVoiceRequest\x1a\x31.google.cloud.ces.v1beta.TestPersonaVoiceResponse\"M\xda\x41\x03\x61pp\x82\xd3\xe4\x93\x02\x41\"] + # Required. Inputs for the session. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::RunSessionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::RunSessionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RunSessionRequest.new + # + # # Call the run_session method. + # result = client.run_session request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::RunSessionResponse. + # p result + # + def run_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.config&.session + header_params["config.session"] = request.config.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :run_session, 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 + + ## + # Initiates a single-turn interaction with the CES agent. Uses server-side + # streaming to deliver incremental results and partial responses as they are + # generated. + # + # By default, complete responses (e.g., messages from callbacks or full LLM + # responses) are sent to the client as soon as they are available. To enable + # streaming individual text chunks directly from the model, set + # {::Google::Cloud::Ces::V1beta::SessionConfig#enable_text_streaming enable_text_streaming} + # to true. + # + # @overload stream_run_session(request, options = nil) + # Pass arguments to `stream_run_session` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RunSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RunSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload stream_run_session(config: nil, inputs: nil) + # Pass arguments to `stream_run_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Ces::V1beta::SessionConfig, ::Hash] + # Required. The configuration for the session. + # @param inputs [::Array<::Google::Cloud::Ces::V1beta::SessionInput, ::Hash>] + # Required. Inputs for the session. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Ces::V1beta::RunSessionResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Ces::V1beta::RunSessionResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::SessionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RunSessionRequest.new + # + # # Call the stream_run_session method to start streaming. + # output = client.stream_run_session request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Ces::V1beta::RunSessionResponse + # output.each do |current_response| + # p current_response + # end + # + def stream_run_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.stream_run_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.config&.session + header_params["config.session"] = request.config.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.stream_run_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stream_run_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :stream_run_session, 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 + + ## + # Establishes a bidirectional streaming connection with the CES agent. + # The agent processes continuous multimodal inputs (e.g., text, audio) and + # generates real-time multimodal output streams. + # + # --- Client Request Stream --- + # The client streams requests in the following order: + # + # 1. Initialization: + # The first message must contain + # {::Google::Cloud::Ces::V1beta::BidiSessionClientMessage#config SessionConfig}. + # For audio sessions, this should also include + # {::Google::Cloud::Ces::V1beta::SessionConfig#input_audio_config InputAudioConfig} + # and + # {::Google::Cloud::Ces::V1beta::SessionConfig#output_audio_config OutputAudioConfig} + # to define audio processing and synthesis parameters. + # + # 2. Interaction: + # Subsequent messages stream + # {::Google::Cloud::Ces::V1beta::BidiSessionClientMessage#realtime_input SessionInput} + # containing real-time user input data. + # + # 3. Termination: + # The client should half-close the stream when there is no more user + # input. It should also half-close upon receiving + # {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#end_session EndSession} + # or {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#go_away GoAway} + # from the agent. + # + # --- Server Response Stream --- + # For each interaction turn, the agent streams messages in the following + # sequence: + # + # 1. Speech Recognition (First N messages): + # Contains + # {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#recognition_result RecognitionResult} + # representing the concatenated user speech segments captured so far. + # This is only populated for audio sessions. + # + # 2. Response (Next M messages): + # Contains + # {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#session_output SessionOutput} + # delivering the agent's response in various modalities (e.g., text, + # audio). + # + # 3. Turn Completion (Final message of the turn): + # Contains + # {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#session_output SessionOutput} + # with + # {::Google::Cloud::Ces::V1beta::SessionOutput#turn_completed turn_completed} + # set to true. This signals the end of the current turn and includes + # {::Google::Cloud::Ces::V1beta::SessionOutput#diagnostic_info DiagnosticInfo} + # with execution details. + # + # --- Audio Best Practices --- + # 1. Streaming: + # Stream {::Google::Cloud::Ces::V1beta::SessionInput#audio audio data} + # **CONTINUOUSLY**, even during silence. Recommended chunk size: 40-120ms + # (balances latency vs. efficiency). + # + # 2. Playback & Interruption: + # Play {::Google::Cloud::Ces::V1beta::SessionOutput#audio audio responses} + # upon receipt. Stop playback immediately if an + # {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#interruption_signal InterruptionSignal} + # is received (e.g., user barge-in or new agent response). + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Ces::V1beta::BidiSessionClientMessage, ::Hash>] + # An enumerable of {::Google::Cloud::Ces::V1beta::BidiSessionClientMessage} instances. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Ces::V1beta::BidiSessionServerMessage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Ces::V1beta::BidiSessionServerMessage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::SessionService::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the bidi_run_session method to start streaming. + # output = client.bidi_run_session input + # + # # Send requests on the stream. For each request object, set fields by + # # passing keyword arguments. Be sure to close the stream when done. + # input << Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new + # input << Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage + # output.each do |current_response| + # p current_response + # end + # + def bidi_run_session request, options = nil + unless request.is_a? ::Enumerable + raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum + request = request.to_enum + end + + request = request.lazy.map do |req| + ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage + end + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.bidi_run_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.bidi_run_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bidi_run_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.call_rpc :bidi_run_session, 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 SessionService API. + # + # This class represents the configuration for SessionService, + # 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::Ces::V1beta::SessionService::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 + # # run_session to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Ces::V1beta::SessionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.run_session.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.run_session.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::Ces::V1beta::SessionService::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 = "ces.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 SessionService 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 `run_session` + # @return [::Gapic::Config::Method] + # + attr_reader :run_session + ## + # RPC-specific configuration for `stream_run_session` + # @return [::Gapic::Config::Method] + # + attr_reader :stream_run_session + ## + # RPC-specific configuration for `bidi_run_session` + # @return [::Gapic::Config::Method] + # + attr_reader :bidi_run_session + + # @private + def initialize parent_rpcs = nil + run_session_config = parent_rpcs.run_session if parent_rpcs.respond_to? :run_session + @run_session = ::Gapic::Config::Method.new run_session_config + stream_run_session_config = parent_rpcs.stream_run_session if parent_rpcs.respond_to? :stream_run_session + @stream_run_session = ::Gapic::Config::Method.new stream_run_session_config + bidi_run_session_config = parent_rpcs.bidi_run_session if parent_rpcs.respond_to? :bidi_run_session + @bidi_run_session = ::Gapic::Config::Method.new bidi_run_session_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/credentials.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/credentials.rb new file mode 100644 index 000000000000..a1e0cd401764 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/credentials.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Ces + module V1beta + module SessionService + # Credentials for the SessionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/ces", + "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-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/paths.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/paths.rb new file mode 100644 index 000000000000..a3412c56e02d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/paths.rb @@ -0,0 +1,117 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + module SessionService + # Path helper methods for the SessionService API. + module Paths + ## + # Create a fully-qualified Agent resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param agent [String] + # + # @return [::String] + def agent_path project:, location:, app:, agent: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/agents/#{agent}" + end + + ## + # Create a fully-qualified Session resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param session [String] + # + # @return [::String] + def session_path project:, location:, app:, session: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/sessions/#{session}" + end + + ## + # Create a fully-qualified Tool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param tool [String] + # + # @return [::String] + def tool_path project:, location:, app:, tool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/tools/#{tool}" + end + + ## + # Create a fully-qualified Toolset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param toolset [String] + # + # @return [::String] + def toolset_path project:, location:, app:, toolset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/toolsets/#{toolset}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest.rb new file mode 100644 index 000000000000..ad0b096fe0c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/ces/v1beta/version" +require "google/cloud/ces/v1beta/bindings_override" + +require "google/cloud/ces/v1beta/session_service/credentials" +require "google/cloud/ces/v1beta/session_service/paths" +require "google/cloud/ces/v1beta/session_service/rest/client" + +module Google + module Cloud + module Ces + module V1beta + ## + # Session service provides APIs for interacting with CES agents. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/ces/v1beta/session_service/rest" + # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new + # + module SessionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/ces/v1beta/session_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/client.rb new file mode 100644 index 000000000000..408f9bd8146e --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/client.rb @@ -0,0 +1,560 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/session_service_pb" +require "google/cloud/ces/v1beta/session_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Ces + module V1beta + module SessionService + module Rest + ## + # REST client for the SessionService service. + # + # Session service provides APIs for interacting with CES agents. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :session_service_stub + + ## + # Configure the SessionService Client class. + # + # See {::Google::Cloud::Ces::V1beta::SessionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SessionService clients + # ::Google::Cloud::Ces::V1beta::SessionService::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", "Ces", "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 = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_session.timeout = 220.0 + default_config.rpcs.run_session.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SessionService 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::Ces::V1beta::SessionService::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 + @session_service_stub.universe_domain + end + + ## + # Create a new SessionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SessionService 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 + + @session_service_stub = ::Google::Cloud::Ces::V1beta::SessionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @session_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 = @session_service_stub.endpoint + config.universe_domain = @session_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @session_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 + @session_service_stub.logger + end + + # Service calls + + ## + # Initiates a single-turn interaction with the CES agent within a session. + # + # @overload run_session(request, options = nil) + # Pass arguments to `run_session` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RunSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RunSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_session(config: nil, inputs: nil) + # Pass arguments to `run_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Ces::V1beta::SessionConfig, ::Hash] + # Required. The configuration for the session. + # @param inputs [::Array<::Google::Cloud::Ces::V1beta::SessionInput, ::Hash>] + # Required. Inputs for the session. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::RunSessionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::RunSessionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RunSessionRequest.new + # + # # Call the run_session method. + # result = client.run_session request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::RunSessionResponse. + # p result + # + def run_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.run_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @session_service_stub.run_session 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 + + ## + # Initiates a single-turn interaction with the CES agent. Uses server-side + # streaming to deliver incremental results and partial responses as they are + # generated. + # + # By default, complete responses (e.g., messages from callbacks or full LLM + # responses) are sent to the client as soon as they are available. To enable + # streaming individual text chunks directly from the model, set + # {::Google::Cloud::Ces::V1beta::SessionConfig#enable_text_streaming enable_text_streaming} + # to true. + # + # @overload stream_run_session(request, options = nil) + # Pass arguments to `stream_run_session` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RunSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RunSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload stream_run_session(config: nil, inputs: nil) + # Pass arguments to `stream_run_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Ces::V1beta::SessionConfig, ::Hash] + # Required. The configuration for the session. + # @param inputs [::Array<::Google::Cloud::Ces::V1beta::SessionInput, ::Hash>] + # Required. Inputs for the session. + # @return [::Enumerable<::Google::Cloud::Ces::V1beta::RunSessionResponse>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RunSessionRequest.new + # + # # Call the stream_run_session method to start streaming. + # output = client.stream_run_session request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Ces::V1beta::RunSessionResponse + # output.each do |current_response| + # p current_response + # end + # + def stream_run_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.stream_run_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.stream_run_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.stream_run_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + ::Gapic::Rest::ServerStream.new( + ::Google::Cloud::Ces::V1beta::RunSessionResponse, + ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| + @session_service_stub.stream_run_session 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 + + ## + # Configuration class for the SessionService REST API. + # + # This class represents the configuration for SessionService 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::Ces::V1beta::SessionService::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 + # # run_session to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.run_session.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.run_session.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 = "ces.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 SessionService 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 `run_session` + # @return [::Gapic::Config::Method] + # + attr_reader :run_session + ## + # RPC-specific configuration for `stream_run_session` + # @return [::Gapic::Config::Method] + # + attr_reader :stream_run_session + + # @private + def initialize parent_rpcs = nil + run_session_config = parent_rpcs.run_session if parent_rpcs.respond_to? :run_session + @run_session = ::Gapic::Config::Method.new run_session_config + stream_run_session_config = parent_rpcs.stream_run_session if parent_rpcs.respond_to? :stream_run_session + @stream_run_session = ::Gapic::Config::Method.new stream_run_session_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb new file mode 100644 index 000000000000..0ad307b87168 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb @@ -0,0 +1,199 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/session_service_pb" + +module Google + module Cloud + module Ces + module V1beta + module SessionService + module Rest + ## + # REST service stub for the SessionService 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 run_session REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RunSessionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::RunSessionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::RunSessionResponse] + # A result object deserialized from the server's reply + def run_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_session_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::RunSessionResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the stream_run_session REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RunSessionRequest] + # A 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 stream_run_session(request_pb, options = nil, &) + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_stream_run_session_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "stream_run_session", + options: options, + is_server_streaming: true, + & + ) + ::Gapic::Rest::TransportOperation.new response + end + + ## + # @private + # + # GRPC transcoding helper method for the run_session REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RunSessionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{config.session}:runSession", + body: "*", + matches: [ + ["config.session", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the stream_run_session REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RunSessionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_stream_run_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{config.session}:streamRunSession", + body: "*", + matches: [ + ["config.session", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_pb.rb new file mode 100644 index 000000000000..94533eb378ae --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/session_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/ces/v1beta/common_pb' +require 'google/cloud/ces/v1beta/example_pb' +require 'google/cloud/ces/v1beta/mocks_pb' +require 'google/cloud/ces/v1beta/search_suggestions_pb' +require 'google/protobuf/any_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\n-google/cloud/ces/v1beta/session_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a#google/cloud/ces/v1beta/mocks.proto\x1a\x30google/cloud/ces/v1beta/search_suggestions.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xa6\x02\n\nMockConfig\x12G\n\x11mocked_tool_calls\x18\x01 \x03(\x0b\x32\'.google.cloud.ces.v1beta.MockedToolCallB\x03\xe0\x41\x01\x12h\n\x1cunmatched_tool_call_behavior\x18\x02 \x01(\x0e\x32=.google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehaviorB\x03\xe0\x41\x02\"e\n\x19UnmatchedToolCallBehavior\x12,\n(UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46\x41IL\x10\x01\x12\x10\n\x0cPASS_THROUGH\x10\x02\"\x9d\x01\n\x10InputAudioConfig\x12\x43\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32&.google.cloud.ces.v1beta.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12$\n\x17noise_suppression_level\x18\x06 \x01(\tB\x03\xe0\x41\x01\"x\n\x11OutputAudioConfig\x12\x43\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32&.google.cloud.ces.v1beta.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\x81\x07\n\rSessionConfig\x12\x33\n\x07session\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Session\x12J\n\x12input_audio_config\x18\x02 \x01(\x0b\x32).google.cloud.ces.v1beta.InputAudioConfigB\x03\xe0\x41\x01\x12L\n\x13output_audio_config\x18\x03 \x01(\x0b\x32*.google.cloud.ces.v1beta.OutputAudioConfigB\x03\xe0\x41\x01\x12\x42\n\x13historical_contexts\x18\x05 \x03(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01\x12\x35\n\x0b\x65ntry_agent\x18\x0c \x01(\tB \xe0\x41\x01\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x17\n\ndeployment\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0euse_tool_fakes\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x12w\n\"remote_dialogflow_query_parameters\x18\x0f \x01(\x0b\x32\x46.google.cloud.ces.v1beta.SessionConfig.RemoteDialogflowQueryParametersB\x03\xe0\x41\x01\x12\"\n\x15\x65nable_text_streaming\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xba\x02\n\x1fRemoteDialogflowQueryParameters\x12x\n\x0fwebhook_headers\x18\x01 \x03(\x0b\x32Z.google.cloud.ces.v1beta.SessionConfig.RemoteDialogflowQueryParameters.WebhookHeadersEntryB\x03\xe0\x41\x01\x12-\n\x07payload\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x37\n\x11\x65nd_user_metadata\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a\x35\n\x13WebhookHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"G\n\tToolCalls\x12:\n\ntool_calls\x18\x01 \x03(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x01\"S\n\rToolResponses\x12\x42\n\x0etool_responses\x18\x01 \x03(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x01\"\xa6\x01\n\tCitations\x12\x43\n\x0c\x63ited_chunks\x18\x01 \x03(\x0b\x32-.google.cloud.ces.v1beta.Citations.CitedChunk\x1aT\n\nCitedChunk\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x1c\n\x14requires_attribution\x18\x04 \x01(\x08\"\x1b\n\x05\x45vent\x12\x12\n\x05\x65vent\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x92\x03\n\x0cSessionInput\x12\x13\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x13\n\x04\x64tmf\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x14\n\x05\x61udio\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x45\n\x0etool_responses\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ToolResponsesB\x03\xe0\x41\x01H\x00\x12\x34\n\x05image\x18\x04 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.ImageB\x03\xe0\x41\x01H\x00\x12\x32\n\x04\x62lob\x18\x07 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.BlobB\x03\xe0\x41\x01H\x00\x12\x31\n\tvariables\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x00\x12\x34\n\x05\x65vent\x18\t \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.EventB\x03\xe0\x41\x01H\x00\x12\x1a\n\rwill_continue\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0c\n\ninput_type\"\xea\x04\n\rSessionOutput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x0f\n\x05\x61udio\x18\x02 \x01(\x0cH\x00\x12\x38\n\ntool_calls\x18\x03 \x01(\x0b\x32\".google.cloud.ces.v1beta.ToolCallsH\x00\x12\x37\n\tcitations\x18\x08 \x01(\x0b\x32\".google.cloud.ces.v1beta.CitationsH\x00\x12U\n\x19google_search_suggestions\x18\n \x01(\x0b\x32\x30.google.cloud.ces.v1beta.GoogleSearchSuggestionsH\x00\x12:\n\x0b\x65nd_session\x18\t \x01(\x0b\x32#.google.cloud.ces.v1beta.EndSessionH\x00\x12*\n\x07payload\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x12\n\nturn_index\x18\x06 \x01(\x05\x12\x16\n\x0eturn_completed\x18\x04 \x01(\x08\x12S\n\x0f\x64iagnostic_info\x18\x07 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.SessionOutput.DiagnosticInfoB\x03\xe0\x41\x01\x1av\n\x0e\x44iagnosticInfo\x12\x32\n\x08messages\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.Message\x12\x30\n\troot_span\x18\x03 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\r\n\x0boutput_type\",\n\x11RecognitionResult\x12\x17\n\ntranscript\x18\x01 \x01(\tB\x03\xe0\x41\x01\"&\n\x12InterruptionSignal\x12\x10\n\x08\x62\x61rge_in\x18\x01 \x01(\x08\"<\n\nEndSession\x12.\n\x08metadata\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\x08\n\x06GoAway\"\x8c\x01\n\x11RunSessionRequest\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.SessionConfigB\x03\xe0\x41\x02\x12:\n\x06inputs\x18\x03 \x03(\x0b\x32%.google.cloud.ces.v1beta.SessionInputB\x03\xe0\x41\x02\"M\n\x12RunSessionResponse\x12\x37\n\x07outputs\x18\x01 \x03(\x0b\x32&.google.cloud.ces.v1beta.SessionOutput\"\xaf\x01\n\x18\x42idiSessionClientMessage\x12=\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.SessionConfigB\x03\xe0\x41\x01H\x00\x12\x44\n\x0erealtime_input\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1beta.SessionInputB\x03\xe0\x41\x01H\x00\x42\x0e\n\x0cmessage_type\"\x8b\x03\n\x18\x42idiSessionServerMessage\x12\x45\n\x0esession_output\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.SessionOutputB\x03\xe0\x41\x01H\x00\x12M\n\x12recognition_result\x18\x02 \x01(\x0b\x32*.google.cloud.ces.v1beta.RecognitionResultB\x03\xe0\x41\x01H\x00\x12O\n\x13interruption_signal\x18\x03 \x01(\x0b\x32+.google.cloud.ces.v1beta.InterruptionSignalB\x03\xe0\x41\x01H\x00\x12?\n\x0b\x65nd_session\x18\x05 \x01(\x0b\x32#.google.cloud.ces.v1beta.EndSessionB\x03\xe0\x41\x01H\x00\x12\x37\n\x07go_away\x18\x06 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.GoAwayB\x03\xe0\x41\x01H\x00\x42\x0e\n\x0cmessage_type*R\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\t\n\x05MULAW\x10\x02\x12\x08\n\x04\x41LAW\x10\x03\x32\x8a\x05\n\x0eSessionService\x12\xbe\x01\n\nRunSession\x12*.google.cloud.ces.v1beta.RunSessionRequest\x1a+.google.cloud.ces.v1beta.RunSessionResponse\"W\x82\xd3\xe4\x93\x02Q\"L/v1beta/{config.session=projects/*/locations/*/apps/*/sessions/*}:runSession:\x01*\x12\xcc\x01\n\x10StreamRunSession\x12*.google.cloud.ces.v1beta.RunSessionRequest\x1a+.google.cloud.ces.v1beta.RunSessionResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1beta/{config.session=projects/*/locations/*/apps/*/sessions/*}:streamRunSession:\x01*0\x01\x12|\n\x0e\x42idiRunSession\x12\x31.google.cloud.ces.v1beta.BidiSessionClientMessage\x1a\x31.google.cloud.ces.v1beta.BidiSessionServerMessage\"\x00(\x01\x30\x01\x1aj\xca\x41\x12\x63\x65s.googleapis.com\xd2\x41Rhttps://www.googleapis.com/auth/ces,https://www.googleapis.com/auth/cloud-platformB\xc9\x01\n\x1b\x63om.google.cloud.ces.v1betaB\x13SessionServiceProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41\x63\n\x1a\x63\x65s.googleapis.com/Session\x12\x45projects/{project}/locations/{location}/apps/{app}/sessions/{session}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + MockConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.MockConfig").msgclass + MockConfig::UnmatchedToolCallBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior").enummodule + InputAudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.InputAudioConfig").msgclass + OutputAudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.OutputAudioConfig").msgclass + SessionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SessionConfig").msgclass + SessionConfig::RemoteDialogflowQueryParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SessionConfig.RemoteDialogflowQueryParameters").msgclass + ToolCalls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ToolCalls").msgclass + ToolResponses = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ToolResponses").msgclass + Citations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Citations").msgclass + Citations::CitedChunk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Citations.CitedChunk").msgclass + Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Event").msgclass + SessionInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SessionInput").msgclass + SessionOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SessionOutput").msgclass + SessionOutput::DiagnosticInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SessionOutput.DiagnosticInfo").msgclass + RecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RecognitionResult").msgclass + InterruptionSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.InterruptionSignal").msgclass + EndSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EndSession").msgclass + GoAway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.GoAway").msgclass + RunSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RunSessionRequest").msgclass + RunSessionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RunSessionResponse").msgclass + BidiSessionClientMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.BidiSessionClientMessage").msgclass + BidiSessionServerMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.BidiSessionServerMessage").msgclass + AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AudioEncoding").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_services_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_services_pb.rb new file mode 100644 index 000000000000..382f0108a6c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_services_pb.rb @@ -0,0 +1,120 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/ces/v1beta/session_service.proto for package 'google.cloud.ces.v1beta' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/ces/v1beta/session_service_pb' + +module Google + module Cloud + module Ces + module V1beta + module SessionService + # Session service provides APIs for interacting with CES agents. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.ces.v1beta.SessionService' + + # Initiates a single-turn interaction with the CES agent within a session. + rpc :RunSession, ::Google::Cloud::Ces::V1beta::RunSessionRequest, ::Google::Cloud::Ces::V1beta::RunSessionResponse + # Initiates a single-turn interaction with the CES agent. Uses server-side + # streaming to deliver incremental results and partial responses as they are + # generated. + # + # By default, complete responses (e.g., messages from callbacks or full LLM + # responses) are sent to the client as soon as they are available. To enable + # streaming individual text chunks directly from the model, set + # [enable_text_streaming][google.cloud.ces.v1beta.SessionConfig.enable_text_streaming] + # to true. + rpc :StreamRunSession, ::Google::Cloud::Ces::V1beta::RunSessionRequest, stream(::Google::Cloud::Ces::V1beta::RunSessionResponse) + # Establishes a bidirectional streaming connection with the CES agent. + # The agent processes continuous multimodal inputs (e.g., text, audio) and + # generates real-time multimodal output streams. + # + # --- Client Request Stream --- + # The client streams requests in the following order: + # + # 1. Initialization: + # The first message must contain + # [SessionConfig][google.cloud.ces.v1beta.BidiSessionClientMessage.config]. + # For audio sessions, this should also include + # [InputAudioConfig][google.cloud.ces.v1beta.SessionConfig.input_audio_config] + # and + # [OutputAudioConfig][google.cloud.ces.v1beta.SessionConfig.output_audio_config] + # to define audio processing and synthesis parameters. + # + # 2. Interaction: + # Subsequent messages stream + # [SessionInput][google.cloud.ces.v1beta.BidiSessionClientMessage.realtime_input] + # containing real-time user input data. + # + # 3. Termination: + # The client should half-close the stream when there is no more user + # input. It should also half-close upon receiving + # [EndSession][google.cloud.ces.v1beta.BidiSessionServerMessage.end_session] + # or [GoAway][google.cloud.ces.v1beta.BidiSessionServerMessage.go_away] + # from the agent. + # + # --- Server Response Stream --- + # For each interaction turn, the agent streams messages in the following + # sequence: + # + # 1. Speech Recognition (First N messages): + # Contains + # [RecognitionResult][google.cloud.ces.v1beta.BidiSessionServerMessage.recognition_result] + # representing the concatenated user speech segments captured so far. + # This is only populated for audio sessions. + # + # 2. Response (Next M messages): + # Contains + # [SessionOutput][google.cloud.ces.v1beta.BidiSessionServerMessage.session_output] + # delivering the agent's response in various modalities (e.g., text, + # audio). + # + # 3. Turn Completion (Final message of the turn): + # Contains + # [SessionOutput][google.cloud.ces.v1beta.BidiSessionServerMessage.session_output] + # with + # [turn_completed][google.cloud.ces.v1beta.SessionOutput.turn_completed] + # set to true. This signals the end of the current turn and includes + # [DiagnosticInfo][google.cloud.ces.v1beta.SessionOutput.diagnostic_info] + # with execution details. + # + # --- Audio Best Practices --- + # 1. Streaming: + # Stream [audio data][google.cloud.ces.v1beta.SessionInput.audio] + # **CONTINUOUSLY**, even during silence. Recommended chunk size: 40-120ms + # (balances latency vs. efficiency). + # + # 2. Playback & Interruption: + # Play [audio responses][google.cloud.ces.v1beta.SessionOutput.audio] + # upon receipt. Stop playback immediately if an + # [InterruptionSignal][google.cloud.ces.v1beta.BidiSessionServerMessage.interruption_signal] + # is received (e.g., user barge-in or new agent response). + rpc :BidiRunSession, stream(::Google::Cloud::Ces::V1beta::BidiSessionClientMessage), stream(::Google::Cloud::Ces::V1beta::BidiSessionServerMessage) + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/system_tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/system_tool_pb.rb new file mode 100644 index 000000000000..32cba74afa38 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/system_tool_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/system_tool.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n)google/cloud/ces/v1beta/system_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"9\n\nSystemTool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42_\n\x1b\x63om.google.cloud.ces.v1betaB\x0fSystemToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + SystemTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SystemTool").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_pb.rb new file mode 100644 index 000000000000..43921b744f7c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/tool.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/ces/v1beta/agent_card_pb' +require 'google/cloud/ces/v1beta/agent_tool_pb' +require 'google/cloud/ces/v1beta/client_function_pb' +require 'google/cloud/ces/v1beta/common_pb' +require 'google/cloud/ces/v1beta/connector_tool_pb' +require 'google/cloud/ces/v1beta/data_store_tool_pb' +require 'google/cloud/ces/v1beta/fakes_pb' +require 'google/cloud/ces/v1beta/file_search_tool_pb' +require 'google/cloud/ces/v1beta/google_search_tool_pb' +require 'google/cloud/ces/v1beta/mcp_tool_pb' +require 'google/cloud/ces/v1beta/open_api_tool_pb' +require 'google/cloud/ces/v1beta/python_function_pb' +require 'google/cloud/ces/v1beta/system_tool_pb' +require 'google/cloud/ces/v1beta/widget_tool_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\"google/cloud/ces/v1beta/tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/ces/v1beta/agent_card.proto\x1a(google/cloud/ces/v1beta/agent_tool.proto\x1a-google/cloud/ces/v1beta/client_function.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a,google/cloud/ces/v1beta/connector_tool.proto\x1a-google/cloud/ces/v1beta/data_store_tool.proto\x1a#google/cloud/ces/v1beta/fakes.proto\x1a.google/cloud/ces/v1beta/file_search_tool.proto\x1a\x30google/cloud/ces/v1beta/google_search_tool.proto\x1a&google/cloud/ces/v1beta/mcp_tool.proto\x1a+google/cloud/ces/v1beta/open_api_tool.proto\x1a-google/cloud/ces/v1beta/python_function.proto\x1a)google/cloud/ces/v1beta/system_tool.proto\x1a)google/cloud/ces/v1beta/widget_tool.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\n\n\x04Tool\x12G\n\x0f\x63lient_function\x18\x02 \x01(\x0b\x32\'.google.cloud.ces.v1beta.ClientFunctionB\x03\xe0\x41\x01H\x00\x12\x42\n\ropen_api_tool\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.OpenApiToolB\x03\xe0\x41\x01H\x00\x12L\n\x12google_search_tool\x18\x05 \x01(\x0b\x32).google.cloud.ces.v1beta.GoogleSearchToolB\x03\xe0\x41\x01H\x00\x12\x45\n\x0e\x63onnector_tool\x18\x08 \x01(\x0b\x32&.google.cloud.ces.v1beta.ConnectorToolB\x03\xe0\x41\x01H\x00\x12\x46\n\x0f\x64\x61ta_store_tool\x18\n \x01(\x0b\x32&.google.cloud.ces.v1beta.DataStoreToolB\x03\xe0\x41\x01H\x00\x12G\n\x0fpython_function\x18\x0b \x01(\x0b\x32\'.google.cloud.ces.v1beta.PythonFunctionB\x03\xe0\x41\x01H\x00\x12\x39\n\x08mcp_tool\x18\x10 \x01(\x0b\x32 .google.cloud.ces.v1beta.McpToolB\x03\xe0\x41\x01H\x00\x12H\n\x10\x66ile_search_tool\x18\x11 \x01(\x0b\x32\'.google.cloud.ces.v1beta.FileSearchToolB\x03\xe0\x41\x01H\x00\x12?\n\x0bsystem_tool\x18\x12 \x01(\x0b\x32#.google.cloud.ces.v1beta.SystemToolB\x03\xe0\x41\x01H\x00\x12=\n\nagent_tool\x18\x17 \x01(\x0b\x32\".google.cloud.ces.v1beta.AgentToolB\x03\xe0\x41\x01H\x00\x12?\n\x0bwidget_tool\x18\x18 \x01(\x0b\x32#.google.cloud.ces.v1beta.WidgetToolB\x03\xe0\x41\x01H\x00\x12J\n\x11remote_agent_tool\x18\x19 \x01(\x0b\x32(.google.cloud.ces.v1beta.RemoteAgentToolB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x43\n\x0e\x65xecution_type\x18\x0c \x01(\x0e\x32&.google.cloud.ces.v1beta.ExecutionTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x16 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0e \x01(\t\x12\x1e\n\x11generated_summary\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x10tool_fake_config\x18\x14 \x01(\x0b\x32\'.google.cloud.ces.v1beta.ToolFakeConfigB\x03\xe0\x41\x01:j\xea\x41g\n\x17\x63\x65s.googleapis.com/Tool\x12?projects/{project}/locations/{location}/apps/{app}/tools/{tool}*\x05tools2\x04toolB\x0b\n\ttool_typeBY\n\x1b\x63om.google.cloud.ces.v1betaB\tToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + Tool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Tool").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service.rb new file mode 100644 index 000000000000..3ee542aeda19 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/ces/v1beta/version" + +require "google/cloud/ces/v1beta/tool_service/credentials" +require "google/cloud/ces/v1beta/tool_service/paths" +require "google/cloud/ces/v1beta/tool_service/client" +require "google/cloud/ces/v1beta/tool_service/rest" + +module Google + module Cloud + module Ces + module V1beta + ## + # Tool service provides APIs for interacting with CES tools. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/ces/v1beta/tool_service" + # client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/ces/v1beta/tool_service/rest" + # client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new + # + module ToolService + end + end + end + end +end + +helper_path = ::File.join __dir__, "tool_service", "helpers.rb" +require "google/cloud/ces/v1beta/tool_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/client.rb new file mode 100644 index 000000000000..900780da52ef --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/client.rb @@ -0,0 +1,731 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/tool_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module Ces + module V1beta + module ToolService + ## + # Client for the ToolService service. + # + # Tool service provides APIs for interacting with CES tools. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :tool_service_stub + + ## + # Configure the ToolService Client class. + # + # See {::Google::Cloud::Ces::V1beta::ToolService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ToolService clients + # ::Google::Cloud::Ces::V1beta::ToolService::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", "Ces", "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 = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ToolService 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::Ces::V1beta::ToolService::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 + @tool_service_stub.universe_domain + end + + ## + # Create a new ToolService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ToolService 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/ces/v1beta/tool_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 + + @tool_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Ces::V1beta::ToolService::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 + ) + + @tool_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 = @tool_service_stub.endpoint + config.universe_domain = @tool_service_stub.universe_domain + config.logger = @tool_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 + @tool_service_stub.logger + end + + # Service calls + + ## + # Executes the given tool with the given arguments. + # + # @overload execute_tool(request, options = nil) + # Pass arguments to `execute_tool` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExecuteToolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExecuteToolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload execute_tool(tool: nil, toolset_tool: nil, variables: nil, context: nil, parent: nil, args: nil, mock_config: nil) + # Pass arguments to `execute_tool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tool [::String] + # Optional. The name of the tool to execute. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} + # + # Note: The following parameters are mutually exclusive: `tool`, `toolset_tool`. 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 toolset_tool [::Google::Cloud::Ces::V1beta::ToolsetTool, ::Hash] + # Optional. The toolset tool to execute. Only one tool should match the + # predicate from the toolset. Otherwise, an error will be returned. + # + # Note: The following parameters are mutually exclusive: `toolset_tool`, `tool`. 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 variables [::Google::Protobuf::Struct, ::Hash] + # Optional. The variables that are available for the tool execution. + # + # Note: The following parameters are mutually exclusive: `variables`, `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 context [::Google::Protobuf::Struct, ::Hash] + # Optional. The + # [ToolCallContext](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/python#environment + # for details) to be passed to the Python tool. + # + # Note: The following parameters are mutually exclusive: `context`, `variables`. 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 parent [::String] + # Required. The resource name of the app which the tool/toolset belongs to. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @param args [::Google::Protobuf::Struct, ::Hash] + # Optional. The input parameters and values for the tool in JSON object + # format. + # @param mock_config [::Google::Cloud::Ces::V1beta::MockConfig, ::Hash] + # Optional. Mock configuration for the tool execution. + # If this field is set, tools that call other tools will be + # mocked based on the provided patterns and responses. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::ExecuteToolResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::ExecuteToolResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::ToolService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExecuteToolRequest.new + # + # # Call the execute_tool method. + # result = client.execute_tool request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::ExecuteToolResponse. + # p result + # + def execute_tool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExecuteToolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.execute_tool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.execute_tool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.execute_tool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tool_service_stub.call_rpc :execute_tool, 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 + + ## + # Retrieve the schema of the given tool. The schema is computed on the fly + # for the given instance of the tool. + # + # @overload retrieve_tool_schema(request, options = nil) + # Pass arguments to `retrieve_tool_schema` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload retrieve_tool_schema(tool: nil, toolset_tool: nil, parent: nil) + # Pass arguments to `retrieve_tool_schema` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tool [::String] + # Optional. The name of the tool to retrieve the schema for. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} + # + # Note: The following parameters are mutually exclusive: `tool`, `toolset_tool`. 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 toolset_tool [::Google::Cloud::Ces::V1beta::ToolsetTool, ::Hash] + # Optional. The toolset tool to retrieve the schema for. Only one tool + # should match the predicate from the toolset. Otherwise, an error will be + # returned. + # + # Note: The following parameters are mutually exclusive: `toolset_tool`, `tool`. 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 parent [::String] + # Required. The resource name of the app which the tool/toolset belongs to. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::ToolService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new + # + # # Call the retrieve_tool_schema method. + # result = client.retrieve_tool_schema request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse. + # p result + # + def retrieve_tool_schema request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.retrieve_tool_schema.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.retrieve_tool_schema.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_tool_schema.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tool_service_stub.call_rpc :retrieve_tool_schema, 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 + + ## + # Retrieve the list of tools included in the specified toolset. + # + # @overload retrieve_tools(request, options = nil) + # Pass arguments to `retrieve_tools` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RetrieveToolsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RetrieveToolsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload retrieve_tools(toolset: nil, tool_ids: nil, bypass_persistence_config: nil) + # Pass arguments to `retrieve_tools` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param toolset [::String] + # Required. The name of the toolset to retrieve the tools for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` + # @param tool_ids [::Array<::String>] + # Optional. The identifiers of the tools to retrieve from the toolset. + # If empty, all tools in the toolset will be returned. + # @param bypass_persistence_config [::Boolean] + # Optional. If true, the returned tools will contain raw descriptions and + # schemas directly from the server, bypassing any stored persistence + # configurations (overrides/snapshots). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::ToolService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new + # + # # Call the retrieve_tools method. + # result = client.retrieve_tools request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolsResponse. + # p result + # + def retrieve_tools request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.retrieve_tools.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.toolset + header_params["toolset"] = request.toolset + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.retrieve_tools.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_tools.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tool_service_stub.call_rpc :retrieve_tools, 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 ToolService API. + # + # This class represents the configuration for ToolService, + # 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::Ces::V1beta::ToolService::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 + # # execute_tool to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Ces::V1beta::ToolService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.execute_tool.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.execute_tool.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::Ces::V1beta::ToolService::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 = "ces.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 ToolService 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 `execute_tool` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_tool + ## + # RPC-specific configuration for `retrieve_tool_schema` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_tool_schema + ## + # RPC-specific configuration for `retrieve_tools` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_tools + + # @private + def initialize parent_rpcs = nil + execute_tool_config = parent_rpcs.execute_tool if parent_rpcs.respond_to? :execute_tool + @execute_tool = ::Gapic::Config::Method.new execute_tool_config + retrieve_tool_schema_config = parent_rpcs.retrieve_tool_schema if parent_rpcs.respond_to? :retrieve_tool_schema + @retrieve_tool_schema = ::Gapic::Config::Method.new retrieve_tool_schema_config + retrieve_tools_config = parent_rpcs.retrieve_tools if parent_rpcs.respond_to? :retrieve_tools + @retrieve_tools = ::Gapic::Config::Method.new retrieve_tools_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/credentials.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/credentials.rb new file mode 100644 index 000000000000..c8544cf74af6 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/credentials.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Ces + module V1beta + module ToolService + # Credentials for the ToolService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/ces", + "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-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/paths.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/paths.rb new file mode 100644 index 000000000000..8d8c222375be --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/paths.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + module ToolService + # Path helper methods for the ToolService API. + module Paths + ## + # Create a fully-qualified App resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # + # @return [::String] + def app_path project:, location:, app: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}" + end + + ## + # Create a fully-qualified Tool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param tool [String] + # + # @return [::String] + def tool_path project:, location:, app:, tool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/tools/#{tool}" + end + + ## + # Create a fully-qualified Toolset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param toolset [String] + # + # @return [::String] + def toolset_path project:, location:, app:, toolset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/toolsets/#{toolset}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest.rb new file mode 100644 index 000000000000..3eb91b8f49fd --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/ces/v1beta/version" +require "google/cloud/ces/v1beta/bindings_override" + +require "google/cloud/ces/v1beta/tool_service/credentials" +require "google/cloud/ces/v1beta/tool_service/paths" +require "google/cloud/ces/v1beta/tool_service/rest/client" + +module Google + module Cloud + module Ces + module V1beta + ## + # Tool service provides APIs for interacting with CES tools. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/ces/v1beta/tool_service/rest" + # client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new + # + module ToolService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/ces/v1beta/tool_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb new file mode 100644 index 000000000000..5b1c53902719 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb @@ -0,0 +1,675 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/tool_service_pb" +require "google/cloud/ces/v1beta/tool_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Ces + module V1beta + module ToolService + module Rest + ## + # REST client for the ToolService service. + # + # Tool service provides APIs for interacting with CES tools. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :tool_service_stub + + ## + # Configure the ToolService Client class. + # + # See {::Google::Cloud::Ces::V1beta::ToolService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ToolService clients + # ::Google::Cloud::Ces::V1beta::ToolService::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", "Ces", "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 = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ToolService 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::Ces::V1beta::ToolService::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 + @tool_service_stub.universe_domain + end + + ## + # Create a new ToolService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ToolService 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 + + @tool_service_stub = ::Google::Cloud::Ces::V1beta::ToolService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @tool_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 = @tool_service_stub.endpoint + config.universe_domain = @tool_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @tool_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 + @tool_service_stub.logger + end + + # Service calls + + ## + # Executes the given tool with the given arguments. + # + # @overload execute_tool(request, options = nil) + # Pass arguments to `execute_tool` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExecuteToolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExecuteToolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload execute_tool(tool: nil, toolset_tool: nil, variables: nil, context: nil, parent: nil, args: nil, mock_config: nil) + # Pass arguments to `execute_tool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tool [::String] + # Optional. The name of the tool to execute. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} + # + # Note: The following parameters are mutually exclusive: `tool`, `toolset_tool`. 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 toolset_tool [::Google::Cloud::Ces::V1beta::ToolsetTool, ::Hash] + # Optional. The toolset tool to execute. Only one tool should match the + # predicate from the toolset. Otherwise, an error will be returned. + # + # Note: The following parameters are mutually exclusive: `toolset_tool`, `tool`. 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 variables [::Google::Protobuf::Struct, ::Hash] + # Optional. The variables that are available for the tool execution. + # + # Note: The following parameters are mutually exclusive: `variables`, `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 context [::Google::Protobuf::Struct, ::Hash] + # Optional. The + # [ToolCallContext](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/python#environment + # for details) to be passed to the Python tool. + # + # Note: The following parameters are mutually exclusive: `context`, `variables`. 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 parent [::String] + # Required. The resource name of the app which the tool/toolset belongs to. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @param args [::Google::Protobuf::Struct, ::Hash] + # Optional. The input parameters and values for the tool in JSON object + # format. + # @param mock_config [::Google::Cloud::Ces::V1beta::MockConfig, ::Hash] + # Optional. Mock configuration for the tool execution. + # If this field is set, tools that call other tools will be + # mocked based on the provided patterns and responses. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::ExecuteToolResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ExecuteToolResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExecuteToolRequest.new + # + # # Call the execute_tool method. + # result = client.execute_tool request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::ExecuteToolResponse. + # p result + # + def execute_tool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExecuteToolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.execute_tool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.execute_tool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.execute_tool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tool_service_stub.execute_tool 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 + + ## + # Retrieve the schema of the given tool. The schema is computed on the fly + # for the given instance of the tool. + # + # @overload retrieve_tool_schema(request, options = nil) + # Pass arguments to `retrieve_tool_schema` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload retrieve_tool_schema(tool: nil, toolset_tool: nil, parent: nil) + # Pass arguments to `retrieve_tool_schema` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tool [::String] + # Optional. The name of the tool to retrieve the schema for. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} + # + # Note: The following parameters are mutually exclusive: `tool`, `toolset_tool`. 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 toolset_tool [::Google::Cloud::Ces::V1beta::ToolsetTool, ::Hash] + # Optional. The toolset tool to retrieve the schema for. Only one tool + # should match the predicate from the toolset. Otherwise, an error will be + # returned. + # + # Note: The following parameters are mutually exclusive: `toolset_tool`, `tool`. 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 parent [::String] + # Required. The resource name of the app which the tool/toolset belongs to. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new + # + # # Call the retrieve_tool_schema method. + # result = client.retrieve_tool_schema request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse. + # p result + # + def retrieve_tool_schema request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.retrieve_tool_schema.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.retrieve_tool_schema.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retrieve_tool_schema.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tool_service_stub.retrieve_tool_schema 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 + + ## + # Retrieve the list of tools included in the specified toolset. + # + # @overload retrieve_tools(request, options = nil) + # Pass arguments to `retrieve_tools` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RetrieveToolsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RetrieveToolsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload retrieve_tools(toolset: nil, tool_ids: nil, bypass_persistence_config: nil) + # Pass arguments to `retrieve_tools` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param toolset [::String] + # Required. The name of the toolset to retrieve the tools for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` + # @param tool_ids [::Array<::String>] + # Optional. The identifiers of the tools to retrieve from the toolset. + # If empty, all tools in the toolset will be returned. + # @param bypass_persistence_config [::Boolean] + # Optional. If true, the returned tools will contain raw descriptions and + # schemas directly from the server, bypassing any stored persistence + # configurations (overrides/snapshots). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new + # + # # Call the retrieve_tools method. + # result = client.retrieve_tools request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolsResponse. + # p result + # + def retrieve_tools request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.retrieve_tools.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.retrieve_tools.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retrieve_tools.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tool_service_stub.retrieve_tools 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 ToolService REST API. + # + # This class represents the configuration for ToolService 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::Ces::V1beta::ToolService::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 + # # execute_tool to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.execute_tool.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.execute_tool.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 = "ces.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 ToolService 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 `execute_tool` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_tool + ## + # RPC-specific configuration for `retrieve_tool_schema` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_tool_schema + ## + # RPC-specific configuration for `retrieve_tools` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_tools + + # @private + def initialize parent_rpcs = nil + execute_tool_config = parent_rpcs.execute_tool if parent_rpcs.respond_to? :execute_tool + @execute_tool = ::Gapic::Config::Method.new execute_tool_config + retrieve_tool_schema_config = parent_rpcs.retrieve_tool_schema if parent_rpcs.respond_to? :retrieve_tool_schema + @retrieve_tool_schema = ::Gapic::Config::Method.new retrieve_tool_schema_config + retrieve_tools_config = parent_rpcs.retrieve_tools if parent_rpcs.respond_to? :retrieve_tools + @retrieve_tools = ::Gapic::Config::Method.new retrieve_tools_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/service_stub.rb new file mode 100644 index 000000000000..7ad87ef03ee5 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/tool_service_pb" + +module Google + module Cloud + module Ces + module V1beta + module ToolService + module Rest + ## + # REST service stub for the ToolService 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 execute_tool REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExecuteToolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::ExecuteToolResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::ExecuteToolResponse] + # A result object deserialized from the server's reply + def execute_tool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_execute_tool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "execute_tool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::ExecuteToolResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retrieve_tool_schema REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::RetrieveToolSchemaResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse] + # A result object deserialized from the server's reply + def retrieve_tool_schema request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_tool_schema_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "retrieve_tool_schema", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retrieve_tools REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RetrieveToolsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::RetrieveToolsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] + # A result object deserialized from the server's reply + def retrieve_tools request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_tools_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "retrieve_tools", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::RetrieveToolsResponse.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 execute_tool REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExecuteToolRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_execute_tool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}:executeTool", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retrieve_tool_schema REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retrieve_tool_schema_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}:retrieveToolSchema", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retrieve_tools REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RetrieveToolsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retrieve_tools_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{toolset}:retrieveTools", + body: "*", + matches: [ + ["toolset", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/toolsets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb new file mode 100644 index 000000000000..58e685734750 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/tool_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/ces/v1beta/schema_pb' +require 'google/cloud/ces/v1beta/search_suggestions_pb' +require 'google/cloud/ces/v1beta/session_service_pb' +require 'google/cloud/ces/v1beta/tool_pb' +require 'google/cloud/ces/v1beta/toolset_tool_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\n*google/cloud/ces/v1beta/tool_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/schema.proto\x1a\x30google/cloud/ces/v1beta/search_suggestions.proto\x1a-google/cloud/ces/v1beta/session_service.proto\x1a\"google/cloud/ces/v1beta/tool.proto\x1a*google/cloud/ces/v1beta/toolset_tool.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xb4\x03\n\x12\x45xecuteToolRequest\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x01H\x00\x12\x31\n\tvariables\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x01\x12/\n\x07\x63ontext\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x01\x12.\n\x06parent\x18\x04 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12=\n\x0bmock_config\x18\x07 \x01(\x0b\x32#.google.cloud.ces.v1beta.MockConfigB\x03\xe0\x41\x01\x42\x11\n\x0ftool_identifierB\x18\n\x16tool_execution_context\"\xf7\x02\n\x13\x45xecuteToolResponse\x12,\n\x04tool\x18\x01 \x01(\tB\x1c\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12<\n\x0ctoolset_tool\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolH\x00\x12)\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12*\n\tvariables\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x35\n\tcitations\x18\x05 \x01(\x0b\x32\".google.cloud.ces.v1beta.Citations\x12S\n\x19google_search_suggestions\x18\x06 \x01(\x0b\x32\x30.google.cloud.ces.v1beta.GoogleSearchSuggestionsB\x11\n\x0ftool_identifier\"\xd2\x01\n\x19RetrieveToolSchemaRequest\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x01H\x00\x12.\n\x06parent\x18\x03 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/AppB\x11\n\x0ftool_identifier\"\x8a\x02\n\x1aRetrieveToolSchemaResponse\x12,\n\x04tool\x18\x01 \x01(\tB\x1c\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12<\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolH\x00\x12\x35\n\x0cinput_schema\x18\x03 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.Schema\x12\x36\n\routput_schema\x18\x04 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x11\n\x0ftool_identifier\"\x8a\x01\n\x14RetrieveToolsRequest\x12\x33\n\x07toolset\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x15\n\x08tool_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12&\n\x19\x62ypass_persistence_config\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"E\n\x15RetrieveToolsResponse\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool2\xbf\x05\n\x0bToolService\x12\xaf\x01\n\x0b\x45xecuteTool\x12+.google.cloud.ces.v1beta.ExecuteToolRequest\x1a,.google.cloud.ces.v1beta.ExecuteToolResponse\"E\x82\xd3\xe4\x93\x02?\":/v1beta/{parent=projects/*/locations/*/apps/*}:executeTool:\x01*\x12\xcb\x01\n\x12RetrieveToolSchema\x12\x32.google.cloud.ces.v1beta.RetrieveToolSchemaRequest\x1a\x33.google.cloud.ces.v1beta.RetrieveToolSchemaResponse\"L\x82\xd3\xe4\x93\x02\x46\"A/v1beta/{parent=projects/*/locations/*/apps/*}:retrieveToolSchema:\x01*\x12\xc3\x01\n\rRetrieveTools\x12-.google.cloud.ces.v1beta.RetrieveToolsRequest\x1a..google.cloud.ces.v1beta.RetrieveToolsResponse\"S\x82\xd3\xe4\x93\x02M\"H/v1beta/{toolset=projects/*/locations/*/apps/*/toolsets/*}:retrieveTools:\x01*\x1aj\xca\x41\x12\x63\x65s.googleapis.com\xd2\x41Rhttps://www.googleapis.com/auth/ces,https://www.googleapis.com/auth/cloud-platformB`\n\x1b\x63om.google.cloud.ces.v1betaB\x10ToolServiceProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + ExecuteToolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExecuteToolRequest").msgclass + ExecuteToolResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExecuteToolResponse").msgclass + RetrieveToolSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RetrieveToolSchemaRequest").msgclass + RetrieveToolSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RetrieveToolSchemaResponse").msgclass + RetrieveToolsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RetrieveToolsRequest").msgclass + RetrieveToolsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RetrieveToolsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_services_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_services_pb.rb new file mode 100644 index 000000000000..40e5f4f58391 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/ces/v1beta/tool_service.proto for package 'google.cloud.ces.v1beta' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/ces/v1beta/tool_service_pb' + +module Google + module Cloud + module Ces + module V1beta + module ToolService + # Tool service provides APIs for interacting with CES tools. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.ces.v1beta.ToolService' + + # Executes the given tool with the given arguments. + rpc :ExecuteTool, ::Google::Cloud::Ces::V1beta::ExecuteToolRequest, ::Google::Cloud::Ces::V1beta::ExecuteToolResponse + # Retrieve the schema of the given tool. The schema is computed on the fly + # for the given instance of the tool. + rpc :RetrieveToolSchema, ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest, ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse + # Retrieve the list of tools included in the specified toolset. + rpc :RetrieveTools, ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest, ::Google::Cloud::Ces::V1beta::RetrieveToolsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_pb.rb new file mode 100644 index 000000000000..a10bfe1fc93c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/toolset.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/ces/v1beta/common_pb' +require 'google/cloud/ces/v1beta/connector_toolset_pb' +require 'google/cloud/ces/v1beta/fakes_pb' +require 'google/cloud/ces/v1beta/mcp_toolset_pb' +require 'google/cloud/ces/v1beta/open_api_toolset_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n%google/cloud/ces/v1beta/toolset.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a/google/cloud/ces/v1beta/connector_toolset.proto\x1a#google/cloud/ces/v1beta/fakes.proto\x1a)google/cloud/ces/v1beta/mcp_toolset.proto\x1a.google/cloud/ces/v1beta/open_api_toolset.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x05\n\x07Toolset\x12?\n\x0bmcp_toolset\x18\x06 \x01(\x0b\x32#.google.cloud.ces.v1beta.McpToolsetB\x03\xe0\x41\x01H\x00\x12H\n\x10open_api_toolset\x18\x07 \x01(\x0b\x32\'.google.cloud.ces.v1beta.OpenApiToolsetB\x03\xe0\x41\x01H\x00\x12K\n\x11\x63onnector_toolset\x18\x08 \x01(\x0b\x32).google.cloud.ces.v1beta.ConnectorToolsetB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x05 \x01(\t\x12\x43\n\x0e\x65xecution_type\x18\t \x01(\x0e\x32&.google.cloud.ces.v1beta.ExecutionTypeB\x03\xe0\x41\x01\x12\x46\n\x10tool_fake_config\x18\x0b \x01(\x0b\x32\'.google.cloud.ces.v1beta.ToolFakeConfigB\x03\xe0\x41\x01:y\xea\x41v\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x45projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}*\x08toolsets2\x07toolsetB\x0e\n\x0ctoolset_typeB\\\n\x1b\x63om.google.cloud.ces.v1betaB\x0cToolsetProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + Toolset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Toolset").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb new file mode 100644 index 000000000000..439e3eb813f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/toolset_tool.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n*google/cloud/ces/v1beta/toolset_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"X\n\x0bToolsetTool\x12\x33\n\x07toolset\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x14\n\x07tool_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42`\n\x1b\x63om.google.cloud.ces.v1betaB\x10ToolsetToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + ToolsetTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ToolsetTool").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/version.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/version.rb new file mode 100644 index 000000000000..6e883eff5255 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service.rb new file mode 100644 index 000000000000..1418715e82e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/ces/v1beta/version" + +require "google/cloud/ces/v1beta/widget_service/credentials" +require "google/cloud/ces/v1beta/widget_service/paths" +require "google/cloud/ces/v1beta/widget_service/client" +require "google/cloud/ces/v1beta/widget_service/rest" + +module Google + module Cloud + module Ces + module V1beta + ## + # Provides APIs for widgets to interact with CES APIs. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/ces/v1beta/widget_service" + # client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/ces/v1beta/widget_service/rest" + # client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new + # + module WidgetService + end + end + end + end +end + +helper_path = ::File.join __dir__, "widget_service", "helpers.rb" +require "google/cloud/ces/v1beta/widget_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/client.rb new file mode 100644 index 000000000000..d76d2ede12a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/client.rb @@ -0,0 +1,501 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/widget_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module Ces + module V1beta + module WidgetService + ## + # Client for the WidgetService service. + # + # Provides APIs for widgets to interact with CES APIs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :widget_service_stub + + ## + # Configure the WidgetService Client class. + # + # See {::Google::Cloud::Ces::V1beta::WidgetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WidgetService clients + # ::Google::Cloud::Ces::V1beta::WidgetService::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", "Ces", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the WidgetService 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::Ces::V1beta::WidgetService::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 + @widget_service_stub.universe_domain + end + + ## + # Create a new WidgetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WidgetService 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/ces/v1beta/widget_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 + + @widget_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Ces::V1beta::WidgetService::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 + ) + + @widget_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 = @widget_service_stub.endpoint + config.universe_domain = @widget_service_stub.universe_domain + config.logger = @widget_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 + @widget_service_stub.logger + end + + # Service calls + + ## + # Generates a session scoped token for chat widget to authenticate with + # Session APIs. + # + # @overload generate_chat_token(request, options = nil) + # Pass arguments to `generate_chat_token` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_chat_token(name: nil, deployment: nil, recaptcha_token: nil, live_handoff_enabled: nil) + # Pass arguments to `generate_chat_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The session name to generate the chat token for. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/sessions/\\{session} + # @param deployment [::String] + # Required. The deployment of the app to use for the session. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/deployments/\\{deployment} + # @param recaptcha_token [::String] + # Optional. The reCAPTCHA token generated by the client-side chat widget. + # @param live_handoff_enabled [::Boolean] + # Optional. Indicates if live handoff is enabled for the session. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::WidgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new + # + # # Call the generate_chat_token method. + # result = client.generate_chat_token request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::GenerateChatTokenResponse. + # p result + # + def generate_chat_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_chat_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.generate_chat_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_chat_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @widget_service_stub.call_rpc :generate_chat_token, 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 WidgetService API. + # + # This class represents the configuration for WidgetService, + # 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::Ces::V1beta::WidgetService::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 + # # generate_chat_token to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Ces::V1beta::WidgetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_chat_token.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_chat_token.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::Ces::V1beta::WidgetService::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 = "ces.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 WidgetService 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 `generate_chat_token` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_chat_token + + # @private + def initialize parent_rpcs = nil + generate_chat_token_config = parent_rpcs.generate_chat_token if parent_rpcs.respond_to? :generate_chat_token + @generate_chat_token = ::Gapic::Config::Method.new generate_chat_token_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/credentials.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/credentials.rb new file mode 100644 index 000000000000..42a9772de404 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/credentials.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Ces + module V1beta + module WidgetService + # Credentials for the WidgetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/ces", + "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-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/paths.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/paths.rb new file mode 100644 index 000000000000..2996550c7f46 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/paths.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + module WidgetService + # Path helper methods for the WidgetService API. + module Paths + ## + # Create a fully-qualified Deployment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param deployment [String] + # + # @return [::String] + def deployment_path project:, location:, app:, deployment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/deployments/#{deployment}" + end + + ## + # Create a fully-qualified Session resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/apps/{app}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param app [String] + # @param session [String] + # + # @return [::String] + def session_path project:, location:, app:, session: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" + + "projects/#{project}/locations/#{location}/apps/#{app}/sessions/#{session}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest.rb new file mode 100644 index 000000000000..01b7a7f65454 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/ces/v1beta/version" +require "google/cloud/ces/v1beta/bindings_override" + +require "google/cloud/ces/v1beta/widget_service/credentials" +require "google/cloud/ces/v1beta/widget_service/paths" +require "google/cloud/ces/v1beta/widget_service/rest/client" + +module Google + module Cloud + module Ces + module V1beta + ## + # Provides APIs for widgets to interact with CES APIs. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/ces/v1beta/widget_service/rest" + # client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new + # + module WidgetService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/ces/v1beta/widget_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb new file mode 100644 index 000000000000..faa7017e9fd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb @@ -0,0 +1,459 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/widget_service_pb" +require "google/cloud/ces/v1beta/widget_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Ces + module V1beta + module WidgetService + module Rest + ## + # REST client for the WidgetService service. + # + # Provides APIs for widgets to interact with CES APIs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :widget_service_stub + + ## + # Configure the WidgetService Client class. + # + # See {::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WidgetService clients + # ::Google::Cloud::Ces::V1beta::WidgetService::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", "Ces", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the WidgetService 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::Ces::V1beta::WidgetService::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 + @widget_service_stub.universe_domain + end + + ## + # Create a new WidgetService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WidgetService 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 + + @widget_service_stub = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @widget_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 = @widget_service_stub.endpoint + config.universe_domain = @widget_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @widget_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 + @widget_service_stub.logger + end + + # Service calls + + ## + # Generates a session scoped token for chat widget to authenticate with + # Session APIs. + # + # @overload generate_chat_token(request, options = nil) + # Pass arguments to `generate_chat_token` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload generate_chat_token(name: nil, deployment: nil, recaptcha_token: nil, live_handoff_enabled: nil) + # Pass arguments to `generate_chat_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The session name to generate the chat token for. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/sessions/\\{session} + # @param deployment [::String] + # Required. The deployment of the app to use for the session. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/deployments/\\{deployment} + # @param recaptcha_token [::String] + # Optional. The reCAPTCHA token generated by the client-side chat widget. + # @param live_handoff_enabled [::Boolean] + # Optional. Indicates if live handoff is enabled for the session. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new + # + # # Call the generate_chat_token method. + # result = client.generate_chat_token request + # + # # The returned object is of type Google::Cloud::Ces::V1beta::GenerateChatTokenResponse. + # p result + # + def generate_chat_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.generate_chat_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.generate_chat_token.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_chat_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @widget_service_stub.generate_chat_token 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 WidgetService REST API. + # + # This class represents the configuration for WidgetService 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::Ces::V1beta::WidgetService::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 + # # generate_chat_token to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_chat_token.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_chat_token.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 = "ces.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 WidgetService 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 `generate_chat_token` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_chat_token + + # @private + def initialize parent_rpcs = nil + generate_chat_token_config = parent_rpcs.generate_chat_token if parent_rpcs.respond_to? :generate_chat_token + @generate_chat_token = ::Gapic::Config::Method.new generate_chat_token_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/service_stub.rb new file mode 100644 index 000000000000..09c07447925d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/service_stub.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/widget_service_pb" + +module Google + module Cloud + module Ces + module V1beta + module WidgetService + module Rest + ## + # REST service stub for the WidgetService 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 generate_chat_token REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Ces::V1beta::GenerateChatTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse] + # A result object deserialized from the server's reply + def generate_chat_token request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_chat_token_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "generate_chat_token", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse.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 generate_chat_token REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_chat_token_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:generateChatToken", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/sessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_pb.rb new file mode 100644 index 000000000000..707e75b85ccd --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/widget_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/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/ces/v1beta/widget_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x01\n\x18GenerateChatTokenRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Session\x12\x39\n\ndeployment\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\x12\x1c\n\x0frecaptcha_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14live_handoff_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"`\n\x19GenerateChatTokenResponse\x12\x12\n\nchat_token\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xce\x02\n\rWidgetService\x12\xd0\x01\n\x11GenerateChatToken\x12\x31.google.cloud.ces.v1beta.GenerateChatTokenRequest\x1a\x32.google.cloud.ces.v1beta.GenerateChatTokenResponse\"T\x82\xd3\xe4\x93\x02N\"I/v1beta/{name=projects/*/locations/*/apps/*/sessions/*}:generateChatToken:\x01*\x1aj\xca\x41\x12\x63\x65s.googleapis.com\xd2\x41Rhttps://www.googleapis.com/auth/ces,https://www.googleapis.com/auth/cloud-platformBb\n\x1b\x63om.google.cloud.ces.v1betaB\x12WidgetServiceProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + GenerateChatTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.GenerateChatTokenRequest").msgclass + GenerateChatTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.GenerateChatTokenResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_services_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_services_pb.rb new file mode 100644 index 000000000000..a34357fafa4c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_services_pb.rb @@ -0,0 +1,46 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/ces/v1beta/widget_service.proto for package 'google.cloud.ces.v1beta' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/ces/v1beta/widget_service_pb' + +module Google + module Cloud + module Ces + module V1beta + module WidgetService + # Provides APIs for widgets to interact with CES APIs. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.ces.v1beta.WidgetService' + + # Generates a session scoped token for chat widget to authenticate with + # Session APIs. + rpc :GenerateChatToken, ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest, ::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb new file mode 100644 index 000000000000..42cf420a2cce --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/ces/v1beta/widget_tool.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/ces/v1beta/python_function_pb' +require 'google/cloud/ces/v1beta/schema_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\n)google/cloud/ces/v1beta/widget_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a-google/cloud/ces/v1beta/python_function.proto\x1a$google/cloud/ces/v1beta/schema.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xf4\n\n\nWidgetTool\x12:\n\nparameters\x18\x04 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12H\n\x0bwidget_type\x18\x03 \x01(\x0e\x32..google.cloud.ces.v1beta.WidgetTool.WidgetTypeB\x03\xe0\x41\x01\x12/\n\tui_config\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12J\n\x0c\x64\x61ta_mapping\x18\x06 \x01(\x0b\x32/.google.cloud.ces.v1beta.WidgetTool.DataMappingB\x03\xe0\x41\x01\x12Y\n\x14text_response_config\x18\x07 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.WidgetTool.TextResponseConfigB\x03\xe0\x41\x01\x1a\xed\x01\n\x12TextResponseConfig\x12N\n\x04type\x18\x01 \x01(\x0e\x32;.google.cloud.ces.v1beta.WidgetTool.TextResponseConfig.TypeB\x03\xe0\x41\x01\x12\x18\n\x0bstatic_text\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19text_response_instruction\x18\x03 \x01(\tB\x03\xe0\x41\x01\"E\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x11\n\rLLM_GENERATED\x10\x02\x12\n\n\x06STATIC\x10\x03\x1a\xb2\x03\n\x0b\x44\x61taMapping\x12\x1d\n\x10source_tool_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12_\n\x0e\x66ield_mappings\x18\x02 \x03(\x0b\x32\x42.google.cloud.ces.v1beta.WidgetTool.DataMapping.FieldMappingsEntryB\x03\xe0\x41\x01\x12\x45\n\x0fpython_function\x18\x05 \x01(\x0b\x32\'.google.cloud.ces.v1beta.PythonFunctionB\x03\xe0\x41\x01\x12G\n\x04mode\x18\x04 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.WidgetTool.DataMapping.ModeB\x03\xe0\x41\x01\x12\x19\n\rpython_script\x18\x03 \x01(\tB\x02\x18\x01\x1a\x34\n\x12\x46ieldMappingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"B\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x11\n\rFIELD_MAPPING\x10\x01\x12\x11\n\rPYTHON_SCRIPT\x10\x02\"\xac\x02\n\nWidgetType\x12\x1b\n\x17WIDGET_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43USTOM\x10\x01\x12\x14\n\x10PRODUCT_CAROUSEL\x10\x02\x12\x13\n\x0fPRODUCT_DETAILS\x10\x03\x12\x11\n\rQUICK_ACTIONS\x10\x04\x12\x16\n\x12PRODUCT_COMPARISON\x10\x05\x12\x1c\n\x18\x41\x44VANCED_PRODUCT_DETAILS\x10\x06\x12\x0e\n\nSHORT_FORM\x10\x07\x12\x18\n\x14OVERALL_SATISFACTION\x10\x08\x12\x11\n\rORDER_SUMMARY\x10\t\x12\x17\n\x13\x41PPOINTMENT_DETAILS\x10\n\x12\x19\n\x15\x41PPOINTMENT_SCHEDULER\x10\x0b\x12\x10\n\x0c\x43ONTACT_FORM\x10\x0c\x42\x07\n\x05inputB_\n\x1b\x63om.google.cloud.ces.v1betaB\x0fWidgetToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Ces + module V1beta + WidgetTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool").msgclass + WidgetTool::TextResponseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.TextResponseConfig").msgclass + WidgetTool::TextResponseConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.TextResponseConfig.Type").enummodule + WidgetTool::DataMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.DataMapping").msgclass + WidgetTool::DataMapping::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode").enummodule + WidgetTool::WidgetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.WidgetType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..fc502f609293 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Gemini Enterprise for Customer Experience 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-ces-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb new file mode 100644 index 000000000000..a3e7ea2bfa89 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb @@ -0,0 +1,233 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # An agent acts as the fundamental building block that provides instructions to + # the Large Language Model (LLM) for executing specific tasks. + # @!attribute [rw] llm_agent + # @return [::Google::Cloud::Ces::V1beta::Agent::LlmAgent] + # Optional. The default agent type. + # + # Note: The following fields are mutually exclusive: `llm_agent`, `remote_dialogflow_agent`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] remote_dialogflow_agent + # @return [::Google::Cloud::Ces::V1beta::Agent::RemoteDialogflowAgent] + # Optional. The remote + # [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents) + # agent to be used for the agent execution. If this field is set, all other + # agent level properties will be ignored. + # + # Note: If the Dialogflow agent is in a different project from the app, you + # should grant `roles/dialogflow.client` to the CES service agent + # `service-@gcp-sa-ces.iam.gserviceaccount.com`. + # + # Note: The following fields are mutually exclusive: `remote_dialogflow_agent`, `llm_agent`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the agent. + # Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the agent. + # @!attribute [rw] description + # @return [::String] + # Optional. Human-readable description of the agent. + # @!attribute [rw] model_settings + # @return [::Google::Cloud::Ces::V1beta::ModelSettings] + # Optional. Configurations for the LLM model. + # @!attribute [rw] instruction + # @return [::String] + # Optional. Instructions for the LLM model to guide the agent's behavior. + # @!attribute [rw] tools + # @return [::Array<::String>] + # Optional. List of available tools for the agent. + # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # @!attribute [rw] child_agents + # @return [::Array<::String>] + # Optional. List of child agents in the agent tree. + # Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # @!attribute [rw] before_agent_callbacks + # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] + # Optional. The callbacks to execute before the agent is called. + # The provided callbacks are executed sequentially in the exact order they + # are given in the list. If a callback returns an overridden response, + # execution stops and any remaining callbacks are skipped. + # @!attribute [rw] after_agent_callbacks + # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] + # Optional. The callbacks to execute after the agent is called. + # The provided callbacks are executed sequentially in the exact order they + # are given in the list. If a callback returns an overridden response, + # execution stops and any remaining callbacks are skipped. + # @!attribute [rw] before_model_callbacks + # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] + # Optional. The callbacks to execute before the model is called. If there are + # multiple calls to the model, the callback will be executed multiple times. + # The provided callbacks are executed sequentially in the exact order they + # are given in the list. If a callback returns an overridden response, + # execution stops and any remaining callbacks are skipped. + # @!attribute [rw] after_model_callbacks + # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] + # Optional. The callbacks to execute after the model is called. If there are + # multiple calls to the model, the callback will be executed multiple times. + # The provided callbacks are executed sequentially in the exact order they + # are given in the list. If a callback returns an overridden response, + # execution stops and any remaining callbacks are skipped. + # @!attribute [rw] before_tool_callbacks + # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] + # Optional. The callbacks to execute before the tool is invoked. If there are + # multiple tool invocations, the callback will be executed multiple times. + # The provided callbacks are executed sequentially in the exact order they + # are given in the list. If a callback returns an overridden response, + # execution stops and any remaining callbacks are skipped. + # @!attribute [rw] after_tool_callbacks + # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] + # Optional. The callbacks to execute after the tool is invoked. If there are + # multiple tool invocations, the callback will be executed multiple times. + # The provided callbacks are executed sequentially in the exact order they + # are given in the list. If a callback returns an overridden response, + # execution stops and any remaining callbacks are skipped. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the agent was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the agent was last updated. + # @!attribute [rw] guardrails + # @return [::Array<::String>] + # Optional. List of guardrails for the agent. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` + # @!attribute [rw] etag + # @return [::String] + # Etag used to ensure the object hasn't changed during a read-modify-write + # operation. If the etag is empty, the update will overwrite any concurrent + # changes. + # @!attribute [rw] toolsets + # @return [::Array<::Google::Cloud::Ces::V1beta::Agent::AgentToolset>] + # Optional. List of toolsets for the agent. + # @!attribute [r] generated_summary + # @return [::String] + # Output only. If the agent is generated by the LLM assistant, this field + # contains a descriptive summary of the generation. + # @!attribute [rw] transfer_rules + # @return [::Array<::Google::Cloud::Ces::V1beta::TransferRule>] + # Optional. Agent transfer rules. + # If multiple rules match, the first one in the list will be used. + # @!attribute [r] validation_errors + # @return [::Array<::String>] + # Output only. Misconfigurations or errors in the agent that may affect agent + # quality. + class Agent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Default agent type. The agent uses instructions and callbacks specified in + # the agent to perform the task using a large language model. + class LlmAgent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The agent which will transfer execution to a remote + # [Dialogflow + # CX](https://docs.cloud.google.com/dialogflow/cx/docs/concept/agent) agent. + # The Dialogflow agent will process subsequent user queries until the session + # ends or flow ends, and the control is transferred back to the parent CES + # agent. + # @!attribute [rw] agent + # @return [::String] + # Required. The + # [Dialogflow](https://docs.cloud.google.com/dialogflow/cx/docs/concept/agent) + # agent resource name. + # Format: `projects/{project}/locations/{location}/agents/{agent}` + # @!attribute [rw] flow_id + # @return [::String] + # Optional. The flow ID of the flow in the Dialogflow agent. + # @!attribute [rw] environment_id + # @return [::String] + # Optional. The environment ID of the Dialogflow agent to be used for the + # agent execution. If not specified, the draft environment will be used. + # @!attribute [rw] input_variable_mapping + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The mapping of the app variables names to the Dialogflow + # session parameters names to be sent to the Dialogflow agent as input. + # @!attribute [rw] output_variable_mapping + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The mapping of the Dialogflow session parameters names to the + # app variables names to be sent back to the CES agent after the Dialogflow + # agent execution ends. + # @!attribute [rw] respect_response_interruption_settings + # @return [::Boolean] + # Optional. Indicates whether to respect the message-level interruption + # settings configured in the Dialogflow agent. + # + # * If false: all response messages from the Dialogflow agent follow the + # app-level barge-in settings. + # * If true: only response messages with + # [`allow_playback_interruption`](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#text) + # set to true will be interruptable, all other messages follow the + # app-level barge-in settings. + # @!attribute [rw] language_code_variable + # @return [::String] + # Optional. The name of the variable that contains the language code to be + # used for the Dialogflow session. If unspecified, the default language + # code of the Dialogflow agent will be used. + class RemoteDialogflowAgent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class InputVariableMappingEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class OutputVariableMappingEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A toolset with a selection of its tools. + # @!attribute [rw] toolset + # @return [::String] + # Required. The resource name of the toolset. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` + # @!attribute [rw] tool_ids + # @return [::Array<::String>] + # Optional. The tools IDs to filter the toolset. + class AgentToolset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_card.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_card.rb new file mode 100644 index 000000000000..66fb0ffa6ca8 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_card.rb @@ -0,0 +1,122 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # AgentCard conveys key information about a remote agent. + # It is a trimmed version of the AgentCard defined in the A2A protocol + # https://a2a-protocol.org/dev/specification/#441-agentcard + # @!attribute [rw] name + # @return [::String] + # Required. A human-readable name for the agent. + # @!attribute [rw] description + # @return [::String] + # Required. A description of the agent's domain of action/solution space. + # @!attribute [rw] supported_interfaces + # @return [::Array<::Google::Cloud::Ces::V1beta::AgentInterface>] + # Required. Ordered list of supported interfaces. The first entry is + # preferred. + # @!attribute [rw] version + # @return [::String] + # Required. The version of the agent. + # @!attribute [rw] skills + # @return [::Array<::Google::Cloud::Ces::V1beta::AgentSkill>] + # Required. Skills represent a unit of ability an agent can perform. This may + # somewhat abstract but represents a more focused set of actions that the + # agent is highly likely to succeed at. + class AgentCard + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Declares a combination of a target URL, transport and protocol version for + # interacting with the agent. This allows agents to expose the same + # functionality over multiple protocol binding mechanisms. + # @!attribute [rw] url + # @return [::String] + # Required. The URL where this interface is available. Must be a valid + # absolute HTTPS URL in production. Example: + # "https://api.example.com/a2a/v1", "https://grpc.example.com/a2a" + # @!attribute [rw] protocol_binding + # @return [::String] + # Required. The protocol binding supported at this URL. This is an open form + # string, to be easily extended for other protocol bindings. The core ones + # officially supported are `JSONRPC`, `GRPC` and `HTTP+JSON`. + # @!attribute [rw] tenant + # @return [::String] + # Tenant ID to be used in the request when calling the agent. + # @!attribute [rw] protocol_version + # @return [::String] + # Required. The version of the A2A protocol this interface exposes. + # Use the latest supported minor version per major version. + # Examples: "0.3", "1.0" + class AgentInterface + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a distinct capability or function that an agent can perform. + # @!attribute [rw] id + # @return [::String] + # Required. A unique identifier for the agent's skill. + # @!attribute [rw] name + # @return [::String] + # Required. A human-readable name for the skill. + # @!attribute [rw] description + # @return [::String] + # Required. A detailed description of the skill. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Required. A set of keywords describing the skill's capabilities. + # @!attribute [rw] examples + # @return [::Array<::String>] + # Example prompts or scenarios that this skill can handle. + # @!attribute [rw] input_modes + # @return [::Array<::String>] + # The set of supported input media types for this skill, overriding the + # agent's defaults. + # @!attribute [rw] output_modes + # @return [::Array<::String>] + # The set of supported output media types for this skill, overriding the + # agent's defaults. + class AgentSkill + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a tool that allows the agent to call another remote agent. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the tool. + # @!attribute [rw] description + # @return [::String] + # Required. The description of the tool. + # @!attribute [rw] agent_card + # @return [::Google::Cloud::Ces::V1beta::AgentCard] + # Required. The agent card of the remote agent that this tool invokes. + class RemoteAgentTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb new file mode 100644 index 000000000000..9290691ca595 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb @@ -0,0 +1,1682 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_apps AgentService.ListApps}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location to list apps from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListAppsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_apps AgentService.ListApps} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the apps. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + class ListAppsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_apps AgentService.ListApps}. + # @!attribute [rw] apps + # @return [::Array<::Google::Cloud::Ces::V1beta::App>] + # The list of apps. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListAppsRequest#page_token ListAppsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListAppsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_app AgentService.GetApp}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the app to retrieve. + class GetAppRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_app AgentService.CreateApp}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location to create an app in. + # @!attribute [rw] app_id + # @return [::String] + # Optional. The ID to use for the app, which will become the final component + # of the app's resource name. If not provided, a unique ID will be + # automatically assigned for the app. + # @!attribute [rw] app + # @return [::Google::Cloud::Ces::V1beta::App] + # Required. The app to create. + class CreateAppRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_app AgentService.UpdateApp}. + # @!attribute [rw] app + # @return [::Google::Cloud::Ces::V1beta::App] + # Required. The app to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateAppRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_app AgentService.DeleteApp}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the app to delete. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the app. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the app, deletion will be blocked and an + # ABORTED error will be returned. + class DeleteAppRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#export_app AgentService.ExportApp}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the app to export. + # @!attribute [rw] export_format + # @return [::Google::Cloud::Ces::V1beta::ExportAppRequest::ExportFormat] + # Required. The format to export the app in. + # @!attribute [rw] gcs_uri + # @return [::String] + # Optional. The [Google Cloud + # Storage](https://cloud.google.com/storage/docs/) URI to which to export the + # app. The format of this URI must be `gs:///`. The + # exported app archive will be written directly to the specified GCS object. + # @!attribute [rw] app_version + # @return [::String] + # Optional. The resource name of the app version to export. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. + class ExportAppRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Export format for the app. + module ExportFormat + # The export format is unspecified. + EXPORT_FORMAT_UNSPECIFIED = 0 + + # The export format is JSON. + JSON = 1 + + # The export format is YAML. + YAML = 2 + end + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#export_app AgentService.ExportApp}. + # @!attribute [rw] app_content + # @return [::String] + # App folder compressed as a zip file. + # + # Note: The following fields are mutually exclusive: `app_content`, `app_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] app_uri + # @return [::String] + # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + # to which the app was exported. + # + # Note: The following fields are mutually exclusive: `app_uri`, `app_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExportAppResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#import_app AgentService.ImportApp}. + # @!attribute [rw] gcs_uri + # @return [::String] + # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + # from which to import app. The format of this URI must be + # `gs:///`. + # + # Note: The following fields are mutually exclusive: `gcs_uri`, `app_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] app_content + # @return [::String] + # Raw bytes representing the compressed zip file with the app folder + # structure. + # + # Note: The following fields are mutually exclusive: `app_content`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name with the location of the app to import. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the app to import. + # * If the app is created on import, and the display name is specified, + # the imported app will use this display name. If a conflict is detected + # with an existing app, a timestamp will be appended to the display name + # to make it unique. + # * If the app is a reimport, this field should not be set. Providing a + # display name during reimport will result in an INVALID_ARGUMENT error. + # @!attribute [rw] app_id + # @return [::String] + # Optional. The ID to use for the imported app. + # * If not specified, a unique ID will be automatically assigned for + # the app. + # * Otherwise, the imported app will use this ID as the final component of + # its resource name. If an app with the same ID already exists at the + # specified location in the project, the content of the existing app will be + # replaced. + # @!attribute [rw] import_options + # @return [::Google::Cloud::Ces::V1beta::ImportAppRequest::ImportOptions] + # Optional. Options governing the import process for the app. + # @!attribute [rw] ignore_app_lock + # @return [::Boolean] + # Optional. Flag for overriding the app lock during import. + # If set to true, the import process will ignore the app lock. + class ImportAppRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration options for the app import process. + # These options control how the import behaves, particularly when + # conflicts arise with existing app data. + # @!attribute [rw] conflict_resolution_strategy + # @return [::Google::Cloud::Ces::V1beta::ImportAppRequest::ImportOptions::ConflictResolutionStrategy] + # Optional. The strategy to use when resolving conflicts during import. + class ImportOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the strategy for handling conflicts when an app with the same ID + # already exists, or when imported resources (like Agents, Tools, etc.) + # have the same display names as existing resources within that app. + module ConflictResolutionStrategy + # The conflict resolution strategy is unspecified. + CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED = 0 + + # Replace existing data with imported data. + # If an app with the same `app_id` already exists, its content will be + # updated based on the imported app. + # - Resources (App, Agents, Tools, Examples, Guardrails, Toolsets) in the + # imported app that have the same display name as existing resources + # will overwrite the existing ones. + # - Imported resources with new display names will be created. + # - Existing resources that do not have a matching display name in the + # imported app will remain untouched. + REPLACE = 1 + + # Overwrite existing data with imported data. + # If an app with the same `app_id` already exists, its content will be + # overwritten with the imported app. + # - Existing resources (Agents, Tools, Examples, Guardrails, Toolsets) in + # the app will be deleted. + # - Imported resources will be created as new resources. + OVERWRITE = 2 + end + end + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#import_app AgentService.ImportApp}. + # @!attribute [rw] name + # @return [::String] + # The resource name of the app that was imported. + # @!attribute [rw] warnings + # @return [::Array<::String>] + # Warning messages generated during the import process. + # If errors occur for specific resources, they will not be included in the + # imported app and the error will be mentioned here. + class ImportAppResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_agents AgentService.ListAgents}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list agents from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListAgentsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_agents AgentService.ListAgents} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the agents. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + class ListAgentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_agents AgentService.ListAgents}. + # @!attribute [rw] agents + # @return [::Array<::Google::Cloud::Ces::V1beta::Agent>] + # The list of agents. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListAgentsRequest#page_token ListAgentsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListAgentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_agent AgentService.GetAgent}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the agent to retrieve. + class GetAgentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_agent AgentService.CreateAgent}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to create an agent in. + # @!attribute [rw] agent_id + # @return [::String] + # Optional. The ID to use for the agent, which will become the final + # component of the agent's resource name. If not provided, a unique ID will + # be automatically assigned for the agent. + # @!attribute [rw] agent + # @return [::Google::Cloud::Ces::V1beta::Agent] + # Required. The agent to create. + class CreateAgentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_agent AgentService.UpdateAgent}. + # @!attribute [rw] agent + # @return [::Google::Cloud::Ces::V1beta::Agent] + # Required. The agent to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateAgentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_agent AgentService.DeleteAgent}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the agent to delete. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. Indicates whether to forcefully delete the agent, even if it is + # still referenced by other app/agents/examples. + # + # * If `force = false`, the deletion fails if other agents/examples + # reference it. + # * If `force = true`, delete the agent and remove it from all referencing + # apps/agents/examples. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the agent. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the agent, deletion will be blocked and + # an ABORTED error will be returned. + class DeleteAgentRequest + 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] 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 + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, + # corresponding to `Code.CANCELLED`. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_examples AgentService.ListExamples}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list examples from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListExamplesResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_examples AgentService.ListExamples} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the examples. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + class ListExamplesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_examples AgentService.ListExamples}. + # @!attribute [rw] examples + # @return [::Array<::Google::Cloud::Ces::V1beta::Example>] + # The list of examples. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListExamplesRequest#page_token ListExamplesRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListExamplesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_example AgentService.GetExample}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the example to retrieve. + class GetExampleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_example AgentService.CreateExample}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to create an example in. + # @!attribute [rw] example_id + # @return [::String] + # Optional. The ID to use for the example, which will become the final + # component of the example's resource name. If not provided, a unique ID will + # be automatically assigned for the example. + # @!attribute [rw] example + # @return [::Google::Cloud::Ces::V1beta::Example] + # Required. The example to create. + class CreateExampleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_example AgentService.UpdateExample}. + # @!attribute [rw] example + # @return [::Google::Cloud::Ces::V1beta::Example] + # Required. The example to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateExampleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_example AgentService.DeleteExample}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the example to delete. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the example. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the example, deletion will be blocked + # and an ABORTED error will be returned. + class DeleteExampleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_tools AgentService.ListTools}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list tools from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListToolsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_tools AgentService.ListTools} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the tools. Use + # "include_system_tools=true" to include system tools in the response. See + # https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + class ListToolsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_tools AgentService.ListTools}. + # @!attribute [rw] tools + # @return [::Array<::Google::Cloud::Ces::V1beta::Tool>] + # The list of tools. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListToolsRequest#page_token ListToolsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListToolsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_tool AgentService.GetTool}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the tool to retrieve. + class GetToolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_tool AgentService.CreateTool}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to create a tool in. + # @!attribute [rw] tool_id + # @return [::String] + # Optional. The ID to use for the tool, which will become the final component + # of the tool's resource name. If not provided, a unique ID will be + # automatically assigned for the tool. + # @!attribute [rw] tool + # @return [::Google::Cloud::Ces::V1beta::Tool] + # Required. The tool to create. + class CreateToolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_tool AgentService.UpdateTool}. + # @!attribute [rw] tool + # @return [::Google::Cloud::Ces::V1beta::Tool] + # Required. The tool to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateToolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_tool AgentService.DeleteTool}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the tool to delete. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. Indicates whether to forcefully delete the tool, even if it is + # still referenced by agents/examples. + # + # * If `force = false`, the deletion will fail if any agents still + # reference the tool. + # * If `force = true`, all existing references from agents will be removed + # and the tool will be deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the tool. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the tool, deletion will be blocked and + # an ABORTED error will be returned. + class DeleteToolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations AgentService.ListConversations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list conversations from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListConversationsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations AgentService.ListConversations} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the conversations. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] source + # @return [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, Source.Live + # will be applied by default. Will be deprecated in favor of `sources` field. + # @!attribute [rw] sources + # @return [::Array<::Google::Cloud::Ces::V1beta::Conversation::Source>] + # Optional. Indicate the sources of the conversations. If not set, all + # available sources will be applied by default. + class ListConversationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations AgentService.ListConversations}. + # @!attribute [rw] conversations + # @return [::Array<::Google::Cloud::Ces::V1beta::Conversation>] + # The list of conversations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListConversationsRequest#page_token ListConversationsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListConversationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_conversation AgentService.GetConversation}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the conversation to retrieve. + # @!attribute [rw] source + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, all source + # will be searched. + class GetConversationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_conversation AgentService.DeleteConversation}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the conversation to delete. + # @!attribute [rw] source + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, Source.Live + # will be applied by default. + class DeleteConversationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#batch_delete_conversations AgentService.BatchDeleteConversations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to delete conversations from. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] conversations + # @return [::Array<::String>] + # Required. The resource names of the conversations to delete. + class BatchDeleteConversationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#batch_delete_conversations AgentService.BatchDeleteConversations}. + # @!attribute [rw] deleted_conversations + # @return [::Array<::String>] + # The list of conversations that were successfully deleted. + # @!attribute [rw] failed_conversations + # @return [::Array<::String>] + # The list of conversations that failed to be deleted. + # @!attribute [rw] error_messages + # @return [::Array<::String>] + # Optional. A list of error messages associated with conversations that + # failed to be deleted. + class BatchDeleteConversationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails AgentService.ListGuardrails}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list guardrails from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListGuardrailsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails AgentService.ListGuardrails} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the guardrails. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + class ListGuardrailsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails AgentService.ListGuardrails}. + # @!attribute [rw] guardrails + # @return [::Array<::Google::Cloud::Ces::V1beta::Guardrail>] + # The list of guardrails. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListGuardrailsRequest#page_token ListGuardrailsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListGuardrailsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_guardrail AgentService.GetGuardrail}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the guardrail to retrieve. + class GetGuardrailRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_guardrail AgentService.CreateGuardrail}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to create a guardrail in. + # @!attribute [rw] guardrail_id + # @return [::String] + # Optional. The ID to use for the guardrail, which will become the final + # component of the guardrail's resource name. If not provided, a unique ID + # will be automatically assigned for the guardrail. + # @!attribute [rw] guardrail + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # Required. The guardrail to create. + class CreateGuardrailRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_guardrail AgentService.UpdateGuardrail}. + # @!attribute [rw] guardrail + # @return [::Google::Cloud::Ces::V1beta::Guardrail] + # Required. The guardrail to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateGuardrailRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_guardrail AgentService.DeleteGuardrail}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the guardrail to delete. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. Indicates whether to forcefully delete the guardrail, even if it + # is still referenced by app/agents. + # + # * If `force = false`, the deletion fails if any apps/agents still + # reference the guardrail. + # * If `force = true`, all existing references from apps/agents will be + # removed and the guardrail will be deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the guardrail. If an etag is not provided, + # the deletion will overwrite any concurrent changes. If an etag is provided + # and does not match the current etag of the guardrail, deletion will be + # blocked and an ABORTED error will be returned. + class DeleteGuardrailRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_deployments AgentService.ListDeployments}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent app. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of deployments to return. The service may + # return fewer than this value. If unspecified, at most 50 deployments will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeployments` must + # match the call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + class ListDeploymentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_deployments AgentService.ListDeployments}. + # @!attribute [rw] deployments + # @return [::Array<::Google::Cloud::Ces::V1beta::Deployment>] + # The list of deployments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDeploymentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_deployment AgentService.GetDeployment}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + class GetDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_deployment AgentService.CreateDeployment}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent app. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] deployment_id + # @return [::String] + # Optional. The ID to use for the deployment, which will become the final + # component of the deployment's resource name. If not provided, a unique ID + # will be automatically assigned for the deployment. + # @!attribute [rw] deployment + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # Required. The deployment to create. + class CreateDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_deployment AgentService.UpdateDeployment}. + # @!attribute [rw] deployment + # @return [::Google::Cloud::Ces::V1beta::Deployment] + # Required. The deployment to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + class UpdateDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_deployment AgentService.DeleteDeployment}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment to delete. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the deployment. + # If an etag is provided and does not match the current etag of the + # deployment, deletion will be blocked and an ABORTED error will be returned. + class DeleteDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets AgentService.ListToolsets}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list toolsets from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListToolsetsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets AgentService.ListToolsets} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the toolsets. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + class ListToolsetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets AgentService.ListToolsets}. + # @!attribute [rw] toolsets + # @return [::Array<::Google::Cloud::Ces::V1beta::Toolset>] + # The list of toolsets. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListToolsetsRequest#page_token ListToolsetsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListToolsetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_toolset AgentService.GetToolset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the toolset to retrieve. + class GetToolsetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_toolset AgentService.CreateToolset}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to create a toolset in. + # @!attribute [rw] toolset_id + # @return [::String] + # Optional. The ID to use for the toolset, which will become the final + # component of the toolset's resource name. If not provided, a unique ID will + # be automatically assigned for the toolset. + # @!attribute [rw] toolset + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # Required. The toolset to create. + class CreateToolsetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_toolset AgentService.UpdateToolset}. + # @!attribute [rw] toolset + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # Required. The toolset to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateToolsetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_toolset AgentService.DeleteToolset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the toolset to delete. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. Indicates whether to forcefully delete the toolset, even if it is + # still referenced by app/agents. + # + # * If `force = false`, the deletion fails if any agents still + # reference the toolset. + # * If `force = true`, all existing references from agents will be + # removed and the toolset will be deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the toolset. If an etag is not provided, the + # deletion will overwrite any concurrent changes. If an etag is provided and + # does not match the current etag of the toolset, deletion will be blocked + # and an ABORTED error will be returned. + class DeleteToolsetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions AgentService.ListAppVersions}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list app versions from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListAppVersionsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions AgentService.ListAppVersions} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the app versions. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + class ListAppVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions AgentService.ListAppVersions}. + # @!attribute [rw] app_versions + # @return [::Array<::Google::Cloud::Ces::V1beta::AppVersion>] + # The list of app versions. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListAppVersionsRequest#page_token ListAppVersionsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListAppVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_app_version AgentService.GetAppVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the app version to retrieve. + class GetAppVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_app_version AgentService.DeleteAppVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the app version to delete. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the app version. If an etag is not provided, + # the deletion will overwrite any concurrent changes. If an etag is provided + # and does not match the current etag of the app version, deletion will be + # blocked and an ABORTED error will be returned. + class DeleteAppVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_app_version AgentService.CreateAppVersion} + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to create an app version in. + # @!attribute [rw] app_version_id + # @return [::String] + # Optional. The ID to use for the app version, which will become the final + # component of the app version's resource name. If not provided, a unique ID + # will be automatically assigned for the app version. + # @!attribute [rw] app_version + # @return [::Google::Cloud::Ces::V1beta::AppVersion] + # Required. The app version to create. + class CreateAppVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#restore_app_version AgentService.RestoreAppVersion} + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the app version to restore. + class RestoreAppVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#restore_app_version AgentService.RestoreAppVersion} + class RestoreAppVersionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource AgentService.GenerateAppResource}. + # @!attribute [rw] agent + # @return [::Google::Cloud::Ces::V1beta::Agent] + # The agent resource to be used by the LLM assistant, can be empty for + # generating a new agent. + # + # Note: The following fields are mutually exclusive: `agent`, `tool`, `toolset`, `app_version_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tool + # @return [::Google::Cloud::Ces::V1beta::Tool] + # The tool resource to be used by the LLM assistant, can be empty for + # generating a new tool. + # + # Note: The following fields are mutually exclusive: `tool`, `agent`, `toolset`, `app_version_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] toolset + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # The toolset resource to be used by the LLM assistant, can be empty for + # generating a new toolset. + # + # Note: The following fields are mutually exclusive: `toolset`, `agent`, `tool`, `app_version_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] app_version_context + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppVersionContext] + # The app version context specifying the base snapshot and target agent. + # + # Note: The following fields are mutually exclusive: `app_version_context`, `agent`, `tool`, `toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to generate the resource for. + # @!attribute [rw] refine_instructions + # @return [::Array<::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::RefineInstructions>] + # Optional. List of refine instructions to be used to refine the resource. + # @!attribute [rw] tool_generation_config + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig] + # Optional. The configuration to be used to generate the tool. + # @!attribute [rw] app_generation_config + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppGenerationConfig] + # Optional. The configuration to be used to generate the agents and tools. + # @!attribute [rw] evaluation_generation_config + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationGenerationConfig] + # Optional. The configuration to be used to generate the evaluations. + # @!attribute [rw] evaluation_personas_generation_config + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationPersonasGenerationConfig] + # Optional. The configuration to be used to generate the evaluation personas. + # @!attribute [rw] quality_report_generation_config + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::QualityReportGenerationConfig] + # Optional. The configuration to be used for quality report generation. + # @!attribute [rw] hill_climbing_fix_config + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::HillClimbingFixConfig] + # Optional. The configuration to be used for hill climbing fixes. + class GenerateAppResourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The app version context specifying the base snapshot and target agent. + # @!attribute [rw] app_version + # @return [::String] + # The resource name of the app version to be used by the LLM assistant. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # @!attribute [rw] agent_resource_name + # @return [::String] + # The resource name of the target agent to be used by the LLM assistant. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + class AppVersionContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The instructions to be used to refine a part of the resource. The part of + # the resource can be specified with a start index, end index and a field + # mask. For example, if you want to refine a part of the agent instructions + # you can specify the index of the first character of the instructions, the + # index of the last character of the instructions and the field mask as + # "instructions". + # @!attribute [rw] start_index + # @return [::Integer] + # Required. The first character (inclusive) of the text to refine. + # @!attribute [rw] end_index + # @return [::Integer] + # Required. The last character (inclusive) of the text to refine. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The field of the resource being refined. Only one field is + # allowed per RefineInstructions. If refining agent instructions, the field + # mask should be "instructions". + # @!attribute [rw] instructions + # @return [::String] + # Required. The instructions to refine the resource. + class RefineInstructions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration to be used to generate a tool. + # @!attribute [rw] context + # @return [::String] + # Optional. The context which describes the tool to be generated. This can + # be empty if the tool request & response are provided. + # @!attribute [rw] file_contexts + # @return [::Array<::Google::Cloud::Ces::V1beta::FileContext>] + # Optional. The files to be used as context. + # @!attribute [rw] open_api_toolset_generation_config + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig::OpenApiToolsetGenerationConfig] + # Optional. The configuration to be used to generate an Open API schema. + class ToolGenerationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration to be used to generate an Open API schema. + # @!attribute [rw] uri + # @return [::String] + # Required. The base uri of the tool. + # @!attribute [rw] operation_generation_configs + # @return [::Array<::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig::OpenApiToolsetGenerationConfig::OperationGenerationConfig>] + # Required. The list of operations to be added to the Open API schema. + class OpenApiToolsetGenerationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration to be used to generate an operation in the Open API + # schema. + # @!attribute [rw] method + # @return [::String] + # Required. The uri of the tool. This should include query and path + # parameters if any. + # @!attribute [rw] path + # @return [::String] + # Required. The path of the tool to be appended to the base uri. This + # should include query and path parameters if any. + # @!attribute [rw] request_json + # @return [::String] + # Required. A sample request to the tool in JSON format. Skip if the + # tool does not support request body. + # @!attribute [rw] response_json + # @return [::String] + # Required. A sample response from the tool in JSON format. + class OperationGenerationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # The configuration to be used to generate the app. + # @!attribute [rw] context + # @return [::String] + # Optional. The context which describes the requirements of the agents & + # tools to be generated. + # @!attribute [rw] file_contexts + # @return [::Array<::Google::Cloud::Ces::V1beta::FileContext>] + # Optional. The files to be used as context. + # @!attribute [rw] dataset_id + # @return [::String] + # Optional. The insights dataset to be used to fetch conversation data for + # generating the agents & tools. + # Format: + # `projects/{project}/locations/{location}/datasets/{dataset}`. + # @!attribute [rw] generate_evaluations + # @return [::Boolean] + # Optional. Whether to generate the evaluations for the app. If true, the + # provided context will be used to generate the evaluations data. + # @!attribute [rw] gcs_location + # @return [::String] + # Optional. The Cloud Storage location to store the generated question + # answer data to be used by the Datastore tool. This data is generated only + # when using conversation data as an input source. The location must be + # in the same project as the app. + # Format: `gs://...`. + class AppGenerationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration to be used to generate the evaluations. + # @!attribute [rw] dataset_id + # @return [::String] + # Optional. The insights dataset to be used to fetch conversation data for + # generating the evaluations. + # Format: + # `projects/{project}/locations/{location}/datasets/{dataset}`. + class EvaluationGenerationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration to be used to generate the evaluation personas. + class EvaluationPersonasGenerationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration to be used for quality report generation. + # @!attribute [rw] evaluation_run + # @return [::String] + # Required. The evaluation run used to inform quality report analysis. + class QualityReportGenerationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration to be used for hill climbing fixes. + # @!attribute [rw] quality_report + # @return [::Google::Cloud::Ces::V1beta::QualityReport] + # Required. The quality report used to inform the instruction following + # fix. + class HillClimbingFixConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource AgentService.GenerateAppResource}. + # @!attribute [rw] agent + # @return [::Google::Cloud::Ces::V1beta::Agent] + # Agent generated by the LLM assistant. + # + # Note: The following fields are mutually exclusive: `agent`, `toolset`, `app_snapshot`, `tools`, `evaluations`, `app_resources`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] toolset + # @return [::Google::Cloud::Ces::V1beta::Toolset] + # Toolset generated by the LLM assistant. Supports Open API toolset schema + # generation. + # + # Note: The following fields are mutually exclusive: `toolset`, `agent`, `app_snapshot`, `tools`, `evaluations`, `app_resources`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] app_snapshot + # @return [::Google::Cloud::Ces::V1beta::AppSnapshot] + # App snapshot generated by the LLM assistant. This snapshot contains the + # app, agents & tools generated by the LLM assistant. + # + # Note: The following fields are mutually exclusive: `app_snapshot`, `agent`, `toolset`, `tools`, `evaluations`, `app_resources`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tools + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceResponse::Tools] + # The list of tools generated by the LLM assistant. + # + # Note: The following fields are mutually exclusive: `tools`, `agent`, `toolset`, `app_snapshot`, `evaluations`, `app_resources`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] evaluations + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceResponse::Evaluations] + # Evaluations generated by the LLM assistant. + # + # Note: The following fields are mutually exclusive: `evaluations`, `agent`, `toolset`, `app_snapshot`, `tools`, `app_resources`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] app_resources + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceResponse::AppResources] + # The app resources generated by the LLM assistant. + # + # Note: The following fields are mutually exclusive: `app_resources`, `agent`, `toolset`, `app_snapshot`, `tools`, `evaluations`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] quality_report + # @return [::Google::Cloud::Ces::V1beta::QualityReport] + # The quality report generated by the LLM assistant. + # + # Note: The following fields are mutually exclusive: `quality_report`, `agent`, `toolset`, `app_snapshot`, `tools`, `evaluations`, `app_resources`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] generate_result_info + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceResponse::GenerateResultInfo] + # Additional information about the generated result. + class GenerateAppResourceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of evaluations generated by the LLM assistant. + # @!attribute [rw] evaluations + # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation>] + # The list of generated evaluations. + class Evaluations + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The list of tools generated by the LLM assistant. + # @!attribute [rw] tools + # @return [::Array<::Google::Cloud::Ces::V1beta::Tool>] + # The list of tools generated by the LLM assistant. + class Tools + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The list of app resources generated by the LLM assistant. + # @!attribute [rw] app_snapshot + # @return [::Google::Cloud::Ces::V1beta::AppSnapshot] + # The app snapshot generated by the LLM assistant. This snapshot contains + # the app, agents & tools generated by the LLM assistant. + # @!attribute [rw] evaluations + # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation>] + # The list of evaluations generated by the LLM assistant. + class AppResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This provides additional information about the generated result. + # @!attribute [rw] explanation + # @return [::String] + # An explanation of the changes in the generated resource. + class GenerateResultInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The report describing any identified quality issues in the app. + # @!attribute [rw] issues + # @return [::Array<::Google::Cloud::Ces::V1beta::QualityReport::AgentIssues>] + # Optional. The issues grouped by agent. + # @!attribute [rw] evaluation_runs + # @return [::Array<::String>] + # Optional. A list of evaluation runs used to generate the quality report. + # Format: + # `projects/{project}/locations/{location}/evaluationRuns/{evaluationRun}`. + # @!attribute [rw] general_issues + # @return [::Array<::Google::Cloud::Ces::V1beta::QualityReport::Issue>] + # Optional. General issues not specific to any agent. + class QualityReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The issue identified. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the issue found. + # @!attribute [rw] occurrence_count + # @return [::Integer] + # Optional. How many times this issue occurred. + # @!attribute [rw] proposed_solution + # @return [::String] + # Optional. Proposed solution to fix the issue by modifying instructions or + # tools. + class Issue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Issues identified for a single agent. + # @!attribute [rw] agent + # @return [::String] + # Optional. The name of the agent to which the issues are related. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # @!attribute [rw] issues + # @return [::Array<::Google::Cloud::Ces::V1beta::QualityReport::Issue>] + # Optional. List of issues found for this agent. + class AgentIssues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Operation metadata for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource AgentService.GenerateAppResource}. + # @!attribute [r] generation_type + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceOperationMetadata::GenerationType] + # Output only. The type of the operation. + # @!attribute [r] message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!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. The resource name of the app that the operation is associated + # with. Format: `projects/{project}/locations/{location}/apps/{app}`. + # @!attribute [r] partial_errors + # @return [::Array<::Google::Rpc::Status>] + # Output only. Error messages from the resource generation process. + class GenerateAppResourceOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the generation operation. + module GenerationType + # Unspecified operation type. + GENERATION_TYPE_UNSPECIFIED = 0 + + # Agent instruction restructure type. + AGENT_RESTRUCTURE = 1 + + # Agent instruction refinement type. + AGENT_REFINE = 2 + + # Agent creation from type. + AGENT_CREATE = 3 + + # Tool creation type. + TOOL_CREATE = 4 + + # Scenario creation type. + SCENARIO_CREATE = 5 + + # Scenario creation from transcripts type. + SCENARIO_CREATE_FROM_TRANSCRIPTS = 7 + + # Evaluation persona generation type. + EVALUATION_PERSONA_CREATE = 6 + + # Quality report generation type. + QUALITY_REPORT_CREATE = 8 + + # Instruction following fix type (used for hill climbing fixes). + INSTRUCTION_FOLLOWING_FIX = 9 + end + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs AgentService.ListChangelogs}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list changelogs from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListChangelogsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs AgentService.ListChangelogs} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the changelogs. + # See https://google.aip.dev/160 for more details. + # + # The filter string can be used to filter by `action`, `resource_type`, + # `resource_name`, `author`, and `create_time`. + # The `:` comparator can be used for case-insensitive partial matching on + # string fields, while `=` performs an exact case-sensitive match. + # + # Examples: + # * `action:update` (case-insensitive partial match) + # * `action="Create"` (case-sensitive exact match) + # * `resource_type:agent` + # * `resource_name:my-agent` + # * `author:me@example.com` + # * `create_time > "2025-01-01T00:00:00Z"` + # * `create_time <= "2025-01-01T00:00:00Z" AND resource_type:tool` + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time" is supported. + # See https://google.aip.dev/132#ordering for more details. + class ListChangelogsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs AgentService.ListChangelogs}. + # @!attribute [rw] changelogs + # @return [::Array<::Google::Cloud::Ces::V1beta::Changelog>] + # The list of changelogs. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListChangelogsRequest#page_token ListChangelogsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListChangelogsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_changelog AgentService.GetChangelog}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the changelog to retrieve. + class GetChangelogRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_security_settings AgentService.GetSecuritySettings}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the security settings to retrieve. + # Format: `projects/{project}/locations/{location}/securitySettings` + class GetSecuritySettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_security_settings AgentService.UpdateSecuritySettings}. + # @!attribute [rw] security_settings + # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] + # Required. The security settings to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateSecuritySettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_tool.rb new file mode 100644 index 000000000000..862c7b0e038f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_tool.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # Represents a tool that allows the agent to call another agent. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the agent tool. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the tool's purpose. + # @!attribute [rw] root_agent + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. Deprecated: Use `agent` instead. + # The resource name of the root agent that is the entry point of the tool. + # Format: `projects/{project}/locations/{location}/agents/{agent}` + # @!attribute [rw] agent + # @return [::String] + # Optional. The resource name of the agent that is the entry point of the + # tool. Format: `projects/{project}/locations/{location}/agents/{agent}` + class AgentTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_transfers.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_transfers.rb new file mode 100644 index 000000000000..22e4ddb01a65 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_transfers.rb @@ -0,0 +1,111 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Expression condition based on session state. + # @!attribute [rw] expression + # @return [::String] + # Required. The string representation of cloud.api.Expression condition. + class ExpressionCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Python code block to evaluate the condition. + # @!attribute [rw] python_code + # @return [::String] + # Required. The python code to execute. + class PythonCodeCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Rule for transferring to a specific agent. + # @!attribute [rw] deterministic_transfer + # @return [::Google::Cloud::Ces::V1beta::TransferRule::DeterministicTransfer] + # Optional. A rule that immediately transfers to the target agent when the + # condition is met. + # + # Note: The following fields are mutually exclusive: `deterministic_transfer`, `disable_planner_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disable_planner_transfer + # @return [::Google::Cloud::Ces::V1beta::TransferRule::DisablePlannerTransfer] + # Optional. Rule that prevents the planner from transferring to the target + # agent. + # + # Note: The following fields are mutually exclusive: `disable_planner_transfer`, `deterministic_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] child_agent + # @return [::String] + # Required. The resource name of the child agent the rule applies to. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # @!attribute [rw] direction + # @return [::Google::Cloud::Ces::V1beta::TransferRule::Direction] + # Required. The direction of the transfer. + class TransferRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Deterministic transfer rule. When the condition evaluates to true, the + # transfer occurs. + # @!attribute [rw] expression_condition + # @return [::Google::Cloud::Ces::V1beta::ExpressionCondition] + # Optional. A rule that evaluates a session state condition. + # If the condition evaluates to true, the transfer occurs. + # + # Note: The following fields are mutually exclusive: `expression_condition`, `python_code_condition`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] python_code_condition + # @return [::Google::Cloud::Ces::V1beta::PythonCodeCondition] + # Optional. A rule that uses Python code block to evaluate the + # conditions. If the condition evaluates to true, the transfer occurs. + # + # Note: The following fields are mutually exclusive: `python_code_condition`, `expression_condition`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DeterministicTransfer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A rule that prevents the planner from transferring to the target agent. + # @!attribute [rw] expression_condition + # @return [::Google::Cloud::Ces::V1beta::ExpressionCondition] + # Required. If the condition evaluates to true, planner will not be allowed + # to transfer to the target agent. + class DisablePlannerTransfer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The direction of the transfer. + module Direction + # Unspecified direction. + DIRECTION_UNSPECIFIED = 0 + + # Transfer from the parent agent to the child agent. + PARENT_TO_CHILD = 1 + + # Transfer from the child agent to the parent agent. + CHILD_TO_PARENT = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb new file mode 100644 index 000000000000..bc4fbb0dcbdc --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb @@ -0,0 +1,883 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # An app serves as a top-level container for a group of agents, including the + # root agent and its sub-agents, along with their associated configurations. + # These agents work together to achieve specific goals within the app's + # context. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the app. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the app. + # @!attribute [rw] description + # @return [::String] + # Optional. Human-readable description of the app. + # @!attribute [rw] pinned + # @return [::Boolean] + # Optional. Whether the app is pinned in the app list. + # @!attribute [rw] root_agent + # @return [::String] + # Optional. The root agent is the entry point of the app. + # Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # @!attribute [rw] language_settings + # @return [::Google::Cloud::Ces::V1beta::LanguageSettings] + # Optional. Language settings of the app. + # @!attribute [rw] time_zone_settings + # @return [::Google::Cloud::Ces::V1beta::TimeZoneSettings] + # Optional. TimeZone settings of the app. + # @!attribute [rw] audio_processing_config + # @return [::Google::Cloud::Ces::V1beta::AudioProcessingConfig] + # Optional. Audio processing configuration of the app. + # @!attribute [rw] logging_settings + # @return [::Google::Cloud::Ces::V1beta::LoggingSettings] + # Optional. Logging settings of the app. + # @!attribute [rw] error_handling_settings + # @return [::Google::Cloud::Ces::V1beta::ErrorHandlingSettings] + # Optional. Error handling settings of the app. + # @!attribute [rw] model_settings + # @return [::Google::Cloud::Ces::V1beta::ModelSettings] + # Optional. The default LLM model settings for the app. + # Individual resources (e.g. agents, guardrails) can override these + # configurations as needed. + # @!attribute [rw] tool_execution_mode + # @return [::Google::Cloud::Ces::V1beta::App::ToolExecutionMode] + # Optional. The tool execution mode for the app. If not provided, will + # default to PARALLEL. + # @!attribute [rw] evaluation_metrics_thresholds + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds] + # Optional. The evaluation thresholds for the app. + # @!attribute [rw] variable_declarations + # @return [::Array<::Google::Cloud::Ces::V1beta::App::VariableDeclaration>] + # Optional. The declarations of the variables. + # @!attribute [r] predefined_variable_declarations + # @return [::Array<::Google::Cloud::Ces::V1beta::App::VariableDeclaration>] + # Output only. The declarations of predefined variables for the app. + # @!attribute [rw] global_instruction + # @return [::String] + # Optional. Instructions for all the agents in the app. + # You can use this instruction to set up a stable identity or personality + # across all the agents. + # @!attribute [rw] guardrails + # @return [::Array<::String>] + # Optional. List of guardrails for the app. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` + # @!attribute [rw] data_store_settings + # @return [::Google::Cloud::Ces::V1beta::DataStoreSettings] + # Optional. The data store settings for the app. + # @!attribute [rw] default_channel_profile + # @return [::Google::Cloud::Ces::V1beta::ChannelProfile] + # Optional. The default channel profile used by the app. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Metadata about the app. This field can be used to store + # additional information relevant to the app's details or intended usages. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the app was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the app was last updated. + # @!attribute [r] etag + # @return [::String] + # Output only. Etag used to ensure the object hasn't changed during a + # read-modify-write operation. If the etag is empty, the update will + # overwrite any concurrent changes. + # @!attribute [r] deployment_count + # @return [::Integer] + # Output only. Number of deployments in the app. + # @!attribute [rw] client_certificate_settings + # @return [::Google::Cloud::Ces::V1beta::ClientCertificateSettings] + # Optional. The default client certificate settings for the app. + # @!attribute [rw] vpc_sc_settings + # @return [::Google::Cloud::Ces::V1beta::VpcScSettings] + # Optional. VPC-SC settings for the app. + # @!attribute [rw] locked + # @return [::Boolean] + # Optional. Indicates whether the app is locked for changes. If the app is + # locked, modifications to the app resources will be rejected. + # @!attribute [rw] evaluation_personas + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationPersona>] + # Optional. The evaluation personas for the app. This field is used to define + # the personas that can be used for evaluation. Maximum of 30 personas can be + # defined. + # @!attribute [rw] evaluation_settings + # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings] + # Optional. The evaluation settings for the app. + # @!attribute [r] validation_errors + # @return [::Array<::String>] + # Output only. Misconfigurations or warnings in the app. + class App + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the structure and metadata for a variable. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the variable. The name must start with a letter or + # underscore and contain only letters, numbers, or underscores. + # @!attribute [rw] description + # @return [::String] + # Required. The description of the variable. + # @!attribute [rw] schema + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Required. The schema of the variable. + class VariableDeclaration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the tool execution behavior if there are **multiple** tools being + # selected by the agent **at the same time**. + module ToolExecutionMode + # Unspecified tool execution mode. Default to PARALLEL. + TOOL_EXECUTION_MODE_UNSPECIFIED = 0 + + # If there are multiple tools being selected, they will be executed in + # parallel, with the same + # [ToolContext](https://google.github.io/adk-docs/context/#the-different-types-of-context). + PARALLEL = 1 + + # If there are multiple tools being selected, they will be executed + # sequentially. The next tool will only be executed after the previous tool + # completes and it can see updated + # [ToolContext](https://google.github.io/adk-docs/context/#the-different-types-of-context) + # from the previous tool. + SEQUENTIAL = 2 + end + end + + # TimeZone settings of the app. + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The time zone of the app from the [time zone + # database](https://www.iana.org/time-zones), e.g., America/Los_Angeles, + # Europe/Paris. + class TimeZoneSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Language settings of the app. + # @!attribute [rw] default_language_code + # @return [::String] + # Optional. The default language code of the app. + # @!attribute [rw] supported_language_codes + # @return [::Array<::String>] + # Optional. List of languages codes supported by the app, in addition to the + # `default_language_code`. + # @!attribute [rw] enable_multilingual_support + # @return [::Boolean] + # Optional. Enables multilingual support. If true, agents in the app will use + # pre-built instructions to improve handling of multilingual input. + # @!attribute [rw] fallback_action + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. Deprecated: This feature is no longer supported. Use + # `enable_multilingual_support` instead to improve handling of multilingual + # input. + # The action to perform when an agent receives input in an unsupported + # language. + # + # This can be a predefined action or a custom tool call. + # Valid values are: + # - A tool's full resource name, which triggers a specific tool execution. + # - A predefined system action, such as "escalate" or "exit", which triggers + # an {::Google::Cloud::Ces::V1beta::EndSession EndSession} signal with + # corresponding {::Google::Cloud::Ces::V1beta::EndSession#metadata metadata} to + # terminate the conversation. + class LanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for how the input and output audio should be processed and + # delivered. + # @!attribute [rw] synthesize_speech_configs + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::SynthesizeSpeechConfig}] + # Optional. Configuration of how the agent response should be synthesized, + # mapping from the language code to + # {::Google::Cloud::Ces::V1beta::SynthesizeSpeechConfig SynthesizeSpeechConfig}. + # + # If the configuration for the specified language code is not found, the + # configuration for the root language code will be used. For example, if the + # map contains "en-us" and "en", and the specified language code is "en-gb", + # then "en" configuration will be used. + # + # Note: Language code is case-insensitive. + # @!attribute [rw] barge_in_config + # @return [::Google::Cloud::Ces::V1beta::BargeInConfig] + # Optional. Configures the agent behavior for the user barge-in activities. + # @!attribute [rw] inactivity_timeout + # @return [::Google::Protobuf::Duration] + # Optional. The duration of user inactivity (no speech or interaction) before + # the agent prompts the user for reengagement. If not set, the agent will not + # prompt the user for reengagement. + # @!attribute [rw] ambient_sound_config + # @return [::Google::Cloud::Ces::V1beta::AmbientSoundConfig] + # Optional. Configuration for the ambient sound to be played with the + # synthesized agent response, to enhance the naturalness of the conversation. + class AudioProcessingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Ces::V1beta::SynthesizeSpeechConfig] + class SynthesizeSpeechConfigsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for the ambient sound to be played with the synthesized agent + # response, to enhance the naturalness of the conversation. + # @!attribute [rw] prebuilt_ambient_noise + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::AmbientSoundConfig::PrebuiltAmbientNoise] + # Optional. Deprecated: `prebuilt_ambient_noise` is deprecated in favor of + # `prebuilt_ambient_sound`. + # + # Note: The following fields are mutually exclusive: `prebuilt_ambient_noise`, `gcs_uri`, `prebuilt_ambient_sound`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs_uri + # @return [::String] + # Optional. Ambient noise as a mono-channel, 16kHz WAV file stored in + # [Cloud Storage](https://cloud.google.com/storage). + # + # Note: Please make sure the CES service agent + # `service-@gcp-sa-ces.iam.gserviceaccount.com` has + # `storage.objects.get` permission to the Cloud Storage object. + # + # Note: The following fields are mutually exclusive: `gcs_uri`, `prebuilt_ambient_noise`, `prebuilt_ambient_sound`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] prebuilt_ambient_sound + # @return [::String] + # Optional. Name of the prebuilt ambient sound. + # Valid values are: + # - "coffee_shop" + # - "keyboard" + # - "keypad" + # - "hum" + # - "office_1" + # - "office_2" + # - "office_3" + # - "room_1" + # - "room_2" + # - "room_3" + # - "room_4" + # - "room_5" + # - "air_conditioner" + # + # Note: The following fields are mutually exclusive: `prebuilt_ambient_sound`, `prebuilt_ambient_noise`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] volume_gain_db + # @return [::Float] + # Optional. Volume gain (in dB) of the normal native volume supported by + # ambient noise, in the range [-96.0, 16.0]. If unset, or set to a value of + # 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) + # will play at approximately half the amplitude of the normal native signal + # amplitude. A value of +6.0 (dB) will play at approximately twice the + # amplitude of the normal native signal amplitude. We strongly recommend not + # to exceed +10 (dB) as there's usually no effective increase in loudness for + # any value greater than that. + class AmbientSoundConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Prebuilt ambient noise. + module PrebuiltAmbientNoise + # Not specified. + PREBUILT_AMBIENT_NOISE_UNSPECIFIED = 0 + + # Ambient noise of a retail store. + RETAIL_STORE = 1 + + # Ambient noise of a convention hall. + CONVENTION_HALL = 2 + + # Ambient noise of a street. + OUTDOOR = 3 + end + end + + # Configuration for how the user barge-in activities should be handled. + # @!attribute [rw] disable_barge_in + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Optional. Disables user barge-in while the agent is speaking. If true, user + # input during agent response playback will be ignored. + # + # Deprecated: `disable_barge_in` is deprecated in favor of + # {::Google::Cloud::Ces::V1beta::ChannelProfile#disable_barge_in_control `disable_barge_in_control`} + # in ChannelProfile. + # @!attribute [rw] barge_in_awareness + # @return [::Boolean] + # Optional. If enabled, the agent will adapt its next response based on the + # assumption that the user hasn't heard the full preceding agent message. + # This should not be used in scenarios where agent responses are displayed + # visually. + class BargeInConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for how the agent response should be synthesized. + # @!attribute [rw] voice + # @return [::String] + # Optional. The name of the voice. If not set, the service will choose a + # voice based on the other parameters such as language_code. + # + # For the list of available voices, please refer to [Supported voices and + # languages](https://cloud.google.com/text-to-speech/docs/voices) from Cloud + # Text-to-Speech. + # @!attribute [rw] speaking_rate + # @return [::Float] + # Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the + # normal native speed supported by the specific voice. 2.0 is twice as fast, + # and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will + # return an error. + class SynthesizeSpeechConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings to describe the conversation data collection behaviors for LLM + # analysis metrics pipeline. + # @!attribute [rw] llm_metrics_opted_out + # @return [::Boolean] + # Optional. Whether to collect conversation data for llm analysis metrics. If + # true, conversation data will not be collected for llm analysis metrics; + # otherwise, conversation data will be collected. + class MetricAnalysisSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings to describe the logging behaviors for the app. + # @!attribute [rw] redaction_config + # @return [::Google::Cloud::Ces::V1beta::RedactionConfig] + # Optional. Configuration for how sensitive data should be redacted. + # @!attribute [rw] audio_recording_config + # @return [::Google::Cloud::Ces::V1beta::AudioRecordingConfig] + # Optional. Configuration for how audio interactions should be recorded. The + # audio is subject to redaction as configured in + # {::Google::Cloud::Ces::V1beta::LoggingSettings#redaction_config RedactionConfig}. + # @!attribute [rw] unredacted_audio_recording_config + # @return [::Google::Cloud::Ces::V1beta::AudioRecordingConfig] + # Optional. Configures an additional recording of unredacted audio. This can + # be used to maintain a raw audio copy when audio redaction is + # {::Google::Cloud::Ces::V1beta::RedactionConfig#enable_redaction enabled}, + # typically for auditing or monitoring purposes. + # @!attribute [rw] bigquery_export_settings + # @return [::Google::Cloud::Ces::V1beta::BigQueryExportSettings] + # Optional. Configures the BigQuery export behaviors for the app. The + # conversation data is subject to redaction as configured in + # {::Google::Cloud::Ces::V1beta::LoggingSettings#redaction_config RedactionConfig}. + # @!attribute [rw] cloud_logging_settings + # @return [::Google::Cloud::Ces::V1beta::CloudLoggingSettings] + # Optional. Settings to describe the Cloud Logging behaviors for the app. + # @!attribute [rw] conversation_logging_settings + # @return [::Google::Cloud::Ces::V1beta::ConversationLoggingSettings] + # Optional. Settings to describe the conversation logging behaviors for the + # app. + # @!attribute [rw] evaluation_audio_recording_config + # @return [::Google::Cloud::Ces::V1beta::AudioRecordingConfig] + # Optional. Configuration for how audio interactions should be recorded for + # the evaluation. By default, audio recording is not enabled for evaluation + # sessions. + # @!attribute [rw] metric_analysis_settings + # @return [::Google::Cloud::Ces::V1beta::MetricAnalysisSettings] + # Optional. Settings to describe the conversation data collection behaviors + # for the LLM analysis pipeline for the app. + class LoggingSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings to describe how errors should be handled in the app. + # @!attribute [rw] error_handling_strategy + # @return [::Google::Cloud::Ces::V1beta::ErrorHandlingSettings::ErrorHandlingStrategy] + # Optional. The strategy to use for error handling. + # @!attribute [rw] fallback_response_config + # @return [::Google::Cloud::Ces::V1beta::ErrorHandlingSettings::FallbackResponseConfig] + # Optional. Configuration for handling fallback responses. + # @!attribute [rw] end_session_config + # @return [::Google::Cloud::Ces::V1beta::ErrorHandlingSettings::EndSessionConfig] + # Optional. Configuration for ending the session in case of system errors + # (e.g. LLM errors). + class ErrorHandlingSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for handling fallback responses. + # @!attribute [rw] custom_fallback_messages + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The fallback messages in case of system errors (e.g. LLM + # errors), mapped by [supported language + # code](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/reference/language). + # @!attribute [rw] max_fallback_attempts + # @return [::Integer] + # Optional. The maximum number of fallback attempts to make before the + # agent emitting {::Google::Cloud::Ces::V1beta::EndSession EndSession} Signal. + class FallbackResponseConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class CustomFallbackMessagesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for ending the session in case of system errors (e.g. LLM + # errors). + # @!attribute [rw] escalate_session + # @return [::Boolean] + # Optional. Whether to escalate the session in + # {::Google::Cloud::Ces::V1beta::EndSession EndSession}. If session is + # escalated, [metadata in + # EndSession][google.cloud.ces.v1beta.EndSession.metadata] will contain + # `session_escalated = true`. See + # https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/deploy/google-telephony-platform#transfer_a_call_to_a_human_agent + # for details. + class EndSessionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the strategy for handling errors. + module ErrorHandlingStrategy + # Unspecified error handling strategy. + ERROR_HANDLING_STRATEGY_UNSPECIFIED = 0 + + # No specific handling is enabled. + NONE = 1 + + # A fallback message will be returned to the user in case of + # system errors (e.g. LLM errors). + FALLBACK_RESPONSE = 2 + + # An {::Google::Cloud::Ces::V1beta::EndSession EndSession} signal will be + # emitted in case of system errors (e.g. LLM errors). + END_SESSION = 3 + end + end + + # Threshold settings for metrics in an Evaluation. + # @!attribute [rw] golden_evaluation_metrics_thresholds + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds] + # Optional. The golden evaluation metrics thresholds. + # @!attribute [rw] hallucination_metric_behavior + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::HallucinationMetricBehavior] + # Optional. Deprecated: Use `golden_hallucination_metric_behavior` instead. + # The hallucination metric behavior is currently used for golden evaluations. + # @!attribute [rw] golden_hallucination_metric_behavior + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::HallucinationMetricBehavior] + # Optional. The hallucination metric behavior for golden evaluations. + # @!attribute [rw] scenario_hallucination_metric_behavior + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::HallucinationMetricBehavior] + # Optional. The hallucination metric behavior for scenario evaluations. + class EvaluationMetricsThresholds + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for golden evaluations. + # @!attribute [rw] turn_level_metrics_thresholds + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds] + # Optional. The turn level metrics thresholds. + # @!attribute [rw] expectation_level_metrics_thresholds + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds] + # Optional. The expectation level metrics thresholds. + # @!attribute [rw] tool_matching_settings + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::ToolMatchingSettings] + # Optional. The tool matching settings. An + # extra tool call is a tool call that is present in the execution but does + # not match any tool call in the golden expectation. + class GoldenEvaluationMetricsThresholds + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Turn level metrics thresholds. + # @!attribute [rw] semantic_similarity_success_threshold + # @return [::Integer] + # Optional. The success threshold for semantic similarity. Must be an + # integer between 0 and 4. Default is >= 3. + # @!attribute [rw] overall_tool_invocation_correctness_threshold + # @return [::Float] + # Optional. The success threshold for overall tool invocation + # correctness. Must be a float between 0 and 1. Default is 1.0. + # @!attribute [rw] semantic_similarity_channel + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds::SemanticSimilarityChannel] + # Optional. The semantic similarity channel to use for evaluation. + class TurnLevelMetricsThresholds + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Semantic similarity channel to use. + module SemanticSimilarityChannel + # Metric unspecified. Defaults to TEXT. + SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED = 0 + + # Use text semantic similarity. + TEXT = 1 + + # Use audio semantic similarity. + AUDIO = 2 + end + end + + # Expectation level metrics thresholds. + # @!attribute [rw] tool_invocation_parameter_correctness_threshold + # @return [::Float] + # Optional. The success threshold for individual tool invocation + # parameter correctness. Must be a float between 0 and 1. Default is 1.0. + class ExpectationLevelMetricsThresholds + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for matching tool calls. + # @!attribute [rw] extra_tool_call_behavior + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::ToolMatchingSettings::ExtraToolCallBehavior] + # Optional. Behavior for extra tool calls. + # Defaults to FAIL. + class ToolMatchingSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the behavior when an extra tool call is encountered. An extra + # tool call is a tool call that is present in the execution but does not + # match any tool call in the golden expectation. + module ExtraToolCallBehavior + # Unspecified behavior. Defaults to FAIL. + EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0 + + # Fail the evaluation if an extra tool call is encountered. + FAIL = 1 + + # Allow the extra tool call. + ALLOW = 2 + end + end + + # The hallucination metric behavior. Regardless of the behavior, the metric + # will always be calculated. The difference is that when disabled, the + # metric is not used to calculate the overall evaluation score. + module HallucinationMetricBehavior + # Unspecified hallucination metric behavior. + HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED = 0 + + # Disable hallucination metric. + DISABLED = 1 + + # Enable hallucination metric. + ENABLED = 2 + end + end + + # Settings for evaluation. + # @!attribute [rw] scenario_conversation_initiator + # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings::ScenarioConversationInitiator] + # Optional. Who starts the conversation in a scenario evaluation. + # @!attribute [rw] golden_run_method + # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod] + # Optional. The default method used to run golden evaluations. This will be + # used if no golden_run_method is specified in the RunEvaluationRequest. + # @!attribute [rw] golden_evaluation_tool_call_behaviour + # @return [::Google::Cloud::Ces::V1beta::EvaluationToolCallBehaviour] + # Optional. Configures the default tool call behaviour for golden + # evaluations. + # @!attribute [rw] scenario_evaluation_tool_call_behaviour + # @return [::Google::Cloud::Ces::V1beta::EvaluationToolCallBehaviour] + # Optional. Configures the default tool call behaviour for scenario + # evaluations. + # @!attribute [rw] metrics_config + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig] + # Optional. Configures the default metrics for evaluations. + # @!attribute [rw] scenario_execution_mode + # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings::ScenarioExecutionMode] + # Optional. The execution mode for scenario evaluations. If not provided, + # will default to QUALITY_OPTIMIZED. + class EvaluationSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Determines who starts the conversation in a scenario evaluation session. + module ScenarioConversationInitiator + # Unspecified. Defaults to USER. + SCENARIO_CONVERSATION_INITIATOR_UNSPECIFIED = 0 + + # The user starts the conversation. + USER = 1 + + # The agent starts the conversation. + AGENT = 2 + end + + # The execution mode for scenario evaluations. + module ScenarioExecutionMode + # Unspecified execution mode. Defaults to QUALITY_OPTIMIZED. + SCENARIO_EXECUTION_MODE_UNSPECIFIED = 0 + + # Quality optimized mode. + QUALITY_OPTIMIZED = 1 + + # Speed optimized mode. + SPEED_OPTIMIZED = 2 + end + end + + # Settings for custom client certificates. + # @!attribute [rw] tls_certificate + # @return [::String] + # Required. The TLS certificate encoded in PEM format. This string must + # include the begin header and end footer lines. + # @!attribute [rw] private_key + # @return [::String] + # Required. The name of the SecretManager secret version resource storing the + # private key encoded in PEM format. + # Format: `projects/{project}/secrets/{secret}/versions/{version}` + # @!attribute [rw] passphrase + # @return [::String] + # Optional. The name of the SecretManager secret version resource storing the + # passphrase to decrypt the private key. Should be left unset if the private + # key is not encrypted. + # Format: `projects/{project}/secrets/{secret}/versions/{version}` + class ClientCertificateSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # VPC-SC settings for the app. + # @!attribute [rw] allowed_origins + # @return [::Array<::String>] + # Optional. The allowed HTTP(s) origins that OpenAPI tools in the App are + # able to directly call when VPC Service Controls are enabled. These strings + # must match the origin exactly, including the port if specified. For + # example, "https://example.com" or "https://example.com:443". This list does + # not yet apply to Python tools that may make direct HTTP calls. + class VpcScSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings to describe the conversation logging behaviors for the app. + # @!attribute [rw] disable_conversation_logging + # @return [::Boolean] + # Optional. Whether to disable conversation logging for the sessions. + # @!attribute [rw] retention_window + # @return [::Google::Protobuf::Duration] + # Optional. Controls the retention window for the conversation. + # If not set, the conversation will be retained for 365 days. + class ConversationLoggingSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings to describe the Cloud Logging behaviors for the app. + # @!attribute [rw] enable_cloud_logging + # @return [::Boolean] + # Optional. Whether to enable Cloud Logging for the sessions. + class CloudLoggingSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for how the audio interactions should be recorded. + # @!attribute [rw] gcs_bucket + # @return [::String] + # Optional. The [Cloud Storage](https://cloud.google.com/storage) bucket to + # store the session audio recordings. The URI must start with "gs://". + # + # Please choose a bucket location that meets your data residency + # requirements. + # + # Note: If the Cloud Storage bucket is in a different project from the app, + # you should grant `storage.objects.create` permission to the CES service + # agent `service-@gcp-sa-ces.iam.gserviceaccount.com`. + # @!attribute [rw] gcs_path_prefix + # @return [::String] + # Optional. The Cloud Storage path prefix for audio recordings. + # + # This prefix can include the following placeholders, which will be + # dynamically substituted at serving time: + # - $project: project ID + # - $location: app location + # - $app: app ID + # - $date: session date in YYYY-MM-DD format + # - $session: session ID + # + # If the path prefix is not specified, the default prefix + # `$project/$location/$app/$date/$session/` will be used. + class AudioRecordingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration to instruct how sensitive data should be handled. + # @!attribute [rw] enable_redaction + # @return [::Boolean] + # Optional. If true, redaction will be applied in various logging scenarios, + # including conversation history, Cloud Logging and audio recording. + # @!attribute [rw] inspect_template + # @return [::String] + # Optional. [DLP](https://cloud.google.com/dlp/docs) inspect template name to + # configure detection of sensitive data types. + # + # Format: + # `projects/{project}/locations/{location}/inspectTemplates/{inspect_template}` + # @!attribute [rw] deidentify_template + # @return [::String] + # Optional. [DLP](https://cloud.google.com/dlp/docs) deidentify template name + # to instruct on how to de-identify content. + # + # Format: + # `projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}` + class RedactionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data store related settings for the app. + # @!attribute [r] engines + # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreSettings::Engine>] + # Output only. The engines for the app. + class DataStoreSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An engine to which the data stores are connected. + # See Vertex AI Search: + # https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the engine. + # Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + # @!attribute [r] type + # @return [::Google::Cloud::Ces::V1beta::DataStoreSettings::Engine::Type] + # Output only. The type of the engine. + class Engine + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the engine. + # See the documentation available at + # https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/SolutionType + # and + # https://cloud.google.com/generative-ai-app-builder/docs/create-datastore-ingest. + module Type + # Unspecified engine type. + TYPE_UNSPECIFIED = 0 + + # The SOLUTION_TYPE_SEARCH engine for the app. All connector data stores + # added to the app will be added to this engine. + ENGINE_TYPE_SEARCH = 1 + + # Chat engine type. + # The SOLUTION_TYPE_CHAT engine for the app. All connector data stores + # added to the app will be added to this engine. + ENGINE_TYPE_CHAT = 2 + end + end + end + + # A persona represents an end user in an evaluation. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier of the persona. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationPersonas/{evaluationPersona}` + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the persona. + # @!attribute [rw] display_name + # @return [::String] + # Required. The display name of the persona. Unique within an app. + # @!attribute [rw] personality + # @return [::String] + # Required. An instruction for the agent on how to behave in the evaluation. + # @!attribute [rw] speech_config + # @return [::Google::Cloud::Ces::V1beta::EvaluationPersona::SpeechConfig] + # Optional. Configuration for how the persona sounds (TTS settings). + class EvaluationPersona + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for Text-to-Speech generation. + # @!attribute [rw] speaking_rate + # @return [::Float] + # Optional. The speaking rate. 1.0 is normal. + # Lower is slower (e.g., 0.8), higher is faster (e.g., 1.5). + # Useful for testing how the agent handles fast talkers. + # @!attribute [rw] environment + # @return [::Google::Cloud::Ces::V1beta::EvaluationPersona::SpeechConfig::BackgroundEnvironment] + # Optional. The simulated audio environment. + # @!attribute [rw] voice_id + # @return [::String] + # Optional. The specific voice identifier/accent to use. + # Example: "en-US-Wavenet-D" or "en-GB-Standard-A" + class SpeechConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Simulated audio environment. + module BackgroundEnvironment + # Background environment unspecified. + BACKGROUND_ENVIRONMENT_UNSPECIFIED = 0 + + # Call center environment. + CALL_CENTER = 3 + + # Traffic noise environment. + TRAFFIC = 4 + + # Kids noise environment. + KIDS_NOISE = 5 + + # Cafe environment. + CAFE = 6 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app_version.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app_version.rb new file mode 100644 index 000000000000..c6fbb529f348 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app_version.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # A snapshot of the app. + # @!attribute [rw] app + # @return [::Google::Cloud::Ces::V1beta::App] + # Optional. The basic settings for the app. + # @!attribute [rw] agents + # @return [::Array<::Google::Cloud::Ces::V1beta::Agent>] + # Optional. List of agents in the app. + # @!attribute [rw] tools + # @return [::Array<::Google::Cloud::Ces::V1beta::Tool>] + # Optional. List of tools in the app. + # @!attribute [rw] examples + # @return [::Array<::Google::Cloud::Ces::V1beta::Example>] + # Optional. List of examples in the app. + # @!attribute [rw] guardrails + # @return [::Array<::Google::Cloud::Ces::V1beta::Guardrail>] + # Optional. List of guardrails in the app. + # @!attribute [rw] toolsets + # @return [::Array<::Google::Cloud::Ces::V1beta::Toolset>] + # Optional. List of toolsets in the app. + class AppSnapshot + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # In Customer Engagement Suite (CES), an app version is a snapshot of the app + # at a specific point in time. It is immutable and cannot be modified once + # created. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the app version. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the app version. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the app version. + # @!attribute [r] creator + # @return [::String] + # Output only. Email of the user who created the app version. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the app version was created. + # @!attribute [r] snapshot + # @return [::Google::Cloud::Ces::V1beta::AppSnapshot] + # Output only. The snapshot of the app when the version is created. + # @!attribute [r] etag + # @return [::String] + # Output only. Etag used to ensure the object hasn't changed during a + # read-modify-write operation. If the etag is empty, the update will + # overwrite any concurrent changes. + class AppVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/auth.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/auth.rb new file mode 100644 index 000000000000..e6e9aa18a1f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/auth.rb @@ -0,0 +1,214 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Configurations for authentication with API key. + # @!attribute [rw] key_name + # @return [::String] + # Required. The parameter name or the header name of the API key. + # E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name. + # @!attribute [rw] api_key_secret_version + # @return [::String] + # Required. The name of the SecretManager secret version resource storing the + # API key. Format: `projects/{project}/secrets/{secret}/versions/{version}` + # + # Note: You should grant `roles/secretmanager.secretAccessor` role to the CES + # service agent + # `service-@gcp-sa-ces.iam.gserviceaccount.com`. + # @!attribute [rw] request_location + # @return [::Google::Cloud::Ces::V1beta::ApiKeyConfig::RequestLocation] + # Required. Key location in the request. + class ApiKeyConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The location of the API key in the request. + module RequestLocation + # Unspecified. This value should not be used. + REQUEST_LOCATION_UNSPECIFIED = 0 + + # Represents the key in http header. + HEADER = 1 + + # Represents the key in query string. + QUERY_STRING = 2 + end + end + + # Configurations for authentication with OAuth. + # @!attribute [rw] oauth_grant_type + # @return [::Google::Cloud::Ces::V1beta::OAuthConfig::OauthGrantType] + # Required. OAuth grant types. + # @!attribute [rw] client_id + # @return [::String] + # Required. The client ID from the OAuth provider. + # @!attribute [rw] client_secret_version + # @return [::String] + # Required. The name of the SecretManager secret version resource storing the + # client secret. + # Format: `projects/{project}/secrets/{secret}/versions/{version}` + # + # Note: You should grant `roles/secretmanager.secretAccessor` role to the CES + # service agent + # `service-@gcp-sa-ces.iam.gserviceaccount.com`. + # @!attribute [rw] token_endpoint + # @return [::String] + # Required. The token endpoint in the OAuth provider to exchange for an + # access token. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Optional. The OAuth scopes to grant. + class OAuthConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # OAuth grant types. Only [client credential + # grant](https://oauth.net/2/grant-types/client-credentials) is supported. + module OauthGrantType + # Unspecified. Defaults to CLIENT_CREDENTIAL. + OAUTH_GRANT_TYPE_UNSPECIFIED = 0 + + # Represents the [client credential + # flow](https://oauth.net/2/grant-types/client-credentials). + CLIENT_CREDENTIAL = 1 + end + end + + # Configurations for authentication with [ID + # token](https://cloud.google.com/docs/authentication/token-types#id) generated + # from service agent. + class ServiceAgentIdTokenAuthConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configurations for authentication using a custom service account. + # @!attribute [rw] service_account + # @return [::String] + # Required. The email address of the service account used for authentication. + # CES uses this service account to exchange an access token and the access + # token is then sent in the `Authorization` header of the request. + # + # The service account must have the + # `roles/iam.serviceAccountTokenCreator` role granted to the + # CES service agent + # `service-@gcp-sa-ces.iam.gserviceaccount.com`. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Optional. The OAuth scopes to grant. If not specified, the default scope + # `https://www.googleapis.com/auth/cloud-platform` is used. + class ServiceAccountAuthConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configurations for authentication with a bearer token. + # @!attribute [rw] token + # @return [::String] + # Required. The bearer token. + # Must be in the format `$context.variables.`. + class BearerTokenConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # End-user authentication configuration used for Connection calls. + # The field values must be the names of context variables in the format + # `$context.variables.`. + # @!attribute [rw] oauth2_auth_code_config + # @return [::Google::Cloud::Ces::V1beta::EndUserAuthConfig::Oauth2AuthCodeConfig] + # Oauth 2.0 Authorization Code authentication. + # + # Note: The following fields are mutually exclusive: `oauth2_auth_code_config`, `oauth2_jwt_bearer_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oauth2_jwt_bearer_config + # @return [::Google::Cloud::Ces::V1beta::EndUserAuthConfig::Oauth2JwtBearerConfig] + # JWT Profile Oauth 2.0 Authorization Grant authentication. + # + # Note: The following fields are mutually exclusive: `oauth2_jwt_bearer_config`, `oauth2_auth_code_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class EndUserAuthConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Oauth 2.0 Authorization Code authentication configuration. + # @!attribute [rw] oauth_token + # @return [::String] + # Required. Oauth token parameter name to pass through. + # Must be in the format `$context.variables.`. + class Oauth2AuthCodeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # JWT Profile Oauth 2.0 Authorization Grant authentication configuration. + # @!attribute [rw] issuer + # @return [::String] + # Required. Issuer parameter name to pass through. + # Must be in the format `$context.variables.`. + # @!attribute [rw] subject + # @return [::String] + # Required. Subject parameter name to pass through. + # Must be in the format `$context.variables.`. + # @!attribute [rw] client_key + # @return [::String] + # Required. Client parameter name to pass through. + # Must be in the format `$context.variables.`. + class Oauth2JwtBearerConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Authentication information required for API calls. + # @!attribute [rw] api_key_config + # @return [::Google::Cloud::Ces::V1beta::ApiKeyConfig] + # Optional. Config for API key auth. + # + # Note: The following fields are mutually exclusive: `api_key_config`, `oauth_config`, `service_agent_id_token_auth_config`, `service_account_auth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oauth_config + # @return [::Google::Cloud::Ces::V1beta::OAuthConfig] + # Optional. Config for OAuth. + # + # Note: The following fields are mutually exclusive: `oauth_config`, `api_key_config`, `service_agent_id_token_auth_config`, `service_account_auth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] service_agent_id_token_auth_config + # @return [::Google::Cloud::Ces::V1beta::ServiceAgentIdTokenAuthConfig] + # Optional. Config for ID token auth generated from CES service agent. + # + # Note: The following fields are mutually exclusive: `service_agent_id_token_auth_config`, `api_key_config`, `oauth_config`, `service_account_auth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] service_account_auth_config + # @return [::Google::Cloud::Ces::V1beta::ServiceAccountAuthConfig] + # Optional. Config for service account authentication. + # + # Note: The following fields are mutually exclusive: `service_account_auth_config`, `api_key_config`, `oauth_config`, `service_agent_id_token_auth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bearer_token_config + # @return [::Google::Cloud::Ces::V1beta::BearerTokenConfig] + # Optional. Config for bearer token auth. + # + # Note: The following fields are mutually exclusive: `bearer_token_config`, `api_key_config`, `oauth_config`, `service_agent_id_token_auth_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ApiAuthentication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/bigquery_export.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/bigquery_export.rb new file mode 100644 index 000000000000..963127e02c2e --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/bigquery_export.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # Settings to describe the BigQuery export behaviors for the app. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Indicates whether the BigQuery export is enabled. + # @!attribute [rw] project + # @return [::String] + # Optional. The **project ID** of the BigQuery dataset to export the data to. + # + # Note: If the BigQuery dataset is in a different project from the app, + # you should grant `roles/bigquery.admin` role to the CES service agent + # `service-@gcp-sa-ces.iam.gserviceaccount.com`. + # @!attribute [rw] dataset + # @return [::String] + # Optional. The BigQuery **dataset ID** to export the data to. + class BigQueryExportSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/changelog.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/changelog.rb new file mode 100644 index 000000000000..7ab2d68398d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/changelog.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # Changelogs represent a change made to the app or to an resource within the + # app. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the changelog. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/changelogs/{changelog}` + # @!attribute [r] author + # @return [::String] + # Output only. Email address of the change author. + # @!attribute [r] display_name + # @return [::String] + # Output only. Display name of the change. It typically should be the display + # name of the resource that was changed. + # @!attribute [r] description + # @return [::String] + # Output only. Description of the change. which typically captures the + # changed fields in the resource. + # @!attribute [r] resource + # @return [::String] + # Output only. The resource that was changed. + # @!attribute [r] resource_type + # @return [::String] + # Output only. The type of the resource that was changed. + # @!attribute [r] action + # @return [::String] + # Output only. The action that was performed on the resource. + # @!attribute [r] original_resource + # @return [::Google::Protobuf::Struct] + # Output only. The original resource before the change. + # @!attribute [r] new_resource + # @return [::Google::Protobuf::Struct] + # Output only. The new resource after the change. + # @!attribute [r] dependent_resources + # @return [::Array<::Google::Protobuf::Struct>] + # Output only. The dependent resources that were changed. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the change was made. + # @!attribute [r] sequence_number + # @return [::Integer] + # Output only. The monotonically increasing sequence number of the changelog. + class Changelog + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/client_function.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/client_function.rb new file mode 100644 index 000000000000..e4cd595046fc --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/client_function.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # Represents a client-side function that the agent can invoke. When the + # tool is chosen by the agent, control is handed off to the client. + # The client is responsible for executing the function and returning the result + # as a {::Google::Cloud::Ces::V1beta::ToolResponse ToolResponse} to continue the + # interaction with the agent. + # @!attribute [rw] name + # @return [::String] + # Required. The function name. + # @!attribute [rw] description + # @return [::String] + # Optional. The function description. + # @!attribute [rw] parameters + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Optional. The schema of the function parameters. + # @!attribute [rw] response + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Optional. The schema of the function response. + class ClientFunction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/common.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/common.rb new file mode 100644 index 000000000000..53b67e1bd173 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/common.rb @@ -0,0 +1,375 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # A callback defines the custom logic to be executed at various stages of + # agent interaction. + # @!attribute [rw] python_code + # @return [::String] + # Required. The python code to execute for the callback. + # @!attribute [rw] description + # @return [::String] + # Optional. Human-readable description of the callback. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Whether the callback is disabled. Disabled callbacks are ignored + # by the agent. + # @!attribute [rw] proactive_execution_enabled + # @return [::Boolean] + # Optional. If enabled, the callback will also be executed on intermediate + # model outputs. This setting only affects after model callback. + # **ENABLE WITH CAUTION**. Typically after model callback only needs to be + # executed after receiving all model responses. Enabling proactive execution + # may have negative implication on the execution cost and latency, and + # should only be enabled in rare situations. + class Callback + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model settings contains various configurations for the LLM model. + # @!attribute [rw] model + # @return [::String] + # Optional. The LLM model that the agent should use. + # If not set, the agent will inherit the model from its parent agent. + # @!attribute [rw] temperature + # @return [::Float] + # Optional. If set, this temperature will be used for the LLM model. + # Temperature controls the randomness of the model's responses. Lower + # temperatures produce responses that are more predictable. Higher + # temperatures produce responses that are more creative. + class ModelSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action that is taken when a certain precondition is met. + # @!attribute [rw] respond_immediately + # @return [::Google::Cloud::Ces::V1beta::TriggerAction::RespondImmediately] + # Optional. Immediately respond with a preconfigured response. + # + # Note: The following fields are mutually exclusive: `respond_immediately`, `transfer_agent`, `generative_answer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] transfer_agent + # @return [::Google::Cloud::Ces::V1beta::TriggerAction::TransferAgent] + # Optional. Transfer the conversation to a different agent. + # + # Note: The following fields are mutually exclusive: `transfer_agent`, `respond_immediately`, `generative_answer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] generative_answer + # @return [::Google::Cloud::Ces::V1beta::TriggerAction::GenerativeAnswer] + # Optional. Respond with a generative answer. + # + # Note: The following fields are mutually exclusive: `generative_answer`, `respond_immediately`, `transfer_agent`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TriggerAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a response from the agent. + # @!attribute [rw] text + # @return [::String] + # Required. Text for the agent to respond with. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Whether the response is disabled. Disabled responses are not + # used by the agent. + class Response + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The agent will immediately respond with a preconfigured response. + # @!attribute [rw] responses + # @return [::Array<::Google::Cloud::Ces::V1beta::TriggerAction::Response>] + # Required. The canned responses for the agent to choose from. The response + # is chosen randomly. + class RespondImmediately + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The agent will immediately respond with a generative answer. + # @!attribute [rw] prompt + # @return [::String] + # Required. The prompt to use for the generative answer. + class GenerativeAnswer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The agent will transfer the conversation to a different agent. + # @!attribute [rw] agent + # @return [::String] + # Required. The name of the agent to transfer the conversation to. The + # agent must be in the same app as the current agent. Format: + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + class TransferAgent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The TLS configuration. + # @!attribute [rw] ca_certs + # @return [::Array<::Google::Cloud::Ces::V1beta::TlsConfig::CaCert>] + # Required. Specifies a list of allowed custom CA certificates for HTTPS + # verification. + class TlsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The CA certificate. + # @!attribute [rw] display_name + # @return [::String] + # Required. The name of the allowed custom CA certificates. This + # can be used to disambiguate the custom CA certificates. + # @!attribute [rw] cert + # @return [::String] + # Required. The allowed custom CA certificates (in DER format) for + # HTTPS verification. This overrides the default SSL trust store. If this + # is empty or unspecified, CES will use Google's default trust + # store to verify certificates. N.B. Make sure the HTTPS server + # certificates are signed with "subject alt name". For instance a + # certificate can be self-signed using the following command: + # + # ``` + # openssl x509 -req -days 200 -in example.com.csr \ + # -signkey example.com.key \ + # -out example.com.crt \ + # -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + # ``` + class CaCert + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for tools using Service Directory. + # @!attribute [rw] service + # @return [::String] + # Required. The name of [Service + # Directory](https://cloud.google.com/service-directory) service. + # Format: + # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}`. + # Location of the service directory must be the same as the location of the + # app. + class ServiceDirectoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A ChannelProfile configures the agent's behavior for a specific communication + # channel, such as web UI or telephony. + # @!attribute [rw] profile_id + # @return [::String] + # Optional. The unique identifier of the channel profile. + # @!attribute [rw] channel_type + # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::ChannelType] + # Optional. The type of the channel profile. + # @!attribute [rw] persona_property + # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::PersonaProperty] + # Optional. The persona property of the channel profile. + # @!attribute [rw] disable_dtmf + # @return [::Boolean] + # Optional. Whether to disable DTMF (dual-tone multi-frequency). + # @!attribute [rw] disable_barge_in_control + # @return [::Boolean] + # Optional. Whether to disable user barge-in control in the conversation. + # - **true**: User interruptions are disabled while the agent is speaking. + # - **false**: The agent retains automatic control over when the user can + # interrupt. + # @!attribute [rw] web_widget_config + # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::WebWidgetConfig] + # Optional. The configuration for the web widget. + # @!attribute [rw] noise_suppression_level + # @return [::String] + # Optional. The noise suppression level of the channel profile. + # Available values are "low", "moderate", "high", "very_high". + class ChannelProfile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the persona property of a channel. + # @!attribute [rw] persona + # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::PersonaProperty::Persona] + # Optional. The persona of the channel. + class PersonaProperty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The persona of the channel. + module Persona + # UNKNOWN persona. + UNKNOWN = 0 + + # The agent keeps the responses concise and to the point + CONCISE = 1 + + # The agent provides additional context, explanations, and details + CHATTY = 2 + end + end + + # Message for configuration for the web widget. + # @!attribute [rw] modality + # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::WebWidgetConfig::Modality] + # Optional. The modality of the web widget. + # @!attribute [rw] theme + # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::WebWidgetConfig::Theme] + # Optional. The theme of the web widget. + # @!attribute [rw] web_widget_title + # @return [::String] + # Optional. The title of the web widget. + # @!attribute [rw] security_settings + # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::WebWidgetConfig::SecuritySettings] + # Optional. The security settings of the web widget. + class WebWidgetConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Security settings for the web widget. + # @!attribute [rw] enable_public_access + # @return [::Boolean] + # Optional. Indicates whether public access to the web widget is enabled. + # If `true`, the web widget will be publicly accessible. + # If `false`, the web widget must be integrated with your own + # authentication and authorization system to return valid credentials for + # accessing the CES agent. + # @!attribute [rw] enable_origin_check + # @return [::Boolean] + # Optional. Indicates whether origin check for the web widget is enabled. + # If `true`, the web widget will check the origin of the website that + # loads the web widget and only allow it to be loaded in the same origin + # or any of the allowed origins. + # @!attribute [rw] allowed_origins + # @return [::Array<::String>] + # Optional. The origins that are allowed to host the web widget. An + # origin is defined by RFC 6454. If empty, all origins are allowed. A + # maximum of 100 origins is allowed. Example: "https://example.com" + # @!attribute [rw] enable_recaptcha + # @return [::Boolean] + # Optional. Indicates whether reCAPTCHA verification for the web widget + # is enabled. + class SecuritySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Modality of the web widget. + module Modality + # Unknown modality. + MODALITY_UNSPECIFIED = 0 + + # Widget supports both chat and voice input. + CHAT_AND_VOICE = 1 + + # Widget supports only voice input. + VOICE_ONLY = 2 + + # Widget supports only chat input. + CHAT_ONLY = 3 + + # Widget supports chat, voice, and video input. + CHAT_VOICE_AND_VIDEO = 4 + end + + # Theme of the web widget. + module Theme + # Unknown theme. + THEME_UNSPECIFIED = 0 + + # Light theme. + LIGHT = 1 + + # Dark theme. + DARK = 2 + end + end + + # The type of the channel profile. + module ChannelType + # Unknown channel type. + UNKNOWN = 0 + + # Web UI channel. + WEB_UI = 2 + + # API channel. + API = 3 + + # Twilio channel. + TWILIO = 4 + + # Google Telephony Platform channel. + GOOGLE_TELEPHONY_PLATFORM = 5 + + # Contact Center as a Service (CCaaS) channel. + CONTACT_CENTER_AS_A_SERVICE = 6 + + # Five9 channel. + FIVE9 = 7 + + # Third party contact center integration channel. + CONTACT_CENTER_INTEGRATION = 8 + end + end + + # A span is a unit of work or a single operation during the request processing. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the span. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The start time of the span. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The end time of the span. + # @!attribute [r] duration + # @return [::Google::Protobuf::Duration] + # Output only. The duration of the span. + # @!attribute [r] attributes + # @return [::Google::Protobuf::Struct] + # Output only. Key-value attributes associated with the span. + # @!attribute [r] child_spans + # @return [::Array<::Google::Cloud::Ces::V1beta::Span>] + # Output only. The child spans that are nested under this span. + class Span + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The execution type of the tool or toolset. + module ExecutionType + # The execution type is unspecified. Defaults to `SYNCHRONOUS` if + # unspecified. + EXECUTION_TYPE_UNSPECIFIED = 0 + + # The tool is executed synchronously. The session is blocked + # until the tool returns. + SYNCHRONOUS = 1 + + # The tool is executed asynchronously. The session will + # continue while the tool is executing. + ASYNCHRONOUS = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_tool.rb new file mode 100644 index 000000000000..43fb8867437e --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_tool.rb @@ -0,0 +1,122 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Configuration of an Action for the tool to use. + # Note: This can be either an Action or an Operation. See + # https://cloud.google.com/integration-connectors/docs/entities-operation-action + # for details. + # @!attribute [rw] connection_action_id + # @return [::String] + # ID of a Connection action for the tool to use. + # + # Note: The following fields are mutually exclusive: `connection_action_id`, `entity_operation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] entity_operation + # @return [::Google::Cloud::Ces::V1beta::Action::EntityOperation] + # Entity operation configuration for the tool to use. + # + # Note: The following fields are mutually exclusive: `entity_operation`, `connection_action_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input_fields + # @return [::Array<::String>] + # Optional. Entity fields to use as inputs for the operation. + # If no fields are specified, all fields of the Entity will be used. + # @!attribute [rw] output_fields + # @return [::Array<::String>] + # Optional. Entity fields to return from the operation. + # If no fields are specified, all fields of the Entity will be returned. + class Action + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entity CRUD operation specification. + # @!attribute [rw] entity_id + # @return [::String] + # Required. ID of the entity. + # @!attribute [rw] operation + # @return [::Google::Cloud::Ces::V1beta::Action::EntityOperation::OperationType] + # Required. Operation to perform on the entity. + class EntityOperation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The operation to perform on the entity. + module OperationType + # Operation type unspecified. Invalid, ConnectorTool create/update + # will fail. + OPERATION_TYPE_UNSPECIFIED = 0 + + # List operation. + LIST = 1 + + # Get operation. + GET = 2 + + # Create operation. + CREATE = 3 + + # Update operation. + UPDATE = 4 + + # Delete operation. + DELETE = 5 + end + end + end + + # A ConnectorTool allows connections to different integrations. + # See: https://cloud.google.com/integration-connectors/docs/overview. + # @!attribute [rw] connection + # @return [::String] + # Required. The full resource name of the referenced Integration Connectors + # Connection. + # Format: + # `projects/{project}/locations/{location}/connections/{connection}` + # @!attribute [rw] action + # @return [::Google::Cloud::Ces::V1beta::Action] + # Required. Action for the tool to use. + # @!attribute [rw] auth_config + # @return [::Google::Cloud::Ces::V1beta::EndUserAuthConfig] + # Optional. Configures how authentication is handled in Integration + # Connectors. By default, an admin authentication is passed in the + # Integration Connectors API requests. You can override it with a different + # end-user authentication config. + # **Note**: The Connection must have authentication override enabled in + # order to specify an EUC configuration here - otherwise, the ConnectorTool + # creation will fail. See + # https://cloud.google.com/application-integration/docs/configure-connectors-task#configure-authentication-override + # for details. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of the tool that can be used by the Agent to decide + # whether to call this ConnectorTool. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the tool that can be used by the Agent to + # decide whether to call this ConnectorTool. + class ConnectorTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_toolset.rb new file mode 100644 index 000000000000..96cbe663c2e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_toolset.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # A toolset that generates tools from an Integration Connectors Connection. + # @!attribute [rw] connection + # @return [::String] + # Required. The full resource name of the referenced Integration Connectors + # Connection. + # Format: + # `projects/{project}/locations/{location}/connections/{connection}` + # @!attribute [rw] auth_config + # @return [::Google::Cloud::Ces::V1beta::EndUserAuthConfig] + # Optional. Configures how authentication is handled in Integration + # Connectors. By default, an admin authentication is passed in the + # Integration Connectors API requests. You can override it with a different + # end-user authentication config. + # **Note**: The Connection must have authentication override enabled in + # order to specify an EUC configuration here - otherwise, the Toolset + # creation will fail. See: + # https://cloud.google.com/application-integration/docs/configure-connectors-task#configure-authentication-override + # @!attribute [rw] connector_actions + # @return [::Array<::Google::Cloud::Ces::V1beta::Action>] + # Required. The list of connector actions/entity operations to generate tools + # for. + class ConnectorToolset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb new file mode 100644 index 000000000000..a2b5bd8ccacd --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb @@ -0,0 +1,159 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # A conversation represents an interaction between an end user and the CES app. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the conversation. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the conversation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the conversation was completed. + # @!attribute [rw] turns + # @return [::Array<::Google::Cloud::Ces::V1beta::Conversation::Turn>] + # Required. The turns in the conversation. + # @!attribute [r] turn_count + # @return [::Integer] + # Output only. The number of turns in the conversation. + # @!attribute [rw] channel_type + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::Conversation::ChannelType] + # DEPRECATED. Please use + # {::Google::Cloud::Ces::V1beta::Conversation#input_types input_types} instead. + # @!attribute [r] source + # @return [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Output only. Indicate the source of the conversation. + # @!attribute [r] input_types + # @return [::Array<::Google::Cloud::Ces::V1beta::Conversation::InputType>] + # Output only. The input types of the conversation. + # @!attribute [r] entry_agent + # @return [::String] + # Output only. The agent that initially handles the conversation. If not + # specified, the conversation is handled by the root agent. Format: + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # @!attribute [r] deployment + # @return [::String] + # Output only. The deployment of the app used for processing the + # conversation. Format: + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + # @!attribute [r] app_version + # @return [::String] + # Output only. The version of the app used for processing the conversation. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # @!attribute [r] language_code + # @return [::String] + # Output only. The language code of the conversation. + # @!attribute [rw] messages + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::Google::Cloud::Ces::V1beta::Message>] + # Deprecated. Use turns instead. + class Conversation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # All information about a single turn in the conversation. + # @!attribute [rw] messages + # @return [::Array<::Google::Cloud::Ces::V1beta::Message>] + # Optional. List of messages in the conversation turn, including user + # input, agent responses and intermediate events during the processing. + # @!attribute [rw] root_span + # @return [::Google::Cloud::Ces::V1beta::Span] + # Optional. The root span of the action processing. + class Turn + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The channel type of the conversation. + module ChannelType + # Unspecified channel type. + CHANNEL_TYPE_UNSPECIFIED = 0 + + # The conversation only contains text messages between the end user and the + # agent. + TEXT = 1 + + # The conversation contains audio messages between the end user and the + # agent. + AUDIO = 2 + + # The conversation multi-modal messages (e.g. image) between the end user + # and the agent. + MULTIMODAL = 3 + end + + # The source of the conversation. + module Source + # Unspecified source. + SOURCE_UNSPECIFIED = 0 + + # The conversation is from the live end user. + LIVE = 1 + + # The conversation is from the simulator. + SIMULATOR = 2 + + # The conversation is from the evaluation. + EVAL = 3 + + # The conversation is from an agent tool. Agent tool runs the agent in a + # separate session, which is persisted for testing and debugging purposes. + AGENT_TOOL = 4 + end + + # Type of the input message. + module InputType + # Unspecified input type. + INPUT_TYPE_UNSPECIFIED = 0 + + # Text input. + INPUT_TYPE_TEXT = 1 + + # Event input. + INPUT_TYPE_EVENT = 7 + + # Audio input. + INPUT_TYPE_AUDIO = 2 + + # Image input. + INPUT_TYPE_IMAGE = 3 + + # Blob input. + INPUT_TYPE_BLOB = 4 + + # Client function tool response input. + INPUT_TYPE_TOOL_RESPONSE = 5 + + # Variables input. + INPUT_TYPE_VARIABLES = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store.rb new file mode 100644 index 000000000000..4fcd646fad33 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # A DataStore resource in Vertex AI Search. + # @!attribute [rw] name + # @return [::String] + # Required. Full resource name of the DataStore. + # Format: + # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` + # @!attribute [r] type + # @return [::Google::Cloud::Ces::V1beta::DataStore::DataStoreType] + # Output only. The type of the data store. This field is readonly and + # populated by the server. + # @!attribute [r] document_processing_mode + # @return [::Google::Cloud::Ces::V1beta::DataStore::DocumentProcessingMode] + # Output only. The document processing mode for the data store connection. + # Only set for PUBLIC_WEB and UNSTRUCTURED data stores. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the data store. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the data store was created. + # @!attribute [r] connector_config + # @return [::Google::Cloud::Ces::V1beta::DataStore::ConnectorConfig] + # Output only. The connector config for the data store connection. + class DataStore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The connector config for the data store connection. + # @!attribute [rw] collection + # @return [::String] + # Resource name of the collection the data store belongs to. + # @!attribute [rw] collection_display_name + # @return [::String] + # Display name of the collection the data store belongs to. + # @!attribute [rw] data_source + # @return [::String] + # The name of the data source. + # Example: `salesforce`, `jira`, `confluence`, `bigquery`. + class ConnectorConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the data store. + module DataStoreType + # Not specified. This value indicates that the data store type is not + # specified, so it will not be used during search. + DATA_STORE_TYPE_UNSPECIFIED = 0 + + # A data store that contains public web content. + PUBLIC_WEB = 1 + + # A data store that contains unstructured private data. + UNSTRUCTURED = 2 + + # A data store that contains structured data used as FAQ. + FAQ = 3 + + # A data store that is a connector to a first-party or a third-party + # service. + CONNECTOR = 4 + end + + # The document processing mode of the data store. + module DocumentProcessingMode + # Not specified. + DOCUMENT_PROCESSING_MODE_UNSPECIFIED = 0 + + # Documents are processed as documents. + DOCUMENTS = 1 + + # Documents are converted to chunks. + CHUNKS = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb new file mode 100644 index 000000000000..1a5480c3f6d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb @@ -0,0 +1,328 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Tool to retrieve from Vertex AI Search datastore or engine for grounding. + # Accepts either a datastore or an engine, but not both. + # See Vertex AI Search: + # https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction. + # @!attribute [rw] data_store_source + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::DataStoreSource] + # Optional. Search within a single specific DataStore. + # + # Note: The following fields are mutually exclusive: `data_store_source`, `engine_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] engine_source + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::EngineSource] + # Optional. Search within an Engine (potentially across multiple + # DataStores). + # + # Note: The following fields are mutually exclusive: `engine_source`, `data_store_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Required. The data store tool name. + # @!attribute [rw] description + # @return [::String] + # Optional. The tool description. + # @!attribute [rw] boost_specs + # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpecs>] + # Optional. Boost specification to boost certain documents. + # @!attribute [rw] modality_configs + # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::ModalityConfig>] + # Optional. The modality configs for the data store. + # @!attribute [rw] filter_parameter_behavior + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::FilterParameterBehavior] + # Optional. The filter parameter behavior. + class DataStoreTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Rewriter configuration. + # @!attribute [rw] model_settings + # @return [::Google::Cloud::Ces::V1beta::ModelSettings] + # Required. Configurations for the LLM model. + # @!attribute [rw] prompt + # @return [::String] + # Optional. The prompt definition. If not set, default prompt will be used. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Whether the rewriter is disabled. + class RewriterConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Summarization configuration. + # @!attribute [rw] model_settings + # @return [::Google::Cloud::Ces::V1beta::ModelSettings] + # Optional. Configurations for the LLM model. + # @!attribute [rw] prompt + # @return [::String] + # Optional. The prompt definition. If not set, default prompt will be used. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Whether summarization is disabled. + class SummarizationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Grounding configuration. + # @!attribute [rw] grounding_level + # @return [::Float] + # Optional. The groundedness threshold of the answer based on the retrieved + # sources. The value has a configurable range of [1, 5]. The level is used + # to threshold the groundedness of the answer, meaning that all responses + # with a groundedness score below the threshold will fall back to returning + # relevant snippets only. + # + # For example, a level of 3 means that the groundedness score must be + # 3 or higher for the response to be returned. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Whether grounding is disabled. + class GroundingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for searching within a specific DataStore. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter specification for the DataStore. + # See: + # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata + # @!attribute [rw] data_store + # @return [::Google::Cloud::Ces::V1beta::DataStore] + # Optional. The data store. + class DataStoreSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for searching within an Engine, potentially targeting + # specific DataStores. + # @!attribute [rw] engine + # @return [::String] + # Required. Full resource name of the Engine. + # Format: + # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + # @!attribute [rw] data_store_sources + # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::DataStoreSource>] + # Optional. Use to target specific DataStores within the Engine. + # If empty, the search applies to all DataStores associated with the + # Engine. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter applied to the search across the Engine. Not relevant + # and not used if 'data_store_sources' is provided. See: + # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata + class EngineSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Boost specifications to boost certain documents. + # For more information, please refer to + # https://cloud.google.com/generative-ai-app-builder/docs/boosting. + # @!attribute [rw] data_stores + # @return [::Array<::String>] + # Required. The Data Store where the boosting configuration is applied. + # Full resource name of DataStore, such as + # projects/\\{project}/locations/\\{location}/collections/\\{collection}/dataStores/\\{dataStore}. + # @!attribute [rw] spec + # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec>] + # Required. A list of boosting specifications. + class BoostSpecs + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Boost specification to boost certain documents. + # @!attribute [rw] condition_boost_specs + # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec::ConditionBoostSpec>] + # Required. A list of boosting specifications. + class BoostSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Boost specification for a condition. + # @!attribute [rw] condition + # @return [::String] + # Required. An expression which specifies a boost condition. The syntax + # is the same as filter expression syntax. Currently, the only supported + # condition is a list of BCP-47 lang codes. Example: To boost suggestions + # in languages en or fr: (lang_code: ANY("en", "fr")) + # @!attribute [rw] boost + # @return [::Float] + # Optional. Strength of the boost, which should be in [-1, 1]. Negative + # boost means demotion. Default is 0.0. + # + # Setting to 1.0 gives the suggestions a big promotion. However, it does + # not necessarily mean that the top result will be a boosted suggestion. + # + # Setting to -1.0 gives the suggestions a big demotion. However, other + # suggestions that are relevant might still be shown. + # + # Setting to 0.0 means no boost applied. The boosting condition is + # ignored. + # @!attribute [rw] boost_control_spec + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec] + # Optional. Complex specification for custom ranking based on customer + # defined attribute value. + class ConditionBoostSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specification for custom ranking based on customer specified attribute + # value. It provides more controls for customized ranking than the simple + # (condition, boost) combination above. + # @!attribute [rw] field_name + # @return [::String] + # Optional. The name of the field whose value will be used to determine + # the boost amount. + # @!attribute [rw] attribute_type + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType] + # Optional. The attribute type to be used to determine the boost + # amount. The attribute value can be derived from the field value of + # the specified field_name. In the case of numerical it is + # straightforward i.e. attribute_value = numerical_field_value. In the + # case of freshness however, attribute_value = (time.now() - + # datetime_field_value). + # @!attribute [rw] interpolation_type + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType] + # Optional. The interpolation type to be applied to connect the control + # points listed below. + # @!attribute [rw] control_points + # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>] + # Optional. The control points used to define the curve. The monotonic + # function (defined through the interpolation_type above) passes + # through the control points listed here. + class BoostControlSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The control points used to define the curve. The curve defined + # through these control points can only be monotonically increasing + # or decreasing(constant values are acceptable). + # @!attribute [rw] attribute_value + # @return [::String] + # Optional. Can be one of: + # 1. The numerical field value. + # 2. The duration spec for freshness: + # The value must be formatted as an XSD `dayTimeDuration` value (a + # restricted subset of an ISO 8601 duration value). The pattern for + # this is: `[nD][T[nH][nM][nS]]`. + # @!attribute [rw] boost_amount + # @return [::Float] + # Optional. The value between -1 to 1 by which to boost the score if + # the attribute_value evaluates to the value specified above. + class ControlPoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The attribute(or function) for which the custom ranking is to be + # applied. + module AttributeType + # Unspecified AttributeType. + ATTRIBUTE_TYPE_UNSPECIFIED = 0 + + # The value of the numerical field will be used to dynamically update + # the boost amount. In this case, the attribute_value (the x value) + # of the control point will be the actual value of the numerical + # field for which the boost_amount is specified. + NUMERICAL = 1 + + # For the freshness use case the attribute value will be the duration + # between the current time and the date in the datetime field + # specified. The value must be formatted as an XSD `dayTimeDuration` + # value (a restricted subset of an ISO 8601 duration value). The + # pattern for this is: `[nD][T[nH][nM][nS]]`. + # E.g. `5D`, `3DT12H30M`, `T24H`. + FRESHNESS = 2 + end + + # The interpolation type to be applied. Default will be linear + # (Piecewise Linear). + module InterpolationType + # Interpolation type is unspecified. In this case, it defaults to + # Linear. + INTERPOLATION_TYPE_UNSPECIFIED = 0 + + # Piecewise linear interpolation will be applied. + LINEAR = 1 + end + end + end + end + + # If specified, will apply the given configuration for the specified + # modality. + # @!attribute [rw] modality_type + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::ModalityConfig::ModalityType] + # Required. The modality type. + # @!attribute [rw] rewriter_config + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::RewriterConfig] + # Optional. The rewriter config. + # @!attribute [rw] summarization_config + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::SummarizationConfig] + # Optional. The summarization config. + # @!attribute [rw] grounding_config + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::GroundingConfig] + # Optional. The grounding configuration. + class ModalityConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The modality type. + module ModalityType + # Unspecified modality type. + MODALITY_TYPE_UNSPECIFIED = 0 + + # Text modality. + TEXT = 1 + + # Audio modality. + AUDIO = 2 + end + end + + # Filter parameter behavior. + module FilterParameterBehavior + # Default filter behavior. + # Include filter parameter for connector datastores. + # For the rest of the datastore types, the filter input parameter is + # omitted. + FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED = 0 + + # Always include filter parameter for all datastore types. + ALWAYS_INCLUDE = 2 + + # The filter parameter is never included in the list of tool parameters, + # regardless of the datastore type. + NEVER_INCLUDE = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb new file mode 100644 index 000000000000..c1c5ca0d6eb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb @@ -0,0 +1,123 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Experiment for the deployment. + # @!attribute [rw] version_release + # @return [::Google::Cloud::Ces::V1beta::ExperimentConfig::VersionRelease] + # Optional. Version release for the experiment. + class ExperimentConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Version release for the experiment. + # @!attribute [rw] state + # @return [::Google::Cloud::Ces::V1beta::ExperimentConfig::State] + # Optional. State of the version release. + # @!attribute [rw] traffic_allocations + # @return [::Array<::Google::Cloud::Ces::V1beta::ExperimentConfig::VersionRelease::TrafficAllocation>] + # Optional. Traffic allocations for the version release. + class VersionRelease + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Traffic allocation for the version release. + # @!attribute [rw] id + # @return [::String] + # Optional. Id of the traffic allocation. + # Free format string, up to 128 characters. + # @!attribute [rw] traffic_percentage + # @return [::Integer] + # Optional. Traffic percentage of the traffic allocation. + # Must be between 0 and 100. + # @!attribute [rw] app_version + # @return [::String] + # Optional. App version of the traffic allocation. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + class TrafficAllocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # State of the experiment. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Pending state. Experiment is pending and not valid. + PENDING = 1 + + # Running state. Experiment is running and valid. + RUNNING = 2 + + # Done state. Experiment is done and no longer valid. + DONE = 3 + + # Expired state. Experiment is expired and no longer valid. + EXPIRED = 4 + end + end + + # A deployment represents an immutable, queryable version of the app. + # It is used to deploy an app version with a specific channel profile. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the deployment. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the deployment. + # @!attribute [rw] app_version + # @return [::String] + # Optional. The resource name of the app version to deploy. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # Use `projects/{project}/locations/{location}/apps/{app}/versions/-` to use + # the draft app. + # @!attribute [rw] channel_profile + # @return [::Google::Cloud::Ces::V1beta::ChannelProfile] + # Required. The channel profile used in the deployment. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this deployment was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this deployment was last updated. + # @!attribute [r] etag + # @return [::String] + # Output only. Etag used to ensure the object hasn't changed during a + # read-modify-write operation. If the etag is empty, the update will + # overwrite any concurrent changes. + # @!attribute [rw] experiment_config + # @return [::Google::Cloud::Ces::V1beta::ExperimentConfig] + # Optional. Experiment configuration for the deployment. + class Deployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb new file mode 100644 index 000000000000..c21e5c694ce9 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb @@ -0,0 +1,1687 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Aggregated metrics for an evaluation or evaluation dataset. + # @!attribute [r] metrics_by_app_version + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::MetricsByAppVersion>] + # Output only. Aggregated metrics, grouped by app version ID. + class AggregatedMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metrics for a single tool. + # @!attribute [r] tool + # @return [::String] + # Output only. The name of the tool. + # @!attribute [r] pass_count + # @return [::Integer] + # Output only. The number of times the tool passed. + # @!attribute [r] fail_count + # @return [::Integer] + # Output only. The number of times the tool failed. + class ToolMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metrics for turn latency. + # @!attribute [r] average_latency + # @return [::Google::Protobuf::Duration] + # Output only. The average latency of the turns. + class TurnLatencyMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metrics for tool call latency. + # @!attribute [r] tool + # @return [::String] + # Output only. The name of the tool. + # @!attribute [r] average_latency + # @return [::Google::Protobuf::Duration] + # Output only. The average latency of the tool calls. + class ToolCallLatencyMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metrics for semantic similarity results. + # @!attribute [r] score + # @return [::Float] + # Output only. The average semantic similarity score (0-4). + class SemanticSimilarityMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metrics for hallucination results. + # @!attribute [r] score + # @return [::Float] + # Output only. The average hallucination score (0 to 1). + class HallucinationMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metrics aggregated per app version. + # @!attribute [r] app_version_id + # @return [::String] + # Output only. The app version ID. + # @!attribute [r] tool_metrics + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolMetrics>] + # Output only. Metrics for each tool within this app version. + # @!attribute [r] semantic_similarity_metrics + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::SemanticSimilarityMetrics>] + # Output only. Metrics for semantic similarity within this app version. + # @!attribute [r] hallucination_metrics + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::HallucinationMetrics>] + # Output only. Metrics for hallucination within this app version. + # @!attribute [r] tool_call_latency_metrics + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolCallLatencyMetrics>] + # Output only. Metrics for tool call latency within this app version. + # @!attribute [r] turn_latency_metrics + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::TurnLatencyMetrics>] + # Output only. Metrics for turn latency within this app version. + # @!attribute [r] pass_count + # @return [::Integer] + # Output only. The number of times the evaluation passed. + # @!attribute [r] fail_count + # @return [::Integer] + # Output only. The number of times the evaluation failed. + # @!attribute [r] metrics_by_turn + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::MetricsByTurn>] + # Output only. Metrics aggregated per turn within this app version. + class MetricsByAppVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metrics aggregated per turn. + # @!attribute [r] turn_index + # @return [::Integer] + # Output only. The turn index (0-based). + # @!attribute [r] tool_metrics + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolMetrics>] + # Output only. Metrics for each tool within this turn. + # @!attribute [r] semantic_similarity_metrics + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::SemanticSimilarityMetrics>] + # Output only. Metrics for semantic similarity within this turn. + # @!attribute [r] hallucination_metrics + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::HallucinationMetrics>] + # Output only. Metrics for hallucination within this turn. + # @!attribute [r] tool_call_latency_metrics + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolCallLatencyMetrics>] + # Output only. Metrics for tool call latency within this turn. + # @!attribute [r] turn_latency_metrics + # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::TurnLatencyMetrics>] + # Output only. Metrics for turn latency within this turn. + class MetricsByTurn + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An evaluation represents all of the information needed to simulate and + # evaluate an agent. + # @!attribute [rw] golden + # @return [::Google::Cloud::Ces::V1beta::Evaluation::Golden] + # Optional. The golden steps to be evaluated. + # + # Note: The following fields are mutually exclusive: `golden`, `scenario`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] scenario + # @return [::Google::Cloud::Ces::V1beta::Evaluation::Scenario] + # Optional. The config for a scenario. + # + # Note: The following fields are mutually exclusive: `scenario`, `golden`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of this evaluation. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @!attribute [rw] display_name + # @return [::String] + # Required. User-defined display name of the evaluation. Unique within an + # App. + # @!attribute [rw] description + # @return [::String] + # Optional. User-defined description of the evaluation. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Optional. User defined tags to categorize the evaluation. + # @!attribute [r] evaluation_datasets + # @return [::Array<::String>] + # Output only. List of evaluation datasets the evaluation belongs to. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the evaluation was created. + # @!attribute [r] created_by + # @return [::String] + # Output only. The user who created the evaluation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the evaluation was last updated. + # @!attribute [r] last_updated_by + # @return [::String] + # Output only. The user who last updated the evaluation. + # @!attribute [r] evaluation_runs + # @return [::Array<::String>] + # Output only. The EvaluationRuns that this Evaluation is associated with. + # @!attribute [r] etag + # @return [::String] + # Output only. Etag used to ensure the object hasn't changed during a + # read-modify-write operation. If the etag is empty, the update will + # overwrite any concurrent changes. + # @!attribute [r] aggregated_metrics + # @return [::Google::Cloud::Ces::V1beta::AggregatedMetrics] + # Output only. The aggregated metrics for this evaluation across all runs. + # @!attribute [r] last_completed_result + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult] + # Output only. The latest evaluation result for this evaluation. + # @!attribute [r] invalid + # @return [::Boolean] + # Output only. Whether the evaluation is invalid. This can happen if an + # evaluation is referencing a tool, toolset, or agent that has since been + # deleted. + # @!attribute [r] last_ten_results + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult>] + # Output only. The last 10 evaluation results for this evaluation. This is + # only populated if include_last_ten_results is set to true in the + # ListEvaluationsRequest or GetEvaluationRequest. + # @!attribute [rw] evaluation_metrics_threshold_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds] + # Optional. Overrides metrics thresholds for this specific evaluation. + # @!attribute [rw] evaluation_metrics_config_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig] + # Optional. Overrides metrics config for this specific evaluation. + class Evaluation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a single, checkable requirement. + # @!attribute [rw] tool_call + # @return [::Google::Cloud::Ces::V1beta::ToolCall] + # Optional. Check that a specific tool was called with the parameters. + # + # Note: The following fields are mutually exclusive: `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tool_response + # @return [::Google::Cloud::Ces::V1beta::ToolResponse] + # Optional. Check that a specific tool had the expected response. + # + # Note: The following fields are mutually exclusive: `tool_response`, `tool_call`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] agent_response + # @return [::Google::Cloud::Ces::V1beta::Message] + # Optional. Check that the agent responded with the correct response. The + # role "agent" is implied. + # + # Note: The following fields are mutually exclusive: `agent_response`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] agent_transfer + # @return [::Google::Cloud::Ces::V1beta::AgentTransfer] + # Optional. Check that the agent transferred the conversation to a + # different agent. + # + # Note: The following fields are mutually exclusive: `agent_transfer`, `tool_call`, `tool_response`, `agent_response`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] updated_variables + # @return [::Google::Protobuf::Struct] + # Optional. Check that the agent updated the session variables to the + # expected values. Used to also capture agent variable updates for golden + # evals. + # + # Note: The following fields are mutually exclusive: `updated_variables`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mock_tool_response + # @return [::Google::Cloud::Ces::V1beta::ToolResponse] + # Optional. The tool response to mock, with the parameters of interest + # specified. Any parameters not specified will be hallucinated by the + # LLM. + # + # Note: The following fields are mutually exclusive: `mock_tool_response`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] no_tool_calls + # @return [::Boolean] + # Optional. Check that no tools were called during this turn. + # + # Note: The following fields are mutually exclusive: `no_tool_calls`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] note + # @return [::String] + # Optional. A note for this requirement, useful in reporting when specific + # checks fail. E.g., "Check_Payment_Tool_Called". + # @!attribute [rw] skip_evaluation + # @return [::Boolean] + # Optional. If set to true, this specific expectation will not be + # evaluated. + # @!attribute [rw] expectation_level_metrics_thresholds_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds] + # Optional. Overrides metrics at the step level. + # @!attribute [rw] agent_response_semantic_similarity_metrics_config_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::SemanticSimilarityMetricsConfig] + # Optional. Overrides for agent_response semantic similarity metrics. + # @!attribute [rw] agent_response_hallucination_metrics_config_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::HallucinationMetricsConfig] + # Optional. Overrides for agent_response hallucination metrics. + # @!attribute [rw] comparison_type + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::ComparisonType] + # Optional. The comparison type to use for the expectation check. + class GoldenExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A step defines a singular action to happen during the evaluation. + # @!attribute [rw] user_input + # @return [::Google::Cloud::Ces::V1beta::SessionInput] + # Optional. User input for the conversation. + # + # Note: The following fields are mutually exclusive: `user_input`, `agent_transfer`, `expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] agent_transfer + # @return [::Google::Cloud::Ces::V1beta::AgentTransfer] + # Optional. Transfer the conversation to a different agent. + # + # Note: The following fields are mutually exclusive: `agent_transfer`, `user_input`, `expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] expectation + # @return [::Google::Cloud::Ces::V1beta::Evaluation::GoldenExpectation] + # Optional. Executes an expectation on the current turn. + # + # Note: The following fields are mutually exclusive: `expectation`, `user_input`, `agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Step + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A golden turn defines a single turn in a golden conversation. + # @!attribute [rw] steps + # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::Step>] + # Required. The steps required to replay a golden conversation. + # @!attribute [rw] root_span + # @return [::Google::Cloud::Ces::V1beta::Span] + # Optional. The root span of the golden turn for processing and maintaining + # audio information. The uri for the audio must contain audio saved in + # 16Khz sample rate. + # @!attribute [rw] turn_level_metrics_thresholds_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds] + # Optional. Overrides for turn-level metric thresholds. + # @!attribute [rw] hallucination_metric_behavior_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::HallucinationMetricBehavior] + # Optional. Override for turn-level hallucination metric behavior. + class GoldenTurn + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The steps required to replay a golden conversation. + # @!attribute [rw] turns + # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::GoldenTurn>] + # Required. The golden turns required to replay a golden conversation. + # The maximum number of allowed turns is 100. + # @!attribute [rw] evaluation_expectations + # @return [::Array<::String>] + # Optional. The evaluation expectations to evaluate the replayed + # conversation against. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}` + class Golden + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The expectation to evaluate the conversation produced by the simulation. + # @!attribute [rw] tool_expectation + # @return [::Google::Cloud::Ces::V1beta::Evaluation::ScenarioExpectation::ToolExpectation] + # Optional. The tool call and response pair to be evaluated. + # + # Note: The following fields are mutually exclusive: `tool_expectation`, `agent_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] agent_response + # @return [::Google::Cloud::Ces::V1beta::Message] + # Optional. The agent response to be evaluated. + # + # Note: The following fields are mutually exclusive: `agent_response`, `tool_expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ScenarioExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The tool call and response pair to be evaluated. + # @!attribute [rw] expected_tool_call + # @return [::Google::Cloud::Ces::V1beta::ToolCall] + # Required. The expected tool call, with the parameters of interest + # specified. Any parameters not specified will be hallucinated by the + # LLM. + # @!attribute [rw] mock_tool_response + # @return [::Google::Cloud::Ces::V1beta::ToolResponse] + # Required. The tool response to mock, with the parameters of interest + # specified. Any parameters not specified will be hallucinated by the + # LLM. + class ToolExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The config for a scenario + # @!attribute [rw] task + # @return [::String] + # Required. The task to be targeted by the scenario. + # @!attribute [rw] user_facts + # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::Scenario::UserFact>] + # Optional. The user facts to be used by the scenario. + # @!attribute [rw] max_turns + # @return [::Integer] + # Optional. The maximum number of turns to simulate. The maximum allowed + # value is 100. The default value is 100. + # @!attribute [rw] rubrics + # @return [::Array<::String>] + # Required. The rubrics to score the scenario against. + # @!attribute [rw] scenario_expectations + # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::ScenarioExpectation>] + # Required. The ScenarioExpectations to evaluate the conversation produced + # by the user simulation. + # @!attribute [rw] variable_overrides + # @return [::Google::Protobuf::Struct] + # Optional. Variables / Session Parameters as context for the session, + # keyed by variable names. Members of this struct will override any default + # values set by the system. + # + # Note, these are different from user facts, which are facts known to the + # user. Variables are parameters known to the agent: i.e. MDN (phone + # number) passed by the telephony system. + # @!attribute [rw] task_completion_behavior + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::Evaluation::Scenario::TaskCompletionBehavior] + # Optional. Deprecated. Use user_goal_behavior instead. + # @!attribute [rw] user_goal_behavior + # @return [::Google::Cloud::Ces::V1beta::Evaluation::Scenario::UserGoalBehavior] + # Optional. The expected behavior of the user goal. + # @!attribute [rw] evaluation_expectations + # @return [::Array<::String>] + # Optional. The evaluation expectations to evaluate the conversation + # produced by the simulation against. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}` + # @!attribute [rw] scenario_execution_mode + # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings::ScenarioExecutionMode] + # Optional. The execution mode for scenario evaluations. + class Scenario + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Facts about the user as a key value pair. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the user fact. + # @!attribute [rw] value + # @return [::String] + # Required. The value of the user fact. + class UserFact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The expected behavior of the user task. This is used to determine whether + # the scenario is successful. + module TaskCompletionBehavior + # Behavior unspecified. Will default to TASK_SATISFIED. + TASK_COMPLETION_BEHAVIOR_UNSPECIFIED = 0 + + # The user task should be completed successfully. + TASK_SATISFIED = 1 + + # The user task should be rejected. + TASK_REJECTED = 2 + end + + # The expected behavior of the user goal. This is used to determine whether + # the scenario is successful. + module UserGoalBehavior + # Behavior unspecified. Will default to USER_GOAL_SATISFIED. + USER_GOAL_BEHAVIOR_UNSPECIFIED = 0 + + # The user goal should be completed successfully. + USER_GOAL_SATISFIED = 1 + + # The user goal should be rejected. + USER_GOAL_REJECTED = 2 + + # Ignore the user goal status. + USER_GOAL_IGNORED = 3 + end + end + end + + # An evaluation dataset represents a set of evaluations that are grouped + # together basaed on shared tags. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of this evaluation dataset. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` + # @!attribute [rw] display_name + # @return [::String] + # Required. User-defined display name of the evaluation dataset. Unique + # within an App. + # @!attribute [rw] evaluations + # @return [::Array<::String>] + # Optional. Evaluations that are included in this dataset. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the evaluation dataset was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the evaluation dataset was last updated. + # @!attribute [r] etag + # @return [::String] + # Output only. Etag used to ensure the object hasn't changed during a + # read-modify-write operation. If the etag is empty, the update will + # overwrite any concurrent changes. + # @!attribute [r] created_by + # @return [::String] + # Output only. The user who created the evaluation dataset. + # @!attribute [r] last_updated_by + # @return [::String] + # Output only. The user who last updated the evaluation dataset. + # @!attribute [r] aggregated_metrics + # @return [::Google::Cloud::Ces::V1beta::AggregatedMetrics] + # Output only. The aggregated metrics for this evaluation dataset across all + # runs. + class EvaluationDataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An evaluation result represents the output of running an Evaluation. + # @!attribute [r] golden_result + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenResult] + # Output only. The outcome of a golden evaluation. + # + # Note: The following fields are mutually exclusive: `golden_result`, `scenario_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] scenario_result + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioResult] + # Output only. The outcome of a scenario evaluation. + # + # Note: The following fields are mutually exclusive: `scenario_result`, `golden_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the evaluation result. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{result}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the Evaluation Result. Unique within an + # Evaluation. By default, it has the following format: + # " result + # - ". + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the evaluation result was created. + # @!attribute [r] evaluation_status + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] + # Output only. The outcome of the evaluation. Only populated if + # execution_state is COMPLETE. + # @!attribute [r] evaluation_run + # @return [::String] + # Output only. The evaluation run that produced this result. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}` + # @!attribute [r] persona + # @return [::Google::Cloud::Ces::V1beta::EvaluationPersona] + # Output only. The persona used to generate the conversation for the + # evaluation result. + # @!attribute [r] error_info + # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo] + # Output only. Error information for the evaluation result. + # @!attribute [r] error + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Rpc::Status] + # Output only. Deprecated: Use `error_info` instead. Errors encountered + # during execution. + # @!attribute [r] initiated_by + # @return [::String] + # Output only. The user who initiated the evaluation run that resulted in + # this result. + # @!attribute [r] app_version + # @return [::String] + # Output only. The app version used to generate the conversation that + # resulted in this result. Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # @!attribute [r] app_version_display_name + # @return [::String] + # Output only. The display name of the `app_version` that the evaluation ran + # against. + # @!attribute [r] changelog + # @return [::String] + # Output only. The changelog of the app version that the evaluation ran + # against. This is populated if user runs evaluation on latest/draft. + # @!attribute [r] changelog_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The create time of the changelog of the app version that the + # evaluation ran against. This is populated if user runs evaluation on + # latest/draft. + # @!attribute [r] execution_state + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::ExecutionState] + # Output only. The state of the evaluation result execution. + # @!attribute [r] evaluation_metrics_thresholds + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds] + # Output only. The evaluation thresholds for the result. + # @!attribute [r] config + # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig] + # Output only. The configuration used in the evaluation run that resulted in + # this result. + # @!attribute [r] golden_run_method + # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod] + # Output only. The method used to run the golden evaluation. + class EvaluationResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the expectation and the result of that expectation. + # @!attribute [r] observed_tool_call + # @return [::Google::Cloud::Ces::V1beta::ToolCall] + # Output only. The result of the tool call expectation. + # + # Note: The following fields are mutually exclusive: `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_agent_transfer`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] observed_tool_response + # @return [::Google::Cloud::Ces::V1beta::ToolResponse] + # Output only. The result of the tool response expectation. + # + # Note: The following fields are mutually exclusive: `observed_tool_response`, `observed_tool_call`, `observed_agent_response`, `observed_agent_transfer`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] observed_agent_response + # @return [::Google::Cloud::Ces::V1beta::Message] + # Output only. The result of the agent response expectation. + # + # Note: The following fields are mutually exclusive: `observed_agent_response`, `observed_tool_call`, `observed_tool_response`, `observed_agent_transfer`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] observed_agent_transfer + # @return [::Google::Cloud::Ces::V1beta::AgentTransfer] + # Output only. The result of the agent transfer expectation. + # + # Note: The following fields are mutually exclusive: `observed_agent_transfer`, `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] observed_payload + # @return [::Google::Protobuf::Struct] + # Output only. An observed custom payload. + # There are no expectations for custom payloads. This is only used for + # metrics calculation. The outcome is always SKIPPED. + # + # Note: The following fields are mutually exclusive: `observed_payload`, `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] expectation + # @return [::Google::Cloud::Ces::V1beta::Evaluation::GoldenExpectation] + # Output only. The expectation that was evaluated. + # @!attribute [r] outcome + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] + # Output only. The outcome of the expectation. + # @!attribute [r] semantic_similarity_result + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::SemanticSimilarityResult] + # Output only. The result of the semantic similarity check. + # @!attribute [r] tool_invocation_result + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenExpectationOutcome::ToolInvocationResult] + # Output only. The result of the tool invocation check. + class GoldenExpectationOutcome + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of the tool invocation check. + # @!attribute [r] parameter_correctness_score + # @return [::Float] + # Output only. The tool invocation parameter correctness score. This + # indicates the percent of parameters from the expected tool call that + # were also present in the actual tool call. + # @!attribute [r] outcome + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] + # Output only. The outcome of the tool invocation check. This is + # determined by comparing the parameter_correctness_score to the + # threshold. If the score is equal to or above the threshold, the outcome + # will be PASS. Otherwise, the outcome will be FAIL. + # @!attribute [r] explanation + # @return [::String] + # Output only. A free text explanation for the tool invocation result. + class ToolInvocationResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The result of a single evaluation expectation. + # @!attribute [r] evaluation_expectation + # @return [::String] + # Output only. The evaluation expectation. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}` + # @!attribute [r] prompt + # @return [::String] + # Output only. The prompt that was used for the evaluation. + # @!attribute [r] outcome + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] + # Output only. The outcome of the evaluation expectation. + # @!attribute [r] explanation + # @return [::String] + # Output only. The explanation for the result. + class EvaluationExpectationResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of a golden evaluation. + # @!attribute [r] turn_replay_results + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenResult::TurnReplayResult>] + # Output only. The result of running each turn of the golden conversation. + # @!attribute [r] evaluation_expectation_results + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::EvaluationExpectationResult>] + # Output only. The results of the evaluation expectations. + class GoldenResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of running a single turn of the golden conversation. + # @!attribute [r] conversation + # @return [::String] + # Output only. The conversation that was generated for this turn. + # @!attribute [r] expectation_outcome + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenExpectationOutcome>] + # Output only. The outcome of each expectation. + # @!attribute [r] hallucination_result + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::HallucinationResult] + # Output only. The result of the hallucination check. + # @!attribute [r] tool_invocation_score + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Float] + # Output only. Deprecated. Use OverallToolInvocationResult instead. + # @!attribute [r] tool_ordered_invocation_score + # @return [::Float] + # Output only. The overall tool ordered invocation score for this turn. + # This indicates the overall percent of tools from the expected turn that + # were actually invoked in the expected order. + # @!attribute [r] turn_latency + # @return [::Google::Protobuf::Duration] + # Output only. Duration of the turn. + # @!attribute [r] tool_call_latencies + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ToolCallLatency>] + # Output only. The latency of each tool call in the turn. + # @!attribute [r] semantic_similarity_result + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::SemanticSimilarityResult] + # Output only. The result of the semantic similarity check. + # @!attribute [r] overall_tool_invocation_result + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::OverallToolInvocationResult] + # Output only. The result of the overall tool invocation check. + # @!attribute [r] error_info + # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo] + # Output only. Information about the error that occurred during this + # turn. + # @!attribute [r] span_latencies + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::SpanLatency>] + # Output only. The latency of spans in the turn. + class TurnReplayResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The outcome of the evaluation against the rubric. + # @!attribute [r] rubric + # @return [::String] + # Output only. The rubric that was used to evaluate the conversation. + # @!attribute [r] score + # @return [::Float] + # Output only. The score of the conversation against the rubric. + # @!attribute [r] score_explanation + # @return [::String] + # Output only. The rater's response to the rubric. + class ScenarioRubricOutcome + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The outcome of a scenario expectation. + # @!attribute [r] observed_tool_call + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioExpectationOutcome::ObservedToolCall] + # Output only. The observed tool call. + # + # Note: The following fields are mutually exclusive: `observed_tool_call`, `observed_agent_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] observed_agent_response + # @return [::Google::Cloud::Ces::V1beta::Message] + # Output only. The observed agent response. + # + # Note: The following fields are mutually exclusive: `observed_agent_response`, `observed_tool_call`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] expectation + # @return [::Google::Cloud::Ces::V1beta::Evaluation::ScenarioExpectation] + # Output only. The expectation that was evaluated. + # @!attribute [r] outcome + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] + # Output only. The outcome of the ScenarioExpectation. + class ScenarioExpectationOutcome + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The observed tool call and response. + # @!attribute [r] tool_call + # @return [::Google::Cloud::Ces::V1beta::ToolCall] + # Output only. The observed tool call. + # @!attribute [r] tool_response + # @return [::Google::Cloud::Ces::V1beta::ToolResponse] + # Output only. The observed tool response. + class ObservedToolCall + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The outcome of a scenario evaluation. + # @!attribute [r] conversation + # @return [::String] + # Output only. The conversation that was generated in the scenario. + # @!attribute [r] task + # @return [::String] + # Output only. The task that was used when running the scenario for this + # result. + # @!attribute [r] user_facts + # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::Scenario::UserFact>] + # Output only. The user facts that were used by the scenario for this + # result. + # @!attribute [r] expectation_outcomes + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioExpectationOutcome>] + # Output only. The outcome of each expectation. + # @!attribute [r] rubric_outcomes + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioRubricOutcome>] + # Output only. The outcome of the rubric. + # @!attribute [r] hallucination_result + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::HallucinationResult>] + # Output only. The result of the hallucination check. + # There will be one hallucination result for each turn in the conversation. + # @!attribute [r] task_completion_result + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::TaskCompletionResult] + # Output only. The result of the task completion check. + # @!attribute [r] tool_call_latencies + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ToolCallLatency>] + # Output only. The latency of each tool call execution in the conversation. + # @!attribute [r] user_goal_satisfaction_result + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::UserGoalSatisfactionResult] + # Output only. The result of the user goal satisfaction check. + # @!attribute [r] all_expectations_satisfied + # @return [::Boolean] + # Output only. Whether all expectations were satisfied for this turn. + # @!attribute [r] task_completed + # @return [::Boolean] + # Output only. Whether the task was completed for this turn. This is a + # composite of all expectations satisfied, no hallucinations, and user goal + # satisfaction. + # @!attribute [r] span_latencies + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::SpanLatency>] + # Output only. The latency of spans in the conversation. + # @!attribute [r] evaluation_expectation_results + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::EvaluationExpectationResult>] + # Output only. The results of the evaluation expectations. + class ScenarioResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The latency of a span execution. + # @!attribute [r] resource + # @return [::String] + # Output only. The resource name of the guardrail or tool spans. + # + # Note: The following fields are mutually exclusive: `resource`, `toolset`, `model`, `callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] toolset + # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] + # Output only. The toolset tool identifier. + # + # Note: The following fields are mutually exclusive: `toolset`, `resource`, `model`, `callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] model + # @return [::String] + # Output only. The name of the LLM span. + # + # Note: The following fields are mutually exclusive: `model`, `resource`, `toolset`, `callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] callback + # @return [::String] + # Output only. The name of the user callback span. + # + # Note: The following fields are mutually exclusive: `callback`, `resource`, `toolset`, `model`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] type + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::SpanLatency::Type] + # Output only. The type of span. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the span. Applicable to tool and + # guardrail spans. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The start time of span. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The end time of span. + # @!attribute [r] execution_latency + # @return [::Google::Protobuf::Duration] + # Output only. The latency of span. + class SpanLatency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of span. + # Additional values may be added in the future. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # Tool call span. + TOOL = 1 + + # User callback span. + USER_CALLBACK = 2 + + # Guardrail span. + GUARDRAIL = 3 + + # LLM span. + LLM = 4 + end + end + + # The latency of a tool call execution. + # @!attribute [r] tool + # @return [::String] + # Output only. The name of the tool that got executed. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}`. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the tool. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The start time of the tool call execution. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The end time of the tool call execution. + # @!attribute [r] execution_latency + # @return [::Google::Protobuf::Duration] + # Output only. The latency of the tool call execution. + class ToolCallLatency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of the hallucination check for a single turn. + # @!attribute [r] score + # @return [::Integer] + # Output only. The hallucination score. Can be -1, 0, 1. + # @!attribute [r] label + # @return [::String] + # Output only. The label associated with each score. + # Score 1: Justified + # Score 0: Not Justified + # Score -1: No Claim To Assess + # @!attribute [r] explanation + # @return [::String] + # Output only. The explanation for the hallucination score. + class HallucinationResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of a user goal satisfaction check for a conversation. + # @!attribute [r] score + # @return [::Integer] + # Output only. The user task satisfaction score. Can be -1, 0, 1. + # @!attribute [r] label + # @return [::String] + # Output only. The label associated with each score. + # Score 1: User Task Satisfied + # Score 0: User Task Not Satisfied + # Score -1: User Task Unspecified + # @!attribute [r] explanation + # @return [::String] + # Output only. The explanation for the user task satisfaction score. + class UserGoalSatisfactionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of the semantic similarity check. + # @!attribute [r] score + # @return [::Integer] + # Output only. The semantic similarity score. Can be 0, 1, 2, 3, or 4. + # @!attribute [r] label + # @return [::String] + # Output only. The label associated with each score. + # Score 4: Fully Consistent + # Score 3: Mostly Consistent + # Score 2: Partially Consistent (Minor Omissions) + # Score 1: Largely Inconsistent (Major Omissions) + # Score 0: Completely Inconsistent / Contradictory + # @!attribute [r] explanation + # @return [::String] + # Output only. The explanation for the semantic similarity score. + # @!attribute [r] outcome + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] + # Output only. The outcome of the semantic similarity check. This is + # determined by comparing the score to the + # semantic_similarity_success_threshold. If the score is equal to or above + # the threshold, the outcome will be PASS. Otherwise, the outcome will be + # FAIL. + class SemanticSimilarityResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of the overall tool invocation check. + # @!attribute [rw] tool_invocation_score + # @return [::Float] + # The overall tool invocation score for this turn. This indicates the + # overall percent of tools from the expected turn that were actually + # invoked. + # @!attribute [r] outcome + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] + # Output only. The outcome of the tool invocation check. This is determined + # by comparing the tool_invocation_score to the + # overall_tool_invocation_correctness_threshold. If the + # score is equal to or above the threshold, the outcome will be PASS. + # Otherwise, the outcome will be FAIL. + class OverallToolInvocationResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of the task completion check for the conversation. + # @!attribute [r] score + # @return [::Integer] + # Output only. The task completion score. Can be -1, 0, 1 + # @!attribute [r] label + # @return [::String] + # Output only. The label associated with each score. + # Score 1: Task Completed + # Score 0: Task Not Completed + # Score -1: User Goal Undefined + # @!attribute [r] explanation + # @return [::String] + # Output only. The explanation for the task completion score. + class TaskCompletionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The outcome of the evaluation or expectation. + module Outcome + # Evaluation outcome is not specified. + OUTCOME_UNSPECIFIED = 0 + + # Evaluation/Expectation passed. In the case of an evaluation, this means + # that all expectations were met. + PASS = 1 + + # Evaluation/Expectation failed. In the case of an evaluation, this means + # that at least one expectation was not met. + FAIL = 2 + + # Evaluation/Expectation was skipped. + SKIPPED = 3 + end + + # The state of the evaluation result execution. + module ExecutionState + # Evaluation result execution state is not specified. + EXECUTION_STATE_UNSPECIFIED = 0 + + # Evaluation result execution is queued. + QUEUED = 5 + + # Evaluation result execution is running. + RUNNING = 1 + + # Evaluation result execution has completed. + COMPLETED = 2 + + # Evaluation result execution failed due to an internal error. + ERROR = 3 + + # Evaluation result execution was cancelled. + CANCELLED = 4 + end + end + + # An evaluation run represents an all the evaluation results from an + # evaluation execution. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the evaluation run. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. User-defined display name of the evaluation run. + # default: " run - ". + # @!attribute [r] evaluation_results + # @return [::Array<::String>] + # Output only. The evaluation results that are part of this run. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{result}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the evaluation run was created. + # @!attribute [r] initiated_by + # @return [::String] + # Output only. The user who initiated the evaluation run. + # @!attribute [r] app_version + # @return [::String] + # Output only. The app version to evaluate. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # @!attribute [r] app_version_display_name + # @return [::String] + # Output only. The display name of the `app_version` that the evaluation ran + # against. + # @!attribute [r] changelog + # @return [::String] + # Output only. The changelog of the app version that the evaluation ran + # against. This is populated if user runs evaluation on latest/draft. + # @!attribute [r] changelog_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The create time of the changelog of the app version that the + # evaluation ran against. This is populated if user runs evaluation on + # latest/draft. + # @!attribute [r] evaluations + # @return [::Array<::String>] + # Output only. The evaluations that are part of this run. The list may + # contain evaluations of either type. This field is mutually exclusive with + # `evaluation_dataset`. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @!attribute [r] evaluation_dataset + # @return [::String] + # Output only. The evaluation dataset that this run is associated with. This + # field is mutually exclusive with `evaluations`. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` + # @!attribute [r] evaluation_type + # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationType] + # Output only. The type of the evaluations in this run. + # @!attribute [r] state + # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationRunState] + # Output only. The state of the evaluation run. + # @!attribute [r] progress + # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::Progress] + # Output only. The progress of the evaluation run. + # @!attribute [r] config + # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig] + # Output only. The configuration used in the run. + # @!attribute [r] error + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Rpc::Status] + # Output only. Deprecated: Use error_info instead. Errors encountered during + # execution. + # @!attribute [r] error_info + # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo] + # Output only. Error information for the evaluation run. + # @!attribute [r] evaluation_run_summaries + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationRunSummary}] + # Output only. Map of evaluation name to EvaluationRunSummary. + # @!attribute [r] latency_report + # @return [::Google::Cloud::Ces::V1beta::LatencyReport] + # Output only. Latency report for the evaluation run. + # @!attribute [r] run_count + # @return [::Integer] + # Output only. The number of times the evaluations inside the run were run. + # @!attribute [r] persona_run_configs + # @return [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig>] + # Output only. The configuration to use for the run per persona. + # @!attribute [rw] optimization_config + # @return [::Google::Cloud::Ces::V1beta::OptimizationConfig] + # Optional. Configuration for running the optimization step after the + # evaluation run. If not set, the optimization step will not be run. + # @!attribute [r] scheduled_evaluation_run + # @return [::String] + # Output only. The scheduled evaluation run resource name that created this + # evaluation run. This field is only set if the evaluation run was created + # by a scheduled evaluation run. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}` + # @!attribute [r] golden_run_method + # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod] + # Output only. The method used to run the evaluation. + # @!attribute [r] operation + # @return [::String] + # Output only. The operation that created this evaluation run. + # Format: + # `projects/{project}/locations/{location}/operations/{operation}` + class EvaluationRun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The progress of the evaluation run. + # @!attribute [r] total_count + # @return [::Integer] + # Output only. Total number of evaluation results in this run. + # @!attribute [r] failed_count + # @return [::Integer] + # Output only. Number of completed evaluation results with an outcome of + # FAIL. (EvaluationResult.execution_state is COMPLETED and + # EvaluationResult.evaluation_status is FAIL). + # @!attribute [r] error_count + # @return [::Integer] + # Output only. Number of evaluation results that failed to execute. + # (EvaluationResult.execution_state is ERROR). + # @!attribute [r] completed_count + # @return [::Integer] + # Output only. Number of evaluation results that finished successfully. + # (EvaluationResult.execution_state is COMPLETED). + # @!attribute [r] passed_count + # @return [::Integer] + # Output only. Number of completed evaluation results with an outcome of + # PASS. (EvaluationResult.execution_state is COMPLETED and + # EvaluationResult.evaluation_status is PASS). + # @!attribute [r] cancelled_count + # @return [::Integer] + # Output only. Number of evaluation results that were cancelled. + # (EvaluationResult.execution_state is CANCELLED). + class Progress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains the summary of passed and failed result counts for a specific + # evaluation in an evaluation run. + # @!attribute [r] passed_count + # @return [::Integer] + # Output only. Number of passed results for the associated Evaluation in + # this run. + # @!attribute [r] failed_count + # @return [::Integer] + # Output only. Number of failed results for the associated Evaluation in + # this run. + # @!attribute [r] error_count + # @return [::Integer] + # Output only. Number of error results for the associated Evaluation in + # this run. + class EvaluationRunSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationRunSummary] + class EvaluationRunSummariesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the evaluations in this run. + # Additional values may be added in the future. + module EvaluationType + # Evaluation type is not specified. + EVALUATION_TYPE_UNSPECIFIED = 0 + + # Golden evaluation. + GOLDEN = 1 + + # Scenario evaluation. + SCENARIO = 2 + + # Indicates the run includes a mix of golden and scenario evaluations. + MIXED = 3 + end + + # The state of the evaluation run. + module EvaluationRunState + # Evaluation run state is not specified. + EVALUATION_RUN_STATE_UNSPECIFIED = 0 + + # Indicates the evaluation run is queued. + QUEUED = 5 + + # Evaluation run is running. + RUNNING = 1 + + # Evaluation run has completed. + COMPLETED = 2 + + # The evaluation run has an error. + ERROR = 3 + + # Evaluation run was cancelled. + CANCELLED = 4 + end + end + + # Latency report for the evaluation run. + # @!attribute [r] tool_latencies + # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::ToolLatency>] + # Output only. Unordered list. Latency metrics for each tool. + # @!attribute [r] callback_latencies + # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::CallbackLatency>] + # Output only. Unordered list. Latency metrics for each callback. + # @!attribute [r] guardrail_latencies + # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::GuardrailLatency>] + # Output only. Unordered list. Latency metrics for each guardrail. + # @!attribute [r] llm_call_latencies + # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::LlmCallLatency>] + # Output only. Unordered list. Latency metrics for each LLM call. + # @!attribute [r] session_count + # @return [::Integer] + # Output only. The total number of sessions considered in the latency report. + class LatencyReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Latency metrics for a component. + # @!attribute [r] p50_latency + # @return [::Google::Protobuf::Duration] + # Output only. The 50th percentile latency. + # @!attribute [r] p90_latency + # @return [::Google::Protobuf::Duration] + # Output only. The 90th percentile latency. + # @!attribute [r] p99_latency + # @return [::Google::Protobuf::Duration] + # Output only. The 99th percentile latency. + # @!attribute [r] call_count + # @return [::Integer] + # Output only. The number of times the resource was called. + class LatencyMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Latency metrics for a single tool. + # @!attribute [r] tool + # @return [::String] + # Output only. Format: + # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}`. + # + # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] toolset_tool + # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] + # Output only. The toolset tool identifier. + # + # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] tool_display_name + # @return [::String] + # Output only. The display name of the tool. + # @!attribute [r] latency_metrics + # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics] + # Output only. The latency metrics for the tool. + class ToolLatency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Latency metrics for a single callback. + # @!attribute [r] stage + # @return [::String] + # Output only. The stage of the callback. + # @!attribute [r] latency_metrics + # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics] + # Output only. The latency metrics for the callback. + class CallbackLatency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Latency metrics for a single guardrail. + # @!attribute [r] guardrail + # @return [::String] + # Output only. The name of the guardrail. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}`. + # @!attribute [r] guardrail_display_name + # @return [::String] + # Output only. The display name of the guardrail. + # @!attribute [r] latency_metrics + # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics] + # Output only. The latency metrics for the guardrail. + class GuardrailLatency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Latency metrics for a single LLM call. + # @!attribute [r] model + # @return [::String] + # Output only. The name of the model. + # @!attribute [r] latency_metrics + # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics] + # Output only. The latency metrics for the LLM call. + class LlmCallLatency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An evaluation expectation represents a specific criteria to evaluate against. + # @!attribute [rw] llm_criteria + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation::LlmCriteria] + # Optional. Evaluation criteria based on an LLM prompt. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of this evaluation expectation. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}` + # @!attribute [rw] display_name + # @return [::String] + # Required. User-defined display name. Must be unique within the app. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Optional. User-defined tags for expectations. Can be used to filter + # expectations. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the evaluation expectation was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the evaluation expectation was last updated. + # @!attribute [r] etag + # @return [::String] + # Output only. Etag used to ensure the object hasn't changed during a + # read-modify-write operation. If the etag is empty, the update will + # overwrite any concurrent changes. + class EvaluationExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for LLM-based evaluation criteria. + # @!attribute [rw] prompt + # @return [::String] + # Required. The prompt/instructions provided to the LLM judge. + class LlmCriteria + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # EvaluationConfig configures settings for running the evaluation. + # @!attribute [rw] input_audio_config + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::InputAudioConfig] + # Optional. Configuration for processing the input audio. + # @!attribute [rw] output_audio_config + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::OutputAudioConfig] + # Optional. Configuration for generating the output audio. + # @!attribute [rw] evaluation_channel + # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig::EvaluationChannel] + # Optional. The channel to evaluate. + # @!attribute [rw] tool_call_behaviour + # @return [::Google::Cloud::Ces::V1beta::EvaluationToolCallBehaviour] + # Optional. Specifies whether the evaluation should use real tool calls or + # fake tools. + class EvaluationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The channel to evaluate. + module EvaluationChannel + # Unspecified evaluation channel. + EVALUATION_CHANNEL_UNSPECIFIED = 0 + + # Text-only evaluation channel. + TEXT = 1 + + # Audio evaluation channel. + AUDIO = 2 + end + end + + # Information about an error encountered during an evaluation execution. + # @!attribute [r] error_type + # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo::ErrorType] + # Output only. The type of error. + # @!attribute [r] error_message + # @return [::String] + # Output only. The error message. + # @!attribute [r] session_id + # @return [::String] + # Output only. The session ID for the conversation that caused the error. + # @!attribute [r] user_facing_error_message + # @return [::String] + # Output only. The user facing error message. + class EvaluationErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of error + module ErrorType + # Unspecified error type. + ERROR_TYPE_UNSPECIFIED = 0 + + # Failure during runtime execution. + RUNTIME_FAILURE = 1 + + # Failure to retrieve conversation from CES Runtime. + CONVERSATION_RETRIEVAL_FAILURE = 2 + + # Failure to calculate a metric / outcome. + METRIC_CALCULATION_FAILURE = 3 + + # Failure to update the evaluation. + EVALUATION_UPDATE_FAILURE = 4 + + # Ran out of quota. + QUOTA_EXHAUSTED = 5 + + # Failure during user simulation. + USER_SIMULATION_FAILURE = 6 + end + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation EvaluationService.RunEvaluation}. + # @!attribute [rw] app + # @return [::String] + # Required. The app to evaluate. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] evaluations + # @return [::Array<::String>] + # Optional. List of evaluations to run. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @!attribute [rw] evaluation_dataset + # @return [::String] + # Optional. An evaluation dataset to run. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the evaluation run. + # @!attribute [rw] app_version + # @return [::String] + # Optional. The app version to evaluate. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # @!attribute [rw] config + # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig] + # Optional. The configuration to use for the run. + # @!attribute [rw] run_count + # @return [::Integer] + # Optional. The number of times to run the evaluation. If not set, the + # default value is 1 per golden, and 5 per scenario. + # @!attribute [rw] persona_run_configs + # @return [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig>] + # Optional. The configuration to use for the run per persona. + # @!attribute [rw] optimization_config + # @return [::Google::Cloud::Ces::V1beta::OptimizationConfig] + # Optional. Configuration for running the optimization step after the + # evaluation run. If not set, the optimization step will not be run. + # @!attribute [rw] scheduled_evaluation_run + # @return [::String] + # Optional. The resource name of the `ScheduledEvaluationRun` that is + # triggering this evaluation run. + # + # If this field is set, the `scheduled_evaluation_run` field on the created + # `EvaluationRun` resource will be populated from this value. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}` + # @!attribute [rw] golden_run_method + # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod] + # Optional. The method to run the evaluation if it is a golden evaluation. If + # not set, default to STABLE. + # @!attribute [rw] generate_latency_report + # @return [::Boolean] + # Optional. Whether to generate a latency report for the evaluation run. + class RunEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a scheduled evaluation run configuration. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the scheduled evaluation run config. + # Format: + # projects/\\{projectId}/locations/\\{locationId}/apps/\\{appId}/scheduledEvaluationRuns/\\{scheduledEvaluationRunId} + # @!attribute [rw] display_name + # @return [::String] + # Required. User-defined display name of the scheduled evaluation run config. + # @!attribute [rw] request + # @return [::Google::Cloud::Ces::V1beta::RunEvaluationRequest] + # Required. The RunEvaluationRequest to schedule + # @!attribute [rw] description + # @return [::String] + # Optional. User-defined description of the scheduled evaluation run. + # @!attribute [rw] scheduling_config + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun::SchedulingConfig] + # Required. Configuration for the timing and frequency with which to execute + # the evaluations. + # @!attribute [rw] active + # @return [::Boolean] + # Optional. Whether this config is active + # @!attribute [r] last_completed_run + # @return [::String] + # Output only. The last successful EvaluationRun of this scheduled execution. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}` + # @!attribute [r] total_executions + # @return [::Integer] + # Output only. The total number of times this run has been executed + # @!attribute [r] next_scheduled_execution_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The next time this is scheduled to execute + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the scheduled evaluation run was created. + # @!attribute [r] created_by + # @return [::String] + # Output only. The user who created the scheduled evaluation run. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the evaluation was last updated. + # @!attribute [r] last_updated_by + # @return [::String] + # Output only. The user who last updated the evaluation. + # @!attribute [r] etag + # @return [::String] + # Output only. Etag used to ensure the object hasn't changed during a + # read-modify-write operation. If the etag is empty, the update will + # overwrite any concurrent changes. + class ScheduledEvaluationRun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Eval scheduling configuration details + # @!attribute [rw] frequency + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun::SchedulingConfig::Frequency] + # Required. The frequency with which to run the eval + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Required. Timestamp when the eval should start. + # @!attribute [rw] days_of_week + # @return [::Array<::Integer>] + # Optional. The days of the week to run the eval. Applicable only for + # Weekly and Biweekly frequencies. 1 is Monday, 2 is Tuesday, ..., 7 is + # Sunday. + class SchedulingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The frequencies evals can be run at + module Frequency + # The frequency is unspecified. + FREQUENCY_UNSPECIFIED = 0 + + # Indicates a one-time scheduled run that should not repeat + NONE = 1 + + # Run the evaluation daily. + DAILY = 2 + + # Run the evaluation weekly. + WEEKLY = 3 + + # Run the evaluation biweekly. + BIWEEKLY = 4 + end + end + end + + # Configuration for running an evaluation for a specific persona. + # @!attribute [rw] persona + # @return [::String] + # Optional. The persona to use for the evaluation. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationPersonas/{evaluationPersona}` + # @!attribute [rw] task_count + # @return [::Integer] + # Optional. The number of tasks to run for the persona. + class PersonaRunConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for running the optimization step after the evaluation run. + # @!attribute [rw] generate_loss_report + # @return [::Boolean] + # Optional. Whether to generate a loss report. + # @!attribute [r] assistant_session + # @return [::String] + # Output only. The assistant session to use for the optimization based on + # this evaluation run. Format: + # `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistantSession}` + # @!attribute [r] report_summary + # @return [::String] + # Output only. The summary of the loss report. + # @!attribute [r] should_suggest_fix + # @return [::Boolean] + # Output only. Whether to suggest a fix for the losses. + # @!attribute [r] status + # @return [::Google::Cloud::Ces::V1beta::OptimizationConfig::OptimizationStatus] + # Output only. The status of the optimization run. + # @!attribute [r] error_message + # @return [::String] + # Output only. The error message if the optimization run failed. + # @!attribute [r] loss_report + # @return [::Google::Protobuf::Struct] + # Output only. The generated loss report. + class OptimizationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The status of the optimization run. + module OptimizationStatus + # Optimization status is not specified. + OPTIMIZATION_STATUS_UNSPECIFIED = 0 + + # Optimization is running. + RUNNING = 1 + + # Optimization has completed. + COMPLETED = 2 + + # Optimization failed due to an internal error. + ERROR = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb new file mode 100644 index 000000000000..28d57dfe8d6e --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb @@ -0,0 +1,151 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Configures the metrics for an evaluation. + # @!attribute [rw] golden_metrics_config + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::GoldenMetricsConfig] + # Optional. Configuration for the golden metrics for the evaluation. + # @!attribute [rw] scenario_metrics_config + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::ScenarioMetricsConfig] + # Optional. Configuration for the scenario metrics for the evaluation. + class EvaluationMetricsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for similarity metrics for the evaluation. + # To disable the metric, set the message but do not set the + # `enable_semantic_similarity_metrics` field to true (or explicitly set it to + # false). To unset the configuration and fallback to the default behavior, + # omit the message entirely. + # @!attribute [rw] enable_semantic_similarity_metrics + # @return [::Boolean] + # Optional. Whether to calculate semantic similarity metrics for the + # evaluation. + class SemanticSimilarityMetricsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for correctness metrics for the evaluation. + # To disable the metric, set the message but do not set the + # `enable_tool_correctness_metrics` field to true (or explicitly set it to + # false). To unset the configuration and fallback to the default behavior, + # omit the message entirely. + # @!attribute [rw] enable_tool_correctness_metrics + # @return [::Boolean] + # Optional. Whether to calculate tool correctness metrics for the + # evaluation. + class ToolCorrectnessMetricsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for the hallucination metrics for the evaluation. + # To disable the metric, set the message but do not set the + # `enable_hallucination_metrics` field to true (or explicitly set it to + # false). To unset the configuration and fallback to the default behavior, + # omit the message entirely. + # @!attribute [rw] enable_hallucination_metrics + # @return [::Boolean] + # Optional. Whether to calculate hallucination metrics for the evaluation. + class HallucinationMetricsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for the user goal met metrics for the evaluation. + # To disable the metric, set the message but do not set the + # `enable_user_goal_met_metrics` field to true (or explicitly set it to + # false). To unset the configuration and fallback to the default behavior, + # omit the message entirely. + # @!attribute [rw] enable_user_goal_met_metrics + # @return [::Boolean] + # Optional. Whether to calculate the user goal met metrics for the + # evaluation. + class UserGoalMetMetricsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for the expectation level metrics for the evaluation. + # To disable the metric, set the message but do not set the + # `enable_expectations_met_metrics` field to true (or explicitly set it to + # false). To unset the configuration and fallback to the default behavior, + # omit the message entirely. + # @!attribute [rw] enable_expectations_met_metrics + # @return [::Boolean] + # Optional. Whether to calculate the expectation level metrics for the + # evaluation. + class ExpectationsMetMetricsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for the golden metrics for the evaluation. + # @!attribute [rw] semantic_similarity_metrics_config + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::SemanticSimilarityMetricsConfig] + # Optional. Global configuration for semantic similarity metrics. + # @!attribute [rw] tool_correctness_metrics_config + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::ToolCorrectnessMetricsConfig] + # Optional. Configuration for turn level tool correctness metrics. + # @!attribute [rw] step_tool_correctness_metrics_config + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::ToolCorrectnessMetricsConfig] + # Optional. Configuration for step level tool correctness metrics. + class GoldenMetricsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for the scenario metrics for the evaluation. + # @!attribute [rw] user_goal_met_metrics_config + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::UserGoalMetMetricsConfig] + # Optional. Configuration for user goal met metrics. + # @!attribute [rw] expectations_met_metrics_config + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::ExpectationsMetMetricsConfig] + # Optional. Configuration for expectation level metrics. + class ScenarioMetricsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Supported comparison types for checking the agent's response. + module ComparisonType + # Unspecified comparison type. Behavior defaults to SEMANTIC_SIMILARITY + # for agent responses and tool calls. + COMPARISON_TYPE_UNSPECIFIED = 0 + + # Exact string match. + EQUALS = 1 + + # Substring match (checks if the expected string is contained in the + # actual response). + CONTAINS = 2 + + # Semantic similarity match (evaluates meaning similarity using an LLM). + SEMANTIC_SIMILARITY = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb new file mode 100644 index 000000000000..b828bab0506a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb @@ -0,0 +1,1087 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics EvaluationService.RunEvaluationResultMetrics}. + # @!attribute [rw] evaluation_result_id + # @return [::String] + # Required. The evaluation result to run metrics for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}` + class RunEvaluationResultMetricsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics EvaluationService.RunEvaluationResultMetrics}. + # @!attribute [r] status + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] + # Output only. The status of the evaluation result metrics calculation. + class RunEvaluationResultMetricsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation EvaluationService.RunEvaluation}. + # @!attribute [rw] evaluation_run + # @return [::String] + # The name of the evaluation run that was created. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}` + class RunEvaluationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation metadata for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation EvaluationService.RunEvaluation}. + # @!attribute [r] evaluations + # @return [::Array<::String>] + # Output only. The list of evaluations that were run. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @!attribute [r] evaluation_run + # @return [::String] + # Output only. The evaluation run that was created. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}` + # @!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 completed. + # @!attribute [r] verb + # @return [::String] + # Output only. The verb of the operation. + # @!attribute [r] cancel_requested + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation of the + # operation. Operations that have been cancelled successfully have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, + # corresponding to `Code.CANCELLED`. + class RunEvaluationOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation metadata for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#generate_evaluation EvaluationService.GenerateEvaluation}. + class GenerateEvaluationOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation metadata for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_run EvaluationService.DeleteEvaluationRun}. + class DeleteEvaluationRunOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation EvaluationService.CreateEvaluation}. + # @!attribute [rw] parent + # @return [::String] + # Required. The app to create the evaluation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] evaluation_id + # @return [::String] + # Optional. The ID to use for the evaluation, which will become the final + # component of the evaluation's resource name. If not provided, a unique ID + # will be automatically assigned for the evaluation. + # @!attribute [rw] evaluation + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # Required. The evaluation to create. + class CreateEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#generate_evaluation EvaluationService.GenerateEvaluation}. + # @!attribute [rw] conversation + # @return [::String] + # Required. The conversation to create the golden evaluation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` + # @!attribute [rw] source + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Ces::V1beta::Conversation::Source] + # Optional. Indicate the source of the conversation. If not set, all sources + # will be searched. + class GenerateEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations EvaluationService.ImportEvaluations}. + # @!attribute [rw] conversation_list + # @return [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ConversationList] + # The conversations to import the evaluations from. + # + # Note: The following fields are mutually exclusive: `conversation_list`, `gcs_uri`, `csv_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs_uri + # @return [::String] + # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + # from which to import evaluations. The format of this URI must be + # `gs:///`. + # + # Note: The following fields are mutually exclusive: `gcs_uri`, `conversation_list`, `csv_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] csv_content + # @return [::String] + # Raw bytes representing the csv file with the evaluations structure. + # + # Note: The following fields are mutually exclusive: `csv_content`, `conversation_list`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The app to import the evaluations into. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] import_options + # @return [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions] + # Optional. Options governing the import process for the evaluations. + class ImportEvaluationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of conversation resource names. + # @!attribute [rw] conversations + # @return [::Array<::String>] + # Optional. Conversation resource names. + class ConversationList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration options for the evaluation import process. + # These options control how the import behaves, particularly when + # conflicts arise with existing evaluations data. + # @!attribute [rw] conflict_resolution_strategy + # @return [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions::ConflictResolutionStrategy] + # Optional. The strategy to use when resolving conflicts during import. + class ImportOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the strategy for handling conflicts when an evaluation with the + # same evaluation ID already exists in the app. + module ConflictResolutionStrategy + # The conflict resolution strategy is unspecified. + CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED = 0 + + # Overwrite the existing evaluation with the new one. + OVERWRITE = 1 + + # Keep the existing evaluation and skip the new one. + SKIP = 2 + + # Keep the existing evaluation and duplicate the new one as a new + # evaluation. + DUPLICATE = 3 + end + end + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations EvaluationService.ImportEvaluations}. + # @!attribute [rw] evaluations + # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation>] + # The list of evaluations that were imported into the app. + # @!attribute [rw] evaluation_results + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult>] + # The list of evaluation results that were imported into the app. + # @!attribute [rw] evaluation_runs + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationRun>] + # The list of evaluation runs that were imported into the app. + # @!attribute [rw] error_messages + # @return [::Array<::String>] + # Optional. A list of error messages associated with evaluations that failed + # to be imported. + # @!attribute [rw] import_failure_count + # @return [::Integer] + # The number of evaluations that either failed to import entirely or + # completed import with one or more errors. + # @!attribute [rw] evaluation_result_import_failure_count + # @return [::Integer] + # The number of evaluation results that either failed to import entirely or + # completed import with one or more errors. + # @!attribute [rw] evaluation_run_import_failure_count + # @return [::Integer] + # The number of evaluation runs that either failed to import entirely or + # completed import with one or more errors. + class ImportEvaluationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations EvaluationService.ImportEvaluations}. + # @!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] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + class ImportEvaluationsOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_dataset EvaluationService.CreateEvaluationDataset}. + # @!attribute [rw] parent + # @return [::String] + # Required. The app to create the evaluation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] evaluation_dataset_id + # @return [::String] + # Optional. The ID to use for the evaluation dataset, which will become the + # final component of the evaluation dataset's resource name. If not provided, + # a unique ID will be automatically assigned for the evaluation. + # @!attribute [rw] evaluation_dataset + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # Required. The evaluation dataset to create. + class CreateEvaluationDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation EvaluationService.UpdateEvaluation}. + # @!attribute [rw] evaluation + # @return [::Google::Cloud::Ces::V1beta::Evaluation] + # Required. The evaluation to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_dataset EvaluationService.UpdateEvaluationDataset}. + # @!attribute [rw] evaluation_dataset + # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] + # Required. The evaluation dataset to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateEvaluationDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation EvaluationService.DeleteEvaluation}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the evaluation to delete. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. Indicates whether to forcefully delete the evaluation, even if it + # is still referenced by evaluation datasets. + # + # * If `force = false`, the deletion will fail if any datasets still + # reference the evaluation. + # * If `force = true`, all existing references from datasets will be removed + # and the evaluation will be deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the evaluation. If an etag is not provided, + # the deletion will overwrite any concurrent changes. If an etag is provided + # and does not match the current etag of the evaluation, deletion will be + # blocked and an ABORTED error will be returned. + class DeleteEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_result EvaluationService.DeleteEvaluationResult}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the evaluation result to delete. + class DeleteEvaluationResultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_dataset EvaluationService.DeleteEvaluationDataset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the evaluation dataset to delete. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the evaluation dataset. If an etag is not + # provided, the deletion will overwrite any concurrent changes. If an etag is + # provided and does not match the current etag of the evaluation dataset, + # deletion will be blocked and an ABORTED error will be returned. + class DeleteEvaluationDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_run EvaluationService.DeleteEvaluationRun}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the evaluation run to delete. + class DeleteEvaluationRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation EvaluationService.GetEvaluation}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the evaluation to retrieve. + class GetEvaluationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_result EvaluationService.GetEvaluationResult}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the evaluation result to retrieve. + class GetEvaluationResultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_dataset EvaluationService.GetEvaluationDataset}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the evaluation dataset to retrieve. + class GetEvaluationDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_run EvaluationService.GetEvaluationRun}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the evaluation run to retrieve. + class GetEvaluationRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list evaluations from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations} + # call. + # @!attribute [rw] filter + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. Deprecated: Use evaluation_filter and evaluation_run_filter + # instead. + # @!attribute [rw] evaluation_filter + # @return [::String] + # Optional. Filter to be applied on the evaluation when listing the + # evaluations. See https://google.aip.dev/160 for more details. Supported + # fields: evaluation_datasets + # @!attribute [rw] evaluation_run_filter + # @return [::String] + # Optional. Filter string for fields on the associated EvaluationRun + # resources. See https://google.aip.dev/160 for more details. Supported + # fields: create_time, initiated_by, app_version_display_name + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + # @!attribute [rw] last_ten_results + # @return [::Boolean] + # Optional. Whether to include the last 10 evaluation results for each + # evaluation in the response. + class ListEvaluationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the evaluation to list evaluation results + # from. To filter by evaluation run, use `-` as the evaluation ID and specify + # the evaluation run ID in the filter. For example: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/-` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the evaluation results. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + class ListEvaluationResultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list evaluation datasets from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the evaluation datasets. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + class ListEvaluationDatasetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list evaluation runs from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the evaluation runs. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + class ListEvaluationRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations}. + # @!attribute [rw] evaluations + # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation>] + # The list of evaluations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListEvaluationsRequest#page_token ListEvaluationsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListEvaluationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults}. + # @!attribute [rw] evaluation_results + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult>] + # The list of evaluation results. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest#page_token ListEvaluationResultsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListEvaluationResultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets}. + # @!attribute [rw] evaluation_datasets + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationDataset>] + # The list of evaluation datasets. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest#page_token ListEvaluationDatasetsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListEvaluationDatasetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns}. + # @!attribute [rw] evaluation_runs + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationRun>] + # The list of evaluation runs. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest#page_token ListEvaluationRunsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListEvaluationRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_scheduled_evaluation_run EvaluationService.CreateScheduledEvaluationRun}. + # @!attribute [rw] parent + # @return [::String] + # Required. The app to create the scheduled evaluation run for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] scheduled_evaluation_run_id + # @return [::String] + # Optional. The ID to use for the scheduled evaluation run, which will become + # the final component of the scheduled evaluation run's resource name. If not + # provided, a unique ID will be automatically assigned. + # @!attribute [rw] scheduled_evaluation_run + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # Required. The scheduled evaluation run to create. + class CreateScheduledEvaluationRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_scheduled_evaluation_run EvaluationService.GetScheduledEvaluationRun}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the scheduled evaluation run to retrieve. + class GetScheduledEvaluationRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list scheduled evaluation runs + # from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the scheduled evaluation runs. + # See https://google.aip.dev/160 for more details. + # Currently supports filtering by: + # * request.evaluations:evaluation_id + # * request.evaluation_dataset:evaluation_dataset_id + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Supported fields are: + # "name" (ascending), "create_time" (descending), "update_time" (descending), + # "next_scheduled_execution" (ascending), and + # "last_completed_run.create_time" (descending). + # If not included, "update_time" will be the default. + # See https://google.aip.dev/132#ordering for more details. + class ListScheduledEvaluationRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns}. + # @!attribute [rw] scheduled_evaluation_runs + # @return [::Array<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>] + # The list of scheduled evaluation runs. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest#page_token ListScheduledEvaluationRunsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListScheduledEvaluationRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_scheduled_evaluation_run EvaluationService.UpdateScheduledEvaluationRun}. + # @!attribute [rw] scheduled_evaluation_run + # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] + # Required. The scheduled evaluation run to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateScheduledEvaluationRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_scheduled_evaluation_run EvaluationService.DeleteScheduledEvaluationRun}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the scheduled evaluation run to delete. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the ScheduledEvaluationRun. + # If provided, it must match the server's etag. + class DeleteScheduledEvaluationRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#test_persona_voice EvaluationService.TestPersonaVoice}. + # @!attribute [rw] app + # @return [::String] + # Required. the resource name of the app to test the persona voice for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] persona_id + # @return [::String] + # Required. The persona ID to test the voice for. Also accepts "default". + # @!attribute [rw] text + # @return [::String] + # Required. The text to test the voice for. + class TestPersonaVoiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#upload_evaluation_audio EvaluationService.UploadEvaluationAudio}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Evaluation for which to upload the + # evaluation audio. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @!attribute [rw] audio_content + # @return [::String] + # Required. The raw audio bytes. + # The format of the audio must be single-channel LINEAR16 with a sample + # rate of 16kHz (default InputAudioConfig). + # @!attribute [rw] previous_audio_gcs_uri + # @return [::String] + # Optional. The Google Cloud Storage URI of the previously uploaded audio + # file to be deleted. Format: `gs:///` + class UploadEvaluationAudioRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#upload_evaluation_audio EvaluationService.UploadEvaluationAudio}. + # @!attribute [rw] audio_gcs_uri + # @return [::String] + # The Google Cloud Storage URI where the uploaded audio file is stored. + # Format: `gs:///` + # @!attribute [rw] transcript + # @return [::String] + # The transcript of the audio, generated by Cloud Speech-to-Text. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # The duration of the audio. + class UploadEvaluationAudioResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#test_persona_voice EvaluationService.TestPersonaVoice}. + # @!attribute [rw] audio + # @return [::String] + # The audio data bytes of the synthesized voice. + class TestPersonaVoiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_expectation EvaluationService.CreateEvaluationExpectation}. + # @!attribute [rw] parent + # @return [::String] + # Required. The app to create the evaluation expectation for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] evaluation_expectation_id + # @return [::String] + # Optional. The ID to use for the evaluation expectation, which will become + # the final component of the evaluation expectation's resource name. If not + # provided, a unique ID will be automatically assigned for the evaluation + # expectation. + # @!attribute [rw] evaluation_expectation + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # Required. The evaluation expectation to create. + class CreateEvaluationExpectationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_expectation EvaluationService.UpdateEvaluationExpectation}. + # @!attribute [rw] evaluation_expectation + # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] + # Required. The evaluation expectation to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to control which fields get updated. If the + # mask is not present, all fields will be updated. + class UpdateEvaluationExpectationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_expectation EvaluationService.DeleteEvaluationExpectation}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the evaluation expectation to delete. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the evaluation expectation. If an etag is not + # provided, the deletion will overwrite any concurrent changes. If an etag is + # provided and does not match the current etag of the evaluation expectation, + # deletion will be blocked and an ABORTED error will be returned. + class DeleteEvaluationExpectationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_expectation EvaluationService.GetEvaluationExpectation}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the evaluation expectation to retrieve. + class GetEvaluationExpectationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to list evaluation expectations + # from. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The + # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse#next_page_token next_page_token} + # value returned from a previous list + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter to be applied when listing the evaluation expectations. + # See https://google.aip.dev/160 for more details. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to sort by. Only "name" and "create_time", and + # "update_time" are supported. Time fields are ordered in descending order, + # and the name field is ordered in ascending order. If not included, + # "update_time" will be the default. See https://google.aip.dev/132#ordering + # for more details. + class ListEvaluationExpectationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations}. + # @!attribute [rw] evaluation_expectations + # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationExpectation>] + # The list of evaluation expectations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as + # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest#page_token ListEvaluationExpectationsRequest.page_token} + # to retrieve the next page. Absence of this field indicates there are no + # subsequent pages. + class ListEvaluationExpectationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options for exporting CES evaluation resources. + # @!attribute [rw] export_format + # @return [::Google::Cloud::Ces::V1beta::ExportOptions::ExportFormat] + # Optional. The format to export the evaluation results in. Defaults to JSON + # if not specified. + # @!attribute [rw] gcs_uri + # @return [::String] + # Optional. The Google Cloud Storage URI to write the exported Evaluation + # Results to. + class ExportOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The format to export the items in. Defaults to JSON if not + # specified. + module ExportFormat + # Unspecified format. + EXPORT_FORMAT_UNSPECIFIED = 0 + + # JSON format. + JSON = 1 + + # YAML format. + YAML = 2 + end + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluations EvaluationService.ExportEvaluations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to export evaluations from. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The resource names of the evaluations to export. + # @!attribute [rw] export_options + # @return [::Google::Cloud::Ces::V1beta::ExportOptions] + # Optional. The export options for the evaluations. + # @!attribute [rw] include_evaluation_results + # @return [::Boolean] + # Optional. Includes evaluation results in the export. At least one of + # include_evaluation_results or include_evaluations must be set. + # @!attribute [rw] include_evaluations + # @return [::Boolean] + # Optional. Includes evaluations in the export. At least one of + # include_evaluation_results or include_evaluations must be set. + class ExportEvaluationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluations EvaluationService.ExportEvaluations}. + # @!attribute [rw] evaluations_content + # @return [::String] + # The content of the exported Evaluations. This will be populated if + # gcs_uri was not specified in the request. + # + # Note: The following fields are mutually exclusive: `evaluations_content`, `evaluations_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] evaluations_uri + # @return [::String] + # The Google Cloud Storage URI folder where the exported evaluations were + # written. This will be populated if gcs_uri was specified in the request. + # + # Note: The following fields are mutually exclusive: `evaluations_uri`, `evaluations_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] failed_evaluations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. A map of evaluation resource names that could not be exported, + # to the reason why they failed. + class ExportEvaluationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class FailedEvaluationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results EvaluationService.ExportEvaluationResults}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the evaluation to export evaluation results + # from. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The resource names of the evaluation results to export. + # @!attribute [rw] export_options + # @return [::Google::Cloud::Ces::V1beta::ExportOptions] + # Optional. The export options for the evaluation results. + class ExportEvaluationResultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results EvaluationService.ExportEvaluationResults}. + # @!attribute [rw] evaluation_results_content + # @return [::String] + # The content of the exported Evaluation Results. This will be populated if + # gcs_uri was not specified in the request. + # + # Note: The following fields are mutually exclusive: `evaluation_results_content`, `evaluation_results_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] evaluation_results_uri + # @return [::String] + # The Google Cloud Storage URI folder where the exported Evaluation Results + # were written. This will be populated if gcs_uri was specified in the + # request. + # + # Note: The following fields are mutually exclusive: `evaluation_results_uri`, `evaluation_results_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExportEvaluationResultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs EvaluationService.ExportEvaluationRuns}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to export evaluation runs from. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The resource names of the evaluation runs to export. + # @!attribute [rw] export_options + # @return [::Google::Cloud::Ces::V1beta::ExportOptions] + # Optional. The export options for the evaluation runs. + class ExportEvaluationRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs EvaluationService.ExportEvaluationRuns}. + # @!attribute [rw] evaluation_runs_content + # @return [::String] + # The content of the exported Evaluation Runs. This will be populated if + # gcs_uri was not specified in the request. + # + # Note: The following fields are mutually exclusive: `evaluation_runs_content`, `evaluation_runs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] evaluation_runs_uri + # @return [::String] + # The Google Cloud Storage URI folder where the exported Evaluation Runs + # were written. This will be populated if gcs_uri was specified in the + # request. + # + # Note: The following fields are mutually exclusive: `evaluation_runs_uri`, `evaluation_runs_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExportEvaluationRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation metadata for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs EvaluationService.ExportEvaluationRuns}. + class ExportEvaluationRunsOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation metadata for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results EvaluationService.ExportEvaluationResults}. + class ExportEvaluationResultsOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation metadata for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics EvaluationService.RunEvaluationResultMetrics}. + class RunEvaluationResultMetricsOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/example.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/example.rb new file mode 100644 index 000000000000..d2ed898bb82e --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/example.rb @@ -0,0 +1,245 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # An example represents a sample conversation between the user and the + # agent(s). + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the example. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/examples/{example}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the example. + # @!attribute [rw] description + # @return [::String] + # Optional. Human-readable description of the example. + # @!attribute [rw] entry_agent + # @return [::String] + # Optional. The agent that initially handles the conversation. If not + # specified, the example represents a conversation that is handled by the + # root agent. Format: + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # @!attribute [rw] messages + # @return [::Array<::Google::Cloud::Ces::V1beta::Message>] + # Optional. The collection of messages that make up the conversation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the example was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the example was last updated. + # @!attribute [r] invalid + # @return [::Boolean] + # Output only. The example may become invalid if referencing resources are + # deleted. Invalid examples will not be used as few-shot examples. + # @!attribute [rw] etag + # @return [::String] + # Etag used to ensure the object hasn't changed during a read-modify-write + # operation. If the etag is empty, the update will overwrite any concurrent + # changes. + class Example + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message within a conversation. + # @!attribute [rw] role + # @return [::String] + # Optional. The role within the conversation, e.g., user, agent. + # @!attribute [rw] chunks + # @return [::Array<::Google::Cloud::Ces::V1beta::Chunk>] + # Optional. Content of the message as a series of chunks. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Timestamp when the message was sent or received. Should not be + # used if the message is part of an + # {::Google::Cloud::Ces::V1beta::Example example}. + class Message + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A chunk of content within a message. + # @!attribute [rw] text + # @return [::String] + # Optional. Text data. + # + # Note: The following fields are mutually exclusive: `text`, `transcript`, `blob`, `payload`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] transcript + # @return [::String] + # Optional. Transcript associated with the audio. + # + # Note: The following fields are mutually exclusive: `transcript`, `text`, `blob`, `payload`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] blob + # @return [::Google::Cloud::Ces::V1beta::Blob] + # Optional. Blob data. + # + # Note: The following fields are mutually exclusive: `blob`, `text`, `transcript`, `payload`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] payload + # @return [::Google::Protobuf::Struct] + # Optional. Custom payload data. + # + # Note: The following fields are mutually exclusive: `payload`, `text`, `transcript`, `blob`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image + # @return [::Google::Cloud::Ces::V1beta::Image] + # Optional. Image data. + # + # Note: The following fields are mutually exclusive: `image`, `text`, `transcript`, `blob`, `payload`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tool_call + # @return [::Google::Cloud::Ces::V1beta::ToolCall] + # Optional. Tool execution request. + # + # Note: The following fields are mutually exclusive: `tool_call`, `text`, `transcript`, `blob`, `payload`, `image`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tool_response + # @return [::Google::Cloud::Ces::V1beta::ToolResponse] + # Optional. Tool execution response. + # + # Note: The following fields are mutually exclusive: `tool_response`, `text`, `transcript`, `blob`, `payload`, `image`, `tool_call`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] agent_transfer + # @return [::Google::Cloud::Ces::V1beta::AgentTransfer] + # Optional. Agent transfer event. + # + # Note: The following fields are mutually exclusive: `agent_transfer`, `text`, `transcript`, `blob`, `payload`, `image`, `tool_call`, `tool_response`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] updated_variables + # @return [::Google::Protobuf::Struct] + # A struct represents variables that were updated in the conversation, + # keyed by variable names. + # + # Note: The following fields are mutually exclusive: `updated_variables`, `text`, `transcript`, `blob`, `payload`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] default_variables + # @return [::Google::Protobuf::Struct] + # A struct represents default variables at the start of the conversation, + # keyed by variable names. + # + # Note: The following fields are mutually exclusive: `default_variables`, `text`, `transcript`, `blob`, `payload`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Chunk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a blob input or output in the conversation. + # @!attribute [rw] mime_type + # @return [::String] + # Required. The IANA standard MIME type of the source data. + # @!attribute [rw] data + # @return [::String] + # Required. Raw bytes of the blob. + class Blob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an image input or output in the conversation. + # @!attribute [rw] mime_type + # @return [::String] + # Required. The IANA standard MIME type of the source data. + # Supported image types includes: + # * image/png + # * image/jpeg + # * image/webp + # @!attribute [rw] data + # @return [::String] + # Required. Raw bytes of the image. + class Image + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the client or the agent to execute the specified tool. + # @!attribute [rw] tool + # @return [::String] + # Optional. The name of the tool to execute. + # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # + # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] toolset_tool + # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] + # Optional. The toolset tool to execute. + # + # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # Optional. The unique identifier of the tool call. If populated, the client + # should return the execution result with the matching ID in + # {::Google::Cloud::Ces::V1beta::ToolResponse#id ToolResponse}. + # @!attribute [r] display_name + # @return [::String] + # Output only. Display name of the tool. + # @!attribute [rw] args + # @return [::Google::Protobuf::Struct] + # Optional. The input parameters and values for the tool in JSON object + # format. + class ToolCall + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The execution result of a specific tool from the client or the agent. + # @!attribute [rw] tool + # @return [::String] + # Optional. The name of the tool to execute. + # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # + # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] toolset_tool + # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] + # Optional. The toolset tool that got executed. + # + # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # Optional. The matching ID of the [tool + # call][google.cloud.ces.v1beta.ToolCall] the response is for. + # @!attribute [r] display_name + # @return [::String] + # Output only. Display name of the tool. + # @!attribute [rw] response + # @return [::Google::Protobuf::Struct] + # Required. The tool execution result in JSON object format. + # Use "output" key to specify tool response and "error" key to specify + # error details (if any). If "output" and "error" keys are not specified, + # then whole "response" is treated as tool execution result. + class ToolResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an event indicating the transfer of a conversation to a different + # agent. + # @!attribute [rw] target_agent + # @return [::String] + # Required. The agent to which the conversation is being transferred. The + # agent will handle the conversation from this point forward. Format: + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # @!attribute [r] display_name + # @return [::String] + # Output only. Display name of the agent. + class AgentTransfer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/fakes.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/fakes.rb new file mode 100644 index 000000000000..c77e12e8fe5c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/fakes.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # A code block to be executed instead of a real tool call. + # @!attribute [rw] python_code + # @return [::String] + # Required. Python code which will be invoked in tool fake mode. + # Expected Python function signature - + # To catch all tool calls: + # def fake_tool_call(tool: Tool, input: dict[str, Any], + # callback_context: CallbackContext) -> Optional[dict[str, Any]]: + # To catch a specific tool call: + # def fake_\\{tool_id}(tool: Tool, input: dict[str, Any], + # callback_context: CallbackContext) -> Optional[dict[str, Any]]: + # If the function returns None, the real tool will be invoked instead. + class CodeBlock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for tool behavior in fake mode. + # @!attribute [rw] code_block + # @return [::Google::Cloud::Ces::V1beta::CodeBlock] + # Optional. Code block which will be executed instead of a real tool call. + # @!attribute [rw] enable_fake_mode + # @return [::Boolean] + # Optional. Whether the tool is using fake mode. + class ToolFakeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configures the tool call behaviour for evaluation runs. + module EvaluationToolCallBehaviour + # Unspecified tool call behavior. Will default to real tool calls. + EVALUATION_TOOL_CALL_BEHAVIOUR_UNSPECIFIED = 0 + + # Use real tool calls. + REAL = 1 + + # Use fake tool calls. + FAKE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_context.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_context.rb new file mode 100644 index 000000000000..5f4590a060d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_context.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Files to be used as context. Files can be provided as raw bytes. + # @!attribute [rw] file_bytes + # @return [::Google::Cloud::Ces::V1beta::FileContext::FileBytes] + # Optional. File provided as raw bytes. + class FileContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # File provided as raw bytes. + # @!attribute [rw] file_name + # @return [::String] + # Required. The name of the file provided as raw bytes. + # @!attribute [rw] mime_type + # @return [::String] + # Required. The IANA standard MIME type of the source data. + # @!attribute [rw] data + # @return [::String] + # Required. Raw bytes of the file. + class FileBytes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_search_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_search_tool.rb new file mode 100644 index 000000000000..2abcd27a5d91 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_search_tool.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # The file search tool allows the agent to search across the files uploaded by + # the app/agent developer. It has presets to give relatively good quality + # search over the uploaded files and summarization of the retrieved results. + # @!attribute [rw] corpus_type + # @return [::Google::Cloud::Ces::V1beta::FileSearchTool::CorpusType] + # Optional. The type of the corpus. Default is FULLY_MANAGED. + # @!attribute [rw] name + # @return [::String] + # Required. The tool name. + # @!attribute [rw] description + # @return [::String] + # Optional. The tool description. + # @!attribute [rw] file_corpus + # @return [::String] + # Optional. The corpus where files are stored. + # Format: + # projects/\\{project}/locations/\\{location}/ragCorpora/\\{rag_corpus} + class FileSearchTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the Vertex RAG corpus. + module CorpusType + # Unspecified corpus type. + CORPUS_TYPE_UNSPECIFIED = 0 + + # The corpus is created and owned by the user. + USER_OWNED = 1 + + # The corpus is created by the agent. + FULLY_MANAGED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/golden_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/golden_run.rb new file mode 100644 index 000000000000..2d07879df239 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/golden_run.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # The method used to run the evaluation. + module GoldenRunMethod + # Run method is not specified. + GOLDEN_RUN_METHOD_UNSPECIFIED = 0 + + # Run the evaluation as stable replay, where each turn is a unique session + # with the previous expected turns injected as context. + STABLE = 1 + + # Run the evaluation as naive replay, where the run is a single + # session with no context injected. + NAIVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/google_search_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/google_search_tool.rb new file mode 100644 index 000000000000..73b98af3c3e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/google_search_tool.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Represents a tool to perform Google web searches for grounding. + # See + # https://cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool#google-search. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the tool. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the tool's purpose. + # @!attribute [rw] context_urls + # @return [::Array<::String>] + # Optional. Content will be fetched directly from these URLs for context and + # grounding. Example: "https://example.com/path.html". A maximum of 20 URLs + # are allowed. + # @!attribute [rw] preferred_domains + # @return [::Array<::String>] + # Optional. Specifies domains to restrict search results to. + # Example: "example.com", "another.site". A maximum of 20 domains can be + # specified. + # @!attribute [rw] exclude_domains + # @return [::Array<::String>] + # Optional. List of domains to be excluded from the search results. + # Example: "example.com". + # A maximum of 2000 domains can be excluded. + # @!attribute [rw] prompt_config + # @return [::Google::Cloud::Ces::V1beta::GoogleSearchTool::PromptConfig] + # Optional. Prompt instructions passed to planner on how the search results + # should be processed for text and voice. + class GoogleSearchTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Prompt settings used by the model when processing or summarizing the + # google search results. + # @!attribute [rw] text_prompt + # @return [::String] + # Optional. Defines the prompt used for the system instructions when + # interacting with the agent in chat conversations. If not set, default + # prompt will be used. + # @!attribute [rw] voice_prompt + # @return [::String] + # Optional. Defines the prompt used for the system instructions when + # interacting with the agent in voice conversations. If not set, default + # prompt will be used. + class PromptConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/guardrail.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/guardrail.rb new file mode 100644 index 000000000000..320e775cc77b --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/guardrail.rb @@ -0,0 +1,324 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Guardrail contains a list of checks and balances to keep the agents safe and + # secure. + # @!attribute [rw] content_filter + # @return [::Google::Cloud::Ces::V1beta::Guardrail::ContentFilter] + # Optional. Guardrail that bans certain content from being used in the + # conversation. + # + # Note: The following fields are mutually exclusive: `content_filter`, `llm_prompt_security`, `llm_policy`, `model_safety`, `code_callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] llm_prompt_security + # @return [::Google::Cloud::Ces::V1beta::Guardrail::LlmPromptSecurity] + # Optional. Guardrail that blocks the conversation if the prompt is + # considered unsafe based on the LLM classification. + # + # Note: The following fields are mutually exclusive: `llm_prompt_security`, `content_filter`, `llm_policy`, `model_safety`, `code_callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] llm_policy + # @return [::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy] + # Optional. Guardrail that blocks the conversation if the LLM response is + # considered violating the policy based on the LLM classification. + # + # Note: The following fields are mutually exclusive: `llm_policy`, `content_filter`, `llm_prompt_security`, `model_safety`, `code_callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] model_safety + # @return [::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety] + # Optional. Guardrail that blocks the conversation if the LLM response is + # considered unsafe based on the model safety settings. + # + # Note: The following fields are mutually exclusive: `model_safety`, `content_filter`, `llm_prompt_security`, `llm_policy`, `code_callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] code_callback + # @return [::Google::Cloud::Ces::V1beta::Guardrail::CodeCallback] + # Optional. Guardrail that potentially blocks the conversation based on the + # result of the callback execution. + # + # Note: The following fields are mutually exclusive: `code_callback`, `content_filter`, `llm_prompt_security`, `llm_policy`, `model_safety`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the guardrail. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the guardrail. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the guardrail. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Whether the guardrail is enabled. + # @!attribute [rw] action + # @return [::Google::Cloud::Ces::V1beta::TriggerAction] + # Optional. Action to take when the guardrail is triggered. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the guardrail was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the guardrail was last updated. + # @!attribute [rw] etag + # @return [::String] + # Etag used to ensure the object hasn't changed during a read-modify-write + # operation. If the etag is empty, the update will overwrite any concurrent + # changes. + class Guardrail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Guardrail that bans certain content from being used in the conversation. + # @!attribute [rw] banned_contents + # @return [::Array<::String>] + # Optional. List of banned phrases. Applies to both user inputs and agent + # responses. + # @!attribute [rw] banned_contents_in_user_input + # @return [::Array<::String>] + # Optional. List of banned phrases. Applies only to user inputs. + # @!attribute [rw] banned_contents_in_agent_response + # @return [::Array<::String>] + # Optional. List of banned phrases. Applies only to agent responses. + # @!attribute [rw] match_type + # @return [::Google::Cloud::Ces::V1beta::Guardrail::ContentFilter::MatchType] + # Required. Match type for the content filter. + # @!attribute [rw] disregard_diacritics + # @return [::Boolean] + # Optional. If true, diacritics are ignored during matching. + class ContentFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Match type for the content filter. + module MatchType + # Match type is not specified. + MATCH_TYPE_UNSPECIFIED = 0 + + # Content is matched for substrings character by character. + SIMPLE_STRING_MATCH = 1 + + # Content only matches if the pattern found in the text is + # surrounded by word delimiters. Banned phrases can also contain word + # delimiters. + WORD_BOUNDARY_STRING_MATCH = 2 + + # Content is matched using regular expression syntax. + REGEXP_MATCH = 3 + end + end + + # Guardrail that blocks the conversation if the input is considered unsafe + # based on the LLM classification. + # @!attribute [rw] default_settings + # @return [::Google::Cloud::Ces::V1beta::Guardrail::LlmPromptSecurity::DefaultSecuritySettings] + # Optional. Use the system's predefined default security settings. + # To select this mode, include an empty 'default_settings' message + # in the request. The 'default_prompt_template' field within + # will be populated by the server in the response. + # + # Note: The following fields are mutually exclusive: `default_settings`, `custom_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_policy + # @return [::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy] + # Optional. Use a user-defined LlmPolicy to configure the security + # guardrail. + # + # Note: The following fields are mutually exclusive: `custom_policy`, `default_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] fail_open + # @return [::Boolean] + # Optional. Determines the behavior when the guardrail encounters an LLM + # error. + # - If true: the guardrail is bypassed. + # - If false (default): the guardrail triggers/blocks. + # + # Note: If a custom policy is provided, this field is ignored in favor + # of the policy's 'fail_open' configuration. + class LlmPromptSecurity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for default system security settings. + # @!attribute [r] default_prompt_template + # @return [::String] + # Output only. The default prompt template used by the system. + # This field is for display purposes to show the user what prompt + # the system uses by default. It is OUTPUT_ONLY. + class DefaultSecuritySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Guardrail that blocks the conversation if the LLM response is considered + # violating the policy based on the LLM classification. + # @!attribute [rw] max_conversation_messages + # @return [::Integer] + # Optional. When checking this policy, consider the last 'n' messages in + # the conversation. When not set a default value of 10 will be used. + # @!attribute [rw] model_settings + # @return [::Google::Cloud::Ces::V1beta::ModelSettings] + # Optional. Model settings. + # @!attribute [rw] prompt + # @return [::String] + # Required. Policy prompt. + # @!attribute [rw] policy_scope + # @return [::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy::PolicyScope] + # Required. Defines when to apply the policy check during the conversation. + # If set to `POLICY_SCOPE_UNSPECIFIED`, the policy will be applied to the + # user input. When applying the policy to the agent response, additional + # latency will be introduced before the agent can respond. + # @!attribute [rw] fail_open + # @return [::Boolean] + # Optional. If an error occurs during the policy check, fail open and do + # not trigger the guardrail. + # @!attribute [rw] allow_short_utterance + # @return [::Boolean] + # Optional. By default, the LLM policy check is bypassed for short + # utterances. Enabling this setting applies the policy check to all + # utterances, including those that would normally be skipped. + class LlmPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines when to apply the policy check during the conversation. + module PolicyScope + # Policy scope is not specified. + POLICY_SCOPE_UNSPECIFIED = 0 + + # Policy check is triggered on user input. + USER_QUERY = 1 + + # Policy check is triggered on agent response. Applying this policy + # scope will introduce additional latency before the agent can respond. + AGENT_RESPONSE = 2 + + # Policy check is triggered on both user input and agent response. + # Applying this policy scope will introduce additional latency before + # the agent can respond. + USER_QUERY_AND_AGENT_RESPONSE = 3 + end + end + + # Model safety settings overrides. When this is set, it will override the + # default settings and trigger the guardrail if the response is considered + # unsafe. + # @!attribute [rw] safety_settings + # @return [::Array<::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety::SafetySetting>] + # Required. List of safety settings. + class ModelSafety + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Safety setting. + # @!attribute [rw] category + # @return [::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety::HarmCategory] + # Required. The harm category. + # @!attribute [rw] threshold + # @return [::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety::HarmBlockThreshold] + # Required. The harm block threshold. + class SafetySetting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Harm category. + module HarmCategory + # The harm category is unspecified. + HARM_CATEGORY_UNSPECIFIED = 0 + + # The harm category is hate speech. + HARM_CATEGORY_HATE_SPEECH = 1 + + # The harm category is dangerous content. + HARM_CATEGORY_DANGEROUS_CONTENT = 2 + + # The harm category is harassment. + HARM_CATEGORY_HARASSMENT = 3 + + # The harm category is sexually explicit content. + HARM_CATEGORY_SEXUALLY_EXPLICIT = 4 + end + + # Probability based thresholds levels for blocking. + module HarmBlockThreshold + # Unspecified harm block threshold. + HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 + + # Block low threshold and above (i.e. block more). + BLOCK_LOW_AND_ABOVE = 1 + + # Block medium threshold and above. + BLOCK_MEDIUM_AND_ABOVE = 2 + + # Block only high threshold (i.e. block less). + BLOCK_ONLY_HIGH = 3 + + # Block none. + BLOCK_NONE = 4 + + # Turn off the safety filter. + OFF = 5 + end + end + + # Guardrail that blocks the conversation based on the code callbacks + # provided. + # @!attribute [rw] before_agent_callback + # @return [::Google::Cloud::Ces::V1beta::Callback] + # Optional. The callback to execute before the agent is called. + # Each callback function is expected to return a structure (e.g., a dict or + # object) containing at least: + # - 'decision': Either 'OK' or 'TRIGGER'. + # - 'reason': A string explaining the decision. + # A 'TRIGGER' decision may halt further processing. + # @!attribute [rw] after_agent_callback + # @return [::Google::Cloud::Ces::V1beta::Callback] + # Optional. The callback to execute after the agent is called. + # Each callback function is expected to return a structure (e.g., a dict or + # object) containing at least: + # - 'decision': Either 'OK' or 'TRIGGER'. + # - 'reason': A string explaining the decision. + # A 'TRIGGER' decision may halt further processing. + # @!attribute [rw] before_model_callback + # @return [::Google::Cloud::Ces::V1beta::Callback] + # Optional. The callback to execute before the model is called. If there + # are multiple calls to the model, the callback will be executed multiple + # times. Each callback function is expected to return a structure (e.g., a + # dict or object) containing at least: + # - 'decision': Either 'OK' or 'TRIGGER'. + # - 'reason': A string explaining the decision. + # A 'TRIGGER' decision may halt further processing. + # @!attribute [rw] after_model_callback + # @return [::Google::Cloud::Ces::V1beta::Callback] + # Optional. The callback to execute after the model is called. If there are + # multiple calls to the model, the callback will be executed multiple + # times. Each callback function is expected to return a structure (e.g., a + # dict or object) containing at least: + # - 'decision': Either 'OK' or 'TRIGGER'. + # - 'reason': A string explaining the decision. + # A 'TRIGGER' decision may halt further processing. + class CodeCallback + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb new file mode 100644 index 000000000000..46c6ac1df076 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # An MCP tool. + # See https://modelcontextprotocol.io/specification/2025-06-18/server/tools for + # more details. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the MCP tool. + # @!attribute [rw] name_override + # @return [::String] + # Optional. The name override of the MCP tool. + # This is populated if the name was overridden by a Toolset override. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the MCP tool. + # @!attribute [rw] input_schema + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Optional. The schema of the input arguments of the MCP tool. + # @!attribute [rw] output_schema + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Optional. The schema of the output arguments of the MCP tool. + # @!attribute [rw] server_address + # @return [::String] + # Required. The server address of the MCP server, e.g., + # "https://example.com/mcp/". If the server is built with the MCP SDK, the + # url should be suffixed with + # "/mcp/". Only Streamable HTTP transport based servers are supported. This + # is the same as the server_address in the McpToolset. See + # https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http + # for more details. + # @!attribute [rw] api_authentication + # @return [::Google::Cloud::Ces::V1beta::ApiAuthentication] + # Optional. Authentication information required to execute the tool against + # the MCP server. For bearer token authentication, the token applies only to + # tool execution, not to listing tools. This requires that tools can be + # listed without authentication. + # @!attribute [rw] tls_config + # @return [::Google::Cloud::Ces::V1beta::TlsConfig] + # Optional. The TLS configuration. Includes the custom server certificates + # that the client should trust. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] + # Optional. Service Directory configuration for VPC-SC, used to resolve + # service names within a perimeter. + # @!attribute [rw] custom_headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The custom headers to send in the request to the MCP server. The + # values must be in the format `$context.variables.` and + # can be set in the session variables. See + # https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection + # for more details. + # @!attribute [r] state + # @return [::Google::Cloud::Ces::V1beta::McpTool::State] + # Output only. The dynamic availability state of the tool on the external + # server. + class McpTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class CustomHeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the dynamic availability state of the tool. + module State + # Default state. + STATE_UNSPECIFIED = 0 + + # The tool is available and actively offered by the server. + ACTIVE = 1 + + # The tool is configured or pinned, but currently not offered by the + # server. + INACTIVE = 2 + + # The tool exists on the server, but does not match the version on the + # server. + STALE = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb new file mode 100644 index 000000000000..c2673b2839d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # A toolset that contains a list of tools that are offered by the MCP + # server. + # @!attribute [rw] server_address + # @return [::String] + # Required. The address of the MCP server, for example, + # "https://example.com/mcp/". If the server is built with the MCP SDK, the + # url should be suffixed with + # "/mcp/". Only Streamable HTTP transport based servers are supported. See + # https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http + # for more details. + # @!attribute [rw] api_authentication + # @return [::Google::Cloud::Ces::V1beta::ApiAuthentication] + # Optional. Authentication information required to access tools and execute a + # tool against the MCP server. For bearer token authentication, the token + # applies only to tool execution, not to listing tools. This requires that + # tools can be listed without authentication. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] + # Optional. Service Directory configuration for VPC-SC, used to resolve + # service names within a perimeter. + # @!attribute [rw] tls_config + # @return [::Google::Cloud::Ces::V1beta::TlsConfig] + # Optional. The TLS configuration. Includes the custom server certificates + # that the client should trust. + # @!attribute [rw] custom_headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The custom headers to send in the request to the MCP server. The + # values must be in the format `$context.variables.` and + # can be set in the session variables. See + # https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection + # for more details. + # @!attribute [rw] tool_overrides + # @return [::Array<::Google::Cloud::Ces::V1beta::McpToolOverride>] + # Optional. Overrides for individual tools within this toolset. + # This allows overriding specific details like descriptions, names, + # or pinning the tools' states so they aren't fully dynamic. + class McpToolset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class CustomHeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Overrides associated with a given tool in a Toolset. + # This enables "pinning" or "overriding" of tool definitions from the external + # dynamic server. + # @!attribute [rw] tool + # @return [::String] + # Required. The original name of the tool as it is emitted by the MCP server. + # @!attribute [rw] name_override + # @return [::String] + # Optional. If present, this tool uses this name in the Agent instead of the + # original name. This is primarily used as an alias if the MCP server offers + # poorly named tools. + # @!attribute [rw] description_override + # @return [::String] + # Optional. If present, this tool uses this description instead of the + # original description from the server. + # @!attribute [r] snapshot + # @return [::Google::Cloud::Ces::V1beta::McpToolDefinition] + # Output only. If present, this tool is "Pinned" and uses the snapshot values + # as fallbacks if the server becomes temporarily unavailable or if no + # Override is present. + class McpToolOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for a tool's core definition elements that are snapshot. + # Schemas in the snapshot are used as-is and cannot be overridden. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the MCP tool. This can be overridden + # by `description_override` in `McpToolOverride`. + # @!attribute [r] input_schema + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Output only. The schema of the input arguments of the MCP tool. + # @!attribute [r] output_schema + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Output only. The schema of the output arguments of the MCP tool. + class McpToolDefinition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mocks.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mocks.rb new file mode 100644 index 000000000000..67d766edeb1f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mocks.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # A mocked tool call. + # + # Expresses the target tool + a pattern to match against that tool's + # args / inputs. If the pattern matches, then the mock response will be + # returned. + # @!attribute [rw] tool_id + # @return [::String] + # Optional. The name of the tool to mock. + # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # + # Note: The following fields are mutually exclusive: `tool_id`, `toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] toolset + # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] + # Optional. The toolset to mock. + # + # Note: The following fields are mutually exclusive: `toolset`, `tool_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tool + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. Deprecated. Use tool_identifier instead. + # @!attribute [rw] expected_args_pattern + # @return [::Google::Protobuf::Struct] + # Required. A pattern to match against the args / inputs of all dispatched + # tool calls. If the tool call inputs match this pattern, then mock output + # will be returned. + # @!attribute [rw] mock_response + # @return [::Google::Protobuf::Struct] + # Optional. The mock response / output to return if the tool call args / + # inputs match the pattern. + class MockedToolCall + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel.rb new file mode 100644 index 000000000000..22e1c1c91703 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel.rb @@ -0,0 +1,163 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Represents an Omnichannel resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the omnichannel resource. + # Format: + # `projects/{project}/locations/{location}/omnichannels/{omnichannel}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the omnichannel resource. + # @!attribute [rw] description + # @return [::String] + # Optional. Human-readable description of the omnichannel resource. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the omnichannel resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the omnichannel resource was last updated. + # @!attribute [r] etag + # @return [::String] + # Output only. Etag used to ensure the object hasn't changed during a + # read-modify-write operation. + # @!attribute [rw] integration_config + # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig] + # Optional. The integration config for the omnichannel resource. + class Omnichannel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OmnichannelIntegrationConfig contains all App integration configs. + # @!attribute [rw] channel_configs + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::ChannelConfig}] + # Optional. Various of configuration for handling App events. + # @!attribute [rw] subscriber_configs + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::SubscriberConfig}] + # Optional. Various of subscribers configs. + # @!attribute [rw] routing_configs + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::RoutingConfig}] + # Optional. The key of routing_configs is a key of `app_configs`, value is a + # `RoutingConfig`, which contains subscriber's key. + class OmnichannelIntegrationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # ChannelConfig contains config for various of app integration. + # @!attribute [rw] whatsapp_config + # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::WhatsappConfig] + # WhatsApp config. + class ChannelConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # How Omnichannel should receive/reply events from WhatsApp. + # @!attribute [rw] phone_number_id + # @return [::String] + # The Phone Number ID associated with the WhatsApp Business Account. + # @!attribute [rw] phone_number + # @return [::String] + # The phone number used for sending/receiving messages. + # @!attribute [rw] whatsapp_business_account_id + # @return [::String] + # The customer's WhatsApp Business Account (WABA) ID. + # @!attribute [rw] webhook_verify_token + # @return [::String] + # The verify token configured in the Meta App Dashboard for webhook + # verification. + # @!attribute [rw] whatsapp_business_token + # @return [::String] + # The access token for authenticating API calls to the WhatsApp Cloud API. + # https://developers.facebook.com/docs/whatsapp/business-management-api/get-started/#business-integration-system-user-access-tokens + # @!attribute [rw] meta_business_portfolio_id + # @return [::String] + # The Meta Business Portfolio (MBP) ID. + # https://www.facebook.com/business/help/1710077379203657 + class WhatsappConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configs of subscribers. + # @!attribute [rw] ces_app_config + # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::CesAppConfig] + # Ces app config. + class SubscriberConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configs for CES app. + # @!attribute [rw] app + # @return [::String] + # The unique identifier of the CES app. + # Format: `projects/{project}/locations/{location}/apps/{app}` + class CesAppConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Routing config specify how/who to route app events to a subscriber. + # @!attribute [rw] subscriber_key + # @return [::String] + # The key of the subscriber. + class RoutingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::ChannelConfig] + class ChannelConfigsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::SubscriberConfig] + class SubscriberConfigsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::RoutingConfig] + class RoutingConfigsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel_service.rb new file mode 100644 index 000000000000..b579dcb4bcbc --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel_service.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # 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] 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. + class OmnichannelOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_tool.rb new file mode 100644 index 000000000000..740d2e5e3ced --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_tool.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # A remote API tool defined by an OpenAPI schema. + # @!attribute [rw] open_api_schema + # @return [::String] + # Required. The OpenAPI schema in JSON or YAML format. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of the tool. If not provided, the name of the tool will + # be derived from the OpenAPI schema, from `operation.operationId`. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the tool. If not provided, the description of + # the tool will be derived from the OpenAPI schema, from + # `operation.description` or `operation.summary`. + # @!attribute [rw] api_authentication + # @return [::Google::Cloud::Ces::V1beta::ApiAuthentication] + # Optional. Authentication information required by the API. + # @!attribute [rw] tls_config + # @return [::Google::Cloud::Ces::V1beta::TlsConfig] + # Optional. The TLS configuration. Includes the custom server certificates + # that the client will trust. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] + # Optional. Service Directory configuration. + # @!attribute [rw] ignore_unknown_fields + # @return [::Boolean] + # Optional. If true, the agent will ignore unknown fields in the API + # response. + # @!attribute [rw] url + # @return [::String] + # Optional. The server URL of the Open API schema. + # This field is only set in tools in the environment dependencies during the + # export process if the schema contains a server url. During the import + # process, if this url is present in the environment dependencies and the + # schema has the $env_var placeholder, it will replace the placeholder in the + # schema. + class OpenApiTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_toolset.rb new file mode 100644 index 000000000000..d748e4b19ddb --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_toolset.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # A toolset that contains a list of tools that are defined by an OpenAPI + # schema. + # @!attribute [rw] open_api_schema + # @return [::String] + # Required. The OpenAPI schema of the toolset. + # @!attribute [rw] api_authentication + # @return [::Google::Cloud::Ces::V1beta::ApiAuthentication] + # Optional. Authentication information required by the API. + # @!attribute [rw] tls_config + # @return [::Google::Cloud::Ces::V1beta::TlsConfig] + # Optional. The TLS configuration. Includes the custom server certificates + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] + # Optional. Service Directory configuration. + # @!attribute [rw] ignore_unknown_fields + # @return [::Boolean] + # Optional. If true, the agent will ignore unknown fields in the API response + # for all operations defined in the OpenAPI schema. + # @!attribute [rw] url + # @return [::String] + # Optional. The server URL of the Open API schema. + # This field is only set in toolsets in the environment dependencies during + # the export process if the schema contains a server url. During the import + # process, if this url is present in the environment dependencies and the + # schema has the $env_var placeholder, it will replace the placeholder in the + # schema. + class OpenApiToolset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb new file mode 100644 index 000000000000..a3178c54e15b --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # A Python function tool. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of the Python function to execute. Must match a Python + # function name defined in the python code. Case sensitive. If the name is + # not provided, the first function defined in the python code will be used. + # @!attribute [rw] python_code + # @return [::String] + # Optional. The Python code to execute for the tool. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the Python function, parsed from the python + # code's docstring. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] + # Optional. Service Directory configuration for the tool. + class PythonFunction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/schema.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/schema.rb new file mode 100644 index 000000000000..44e43fb10de1 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/schema.rb @@ -0,0 +1,162 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # Represents a select subset of an OpenAPI 3.0 schema object. + # @!attribute [rw] type + # @return [::Google::Cloud::Ces::V1beta::Schema::Type] + # Required. The type of the data. + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::Schema}] + # Optional. Properties of Type.OBJECT. + # @!attribute [rw] required + # @return [::Array<::String>] + # Optional. Required properties of Type.OBJECT. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the data. + # @!attribute [rw] items + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Optional. Schema of the elements of Type.ARRAY. + # @!attribute [rw] nullable + # @return [::Boolean] + # Optional. Indicates if the value may be null. + # @!attribute [rw] unique_items + # @return [::Boolean] + # Optional. Indicate the items in the array must be unique. Only applies to + # TYPE.ARRAY. + # @!attribute [rw] prefix_items + # @return [::Array<::Google::Cloud::Ces::V1beta::Schema>] + # Optional. Schemas of initial elements of Type.ARRAY. + # @!attribute [rw] additional_properties + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Optional. Can either be a boolean or an object, controls the presence of + # additional properties. + # @!attribute [rw] any_of + # @return [::Array<::Google::Cloud::Ces::V1beta::Schema>] + # Optional. The value should be validated against any (one or more) of the + # subschemas in the list. + # @!attribute [rw] enum + # @return [::Array<::String>] + # Optional. Possible values of the element of primitive type with enum + # format. Examples: + # 1. We can define direction as : + # \\{type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} + # 2. We can define apartment number as : + # \\{type:INTEGER, format:enum, enum:["101", "201", "301"]} + # @!attribute [rw] default + # @return [::Google::Protobuf::Value] + # Optional. Default value of the data. + # @!attribute [rw] ref + # @return [::String] + # Optional. Allows indirect references between schema nodes. The value should + # be a valid reference to a child of the root `defs`. + # + # For example, the following schema defines a reference to a schema node + # named "Pet": + # + # ``` + # type: object + # properties: + # pet: + # ref: #/defs/Pet + # defs: + # Pet: + # type: object + # properties: + # name: + # type: string + # ``` + # + # The value of the "pet" property is a reference to the schema node + # named "Pet". + # See details in + # https://json-schema.org/understanding-json-schema/structuring. + # @!attribute [rw] defs + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::Schema}] + # Optional. A map of definitions for use by `ref`. Only allowed at the root + # of the schema. + # @!attribute [rw] title + # @return [::String] + # Optional. The title of the schema. + # @!attribute [rw] min_items + # @return [::Integer] + # Optional. Minimum number of the elements for Type.ARRAY. + # @!attribute [rw] max_items + # @return [::Integer] + # Optional. Maximum number of the elements for Type.ARRAY. + # @!attribute [rw] minimum + # @return [::Float] + # Optional. Minimum value for Type.INTEGER and Type.NUMBER. + # @!attribute [rw] maximum + # @return [::Float] + # Optional. Maximum value for Type.INTEGER and Type.NUMBER. + class Schema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Ces::V1beta::Schema] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Ces::V1beta::Schema] + class DefsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OpenAPI data types. + module Type + # Type unspecified. + TYPE_UNSPECIFIED = 0 + + # String type. + STRING = 1 + + # Integer type. + INTEGER = 2 + + # Number type. + NUMBER = 3 + + # Boolean type. + BOOLEAN = 4 + + # Object type. + OBJECT = 5 + + # Array type. + ARRAY = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/search_suggestions.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/search_suggestions.rb new file mode 100644 index 000000000000..431345998533 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/search_suggestions.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # Search suggestions from [Google Search + # Tool][google.cloud.ces.v1beta.GoogleSearchTool]. + # @!attribute [rw] htmls + # @return [::Array<::String>] + # Compliant HTML and CSS styling for search suggestions. + # The provided HTML and CSS automatically adapts to your device settings, + # displaying in either light or dark mode indicated by + # `@media(prefers-color-scheme)`. + # @!attribute [rw] web_search_queries + # @return [::Array<::Google::Cloud::Ces::V1beta::WebSearchQuery>] + # List of queries used to perform the google search along with the search + # result URIs forming the search suggestions. + class GoogleSearchSuggestions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a single web search query and its associated search uri. + # @!attribute [rw] query + # @return [::String] + # The search query text. + # @!attribute [rw] uri + # @return [::String] + # The URI to the Google Search results page for the query. + class WebSearchQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/security_settings.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/security_settings.rb new file mode 100644 index 000000000000..01b810ade3d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/security_settings.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Project/Location level security settings for CES. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the security settings. + # Format: `projects/{project}/locations/{location}/securitySettings` + # @!attribute [rw] endpoint_control_policy + # @return [::Google::Cloud::Ces::V1beta::EndpointControlPolicy] + # Optional. Endpoint control related settings. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time of the security settings. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update time of the security settings. + # @!attribute [r] etag + # @return [::String] + # Output only. Etag of the security settings. + class SecuritySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines project/location level endpoint control policy. + # @!attribute [rw] enforcement_scope + # @return [::Google::Cloud::Ces::V1beta::EndpointControlPolicy::EnforcementScope] + # Optional. The scope in which this policy's allowed_origins list is + # enforced. + # @!attribute [rw] allowed_origins + # @return [::Array<::String>] + # Optional. The allowed HTTP(s) origins that tools in the App are able to + # directly call. The enforcement depends on the value of + # enforcement_scope and the VPC-SC status of the project. + # If a port number is not provided, all ports will be allowed. Otherwise, + # the port number must match exactly. For example, "https://example.com" + # will match "https://example.com:443" and any other port. + # "https://example.com:443" will only match "https://example.com:443". + class EndpointControlPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the scope in which this policy's allowed_origins list is + # enforced. + module EnforcementScope + # Unspecified. This policy will be treated as VPCSC_ONLY. + ENFORCEMENT_SCOPE_UNSPECIFIED = 0 + + # This policy applies only when VPC-SC is active. + VPCSC_ONLY = 1 + + # This policy ALWAYS applies, regardless of VPC-SC status. + ALWAYS = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb new file mode 100644 index 000000000000..8bf6c2976597 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb @@ -0,0 +1,493 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Mock tool calls configuration for the session. + # @!attribute [rw] mocked_tool_calls + # @return [::Array<::Google::Cloud::Ces::V1beta::MockedToolCall>] + # Optional. All tool calls to mock for the duration of the session. + # @!attribute [rw] unmatched_tool_call_behavior + # @return [::Google::Cloud::Ces::V1beta::MockConfig::UnmatchedToolCallBehavior] + # Required. Beavhior for tool calls that don't match any args patterns in + # mocked_tool_calls. + class MockConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # What to do when a tool call doesn't match any mocked tool calls. + module UnmatchedToolCallBehavior + # Default value. This value is unused. + UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0 + + # Throw an error for any tool calls that don't match a mock expected input + # pattern. + FAIL = 1 + + # For unmatched tool calls, pass the tool call through to real tool. + PASS_THROUGH = 2 + end + end + + # InputAudioConfig configures how the CES agent should interpret the incoming + # audio data. + # @!attribute [rw] audio_encoding + # @return [::Google::Cloud::Ces::V1beta::AudioEncoding] + # Required. The encoding of the input audio data. + # @!attribute [rw] sample_rate_hertz + # @return [::Integer] + # Required. The sample rate (in Hertz) of the input audio data. + # @!attribute [rw] noise_suppression_level + # @return [::String] + # Optional. Whether to enable noise suppression on the input audio. + # Available values are "low", "moderate", "high", "very_high". + class InputAudioConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OutputAudioConfig configures how the CES agent should synthesize outgoing + # audio responses. + # @!attribute [rw] audio_encoding + # @return [::Google::Cloud::Ces::V1beta::AudioEncoding] + # Required. The encoding of the output audio data. + # @!attribute [rw] sample_rate_hertz + # @return [::Integer] + # Required. The sample rate (in Hertz) of the output audio data. + class OutputAudioConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration for the session. + # @!attribute [rw] session + # @return [::String] + # Required. The unique identifier of the session. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/sessions/{session}` + # @!attribute [rw] input_audio_config + # @return [::Google::Cloud::Ces::V1beta::InputAudioConfig] + # Optional. Configuration for processing the input audio. + # @!attribute [rw] output_audio_config + # @return [::Google::Cloud::Ces::V1beta::OutputAudioConfig] + # Optional. Configuration for generating the output audio. + # @!attribute [rw] historical_contexts + # @return [::Array<::Google::Cloud::Ces::V1beta::Message>] + # Optional. The historical context of the session, including user inputs, + # agent responses, and other messages. Typically, CES agent would manage + # session automatically so client doesn't need to explicitly populate this + # field. However, client can optionally override the historical contexts to + # force the session start from certain state. + # @!attribute [rw] entry_agent + # @return [::String] + # Optional. The entry agent to handle the session. If not specified, the + # session will be handled by the [root + # agent][google.cloud.ces.v1beta.App.root_agent] of the app. Format: + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + # @!attribute [rw] deployment + # @return [::String] + # Optional. The deployment of the app to use for the session. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` + # @!attribute [rw] time_zone + # @return [::String] + # Optional. The time zone of the user. If provided, the agent will use the + # time zone for date and time related variables. Otherwise, the agent will + # use the time zone specified in the App.time_zone_settings. + # + # The format is the IANA Time Zone Database time zone, e.g. + # "America/Los_Angeles". + # @!attribute [rw] use_tool_fakes + # @return [::Boolean] + # Optional. Whether to use tool fakes for the session. + # If this field is set, the agent will attempt use tool fakes instead of + # calling the real tools. + # @!attribute [rw] remote_dialogflow_query_parameters + # @return [::Google::Cloud::Ces::V1beta::SessionConfig::RemoteDialogflowQueryParameters] + # Optional. + # [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters) + # to send to the remote + # [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents) + # agent when the session control is transferred to the remote agent. + # @!attribute [rw] enable_text_streaming + # @return [::Boolean] + # Optional. Whether to enable streaming text outputs from the model. + # By default, text outputs from the model are collected before sending to the + # client. + # NOTE: This is only supported for text (non-voice) sessions via + # {::Google::Cloud::Ces::V1beta::SessionService::Client#stream_run_session StreamRunSession} + # or {::Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session BidiRunSession}. + class SessionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters) + # to send to the remote + # [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents) + # agent when the session control is transferred to the remote agent. + # @!attribute [rw] webhook_headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The HTTP headers to be sent as webhook_headers in + # [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters). + # @!attribute [rw] payload + # @return [::Google::Protobuf::Struct] + # Optional. The payload to be sent in + # [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters). + # @!attribute [rw] end_user_metadata + # @return [::Google::Protobuf::Struct] + # Optional. The end user metadata to be sent in + # [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters). + class RemoteDialogflowQueryParameters + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class WebhookHeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Request for the client to execute the tools and return the execution results + # before continuing the session. + # @!attribute [rw] tool_calls + # @return [::Array<::Google::Cloud::Ces::V1beta::ToolCall>] + # Optional. The list of tool calls to execute. + class ToolCalls + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Execution results for the requested tool calls from the client. + # @!attribute [rw] tool_responses + # @return [::Array<::Google::Cloud::Ces::V1beta::ToolResponse>] + # Optional. The list of tool execution results. + class ToolResponses + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Citations associated with the agent response. + # @!attribute [rw] cited_chunks + # @return [::Array<::Google::Cloud::Ces::V1beta::Citations::CitedChunk>] + # List of cited pieces of information. + class Citations + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Piece of cited information. + # @!attribute [rw] uri + # @return [::String] + # URI used for citation. + # @!attribute [rw] title + # @return [::String] + # Title of the cited document. + # @!attribute [rw] text + # @return [::String] + # Text used for citation. + # @!attribute [rw] requires_attribution + # @return [::Boolean] + # Whether this citation requires attribution to be shown to the end users. + class CitedChunk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Event input. + # @!attribute [rw] event + # @return [::String] + # Required. The name of the event. + class Event + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input for the session. + # @!attribute [rw] text + # @return [::String] + # Optional. Text data from the end user. + # + # Note: The following fields are mutually exclusive: `text`, `dtmf`, `audio`, `tool_responses`, `image`, `blob`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] dtmf + # @return [::String] + # Optional. DTMF digits from the end user. + # + # Note: The following fields are mutually exclusive: `dtmf`, `text`, `audio`, `tool_responses`, `image`, `blob`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] audio + # @return [::String] + # Optional. Audio data from the end user. + # + # Note: The following fields are mutually exclusive: `audio`, `text`, `dtmf`, `tool_responses`, `image`, `blob`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tool_responses + # @return [::Google::Cloud::Ces::V1beta::ToolResponses] + # Optional. Execution results for the tool calls from the client. + # + # Note: The following fields are mutually exclusive: `tool_responses`, `text`, `dtmf`, `audio`, `image`, `blob`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image + # @return [::Google::Cloud::Ces::V1beta::Image] + # Optional. Image data from the end user. + # + # Note: The following fields are mutually exclusive: `image`, `text`, `dtmf`, `audio`, `tool_responses`, `blob`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] blob + # @return [::Google::Cloud::Ces::V1beta::Blob] + # Optional. Blob data from the end user. + # + # Note: The following fields are mutually exclusive: `blob`, `text`, `dtmf`, `audio`, `tool_responses`, `image`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] variables + # @return [::Google::Protobuf::Struct] + # Optional. Contextual variables for the session, keyed by name. Only + # variables declared in the app will be used by the CES agent. + # + # Unrecognized variables will still be sent to the [Dialogflow + # agent][Agent.RemoteDialogflowAgent] as additional session parameters. + # + # Note: The following fields are mutually exclusive: `variables`, `text`, `dtmf`, `audio`, `tool_responses`, `image`, `blob`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] event + # @return [::Google::Cloud::Ces::V1beta::Event] + # Optional. Event input. + # + # Note: The following fields are mutually exclusive: `event`, `text`, `dtmf`, `audio`, `tool_responses`, `image`, `blob`, `variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] will_continue + # @return [::Boolean] + # Optional. A flag to indicate if the current message is a fragment of a + # larger input in the bidi streaming session. + # + # When set to `true`, the agent defers processing until it receives a + # subsequent message where `will_continue` is `false`, or until the system + # detects an endpoint in the audio input. + # + # NOTE: This field does not apply to audio and DTMF inputs, as they are + # always processed automatically based on the endpointing signal. + class SessionInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output for the session. + # @!attribute [rw] text + # @return [::String] + # Output text from the CES agent. + # + # Note: The following fields are mutually exclusive: `text`, `audio`, `tool_calls`, `citations`, `google_search_suggestions`, `end_session`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] audio + # @return [::String] + # Output audio from the CES agent. + # + # Note: The following fields are mutually exclusive: `audio`, `text`, `tool_calls`, `citations`, `google_search_suggestions`, `end_session`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tool_calls + # @return [::Google::Cloud::Ces::V1beta::ToolCalls] + # Request for the client to execute the tools. + # + # Note: The following fields are mutually exclusive: `tool_calls`, `text`, `audio`, `citations`, `google_search_suggestions`, `end_session`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] citations + # @return [::Google::Cloud::Ces::V1beta::Citations] + # Citations that provide the source information for the agent's generated + # text. + # + # Note: The following fields are mutually exclusive: `citations`, `text`, `audio`, `tool_calls`, `google_search_suggestions`, `end_session`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] google_search_suggestions + # @return [::Google::Cloud::Ces::V1beta::GoogleSearchSuggestions] + # The suggestions returned from Google Search as a result of invoking the + # {::Google::Cloud::Ces::V1beta::GoogleSearchTool GoogleSearchTool}. + # + # Note: The following fields are mutually exclusive: `google_search_suggestions`, `text`, `audio`, `tool_calls`, `citations`, `end_session`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_session + # @return [::Google::Cloud::Ces::V1beta::EndSession] + # Indicates the session has ended. + # + # Note: The following fields are mutually exclusive: `end_session`, `text`, `audio`, `tool_calls`, `citations`, `google_search_suggestions`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] payload + # @return [::Google::Protobuf::Struct] + # Custom payload with structured output from the CES agent. + # + # Note: The following fields are mutually exclusive: `payload`, `text`, `audio`, `tool_calls`, `citations`, `google_search_suggestions`, `end_session`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] turn_index + # @return [::Integer] + # Indicates the sequential order of conversation turn to which this output + # belongs to, starting from 1. + # @!attribute [rw] turn_completed + # @return [::Boolean] + # If true, the CES agent has detected the end of the current conversation + # turn and will provide no further output for this turn. + # @!attribute [rw] diagnostic_info + # @return [::Google::Cloud::Ces::V1beta::SessionOutput::DiagnosticInfo] + # Optional. Diagnostic information contains execution details during the + # processing of the input. Only populated in the last SessionOutput (with + # `turn_completed=true`) for each turn. + class SessionOutput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains execution details during the processing. + # @!attribute [rw] messages + # @return [::Array<::Google::Cloud::Ces::V1beta::Message>] + # List of the messages that happened during the processing. + # @!attribute [rw] root_span + # @return [::Google::Cloud::Ces::V1beta::Span] + # A trace of the entire request processing, represented as a root span. + # This span can contain nested child spans for specific operations. + class DiagnosticInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Speech recognition result for the audio input. + # @!attribute [rw] transcript + # @return [::String] + # Optional. Concatenated user speech segments captured during the current + # turn. + class RecognitionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates the agent's audio response has been interrupted. The client should + # immediately stop any current audio playback (e.g., due to user barge-in or + # a new agent response being generated). + # @!attribute [rw] barge_in + # @return [::Boolean] + # Whether the interruption is caused by a user barge-in event. + class InterruptionSignal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates the session has terminated, due to either successful completion + # (e.g. user says "Good bye!" ) or an agent escalation. + # + # The agent will not process any further inputs after session is terminated and + # the client should half-close and disconnect after receiving all remaining + # responses from the agent. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Struct] + # Optional. Provides additional information about the end session signal, + # such as the reason for ending the session. + class EndSession + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates that the server will disconnect soon and the client should + # half-close and restart the connection. + class GoAway + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::SessionService::Client#run_session SessionService.RunSession}. + # @!attribute [rw] config + # @return [::Google::Cloud::Ces::V1beta::SessionConfig] + # Required. The configuration for the session. + # @!attribute [rw] inputs + # @return [::Array<::Google::Cloud::Ces::V1beta::SessionInput>] + # Required. Inputs for the session. + class RunSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::SessionService::Client#run_session SessionService.RunSession}. + # @!attribute [rw] outputs + # @return [::Array<::Google::Cloud::Ces::V1beta::SessionOutput>] + # Outputs for the session. + class RunSessionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The top-level message sent by the client for the + # {::Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session SessionService.BidiRunSession} + # method. + # @!attribute [rw] config + # @return [::Google::Cloud::Ces::V1beta::SessionConfig] + # Optional. The initial config message for the session. + # + # Note: The following fields are mutually exclusive: `config`, `realtime_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] realtime_input + # @return [::Google::Cloud::Ces::V1beta::SessionInput] + # Optional. Realtime input for the session. + # + # Note: The following fields are mutually exclusive: `realtime_input`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BidiSessionClientMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The top-level message returned from + # {::Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session SessionService.BidiRunSession} + # method. + # @!attribute [rw] session_output + # @return [::Google::Cloud::Ces::V1beta::SessionOutput] + # Optional. Processing result from the CES agent. + # + # Note: The following fields are mutually exclusive: `session_output`, `recognition_result`, `interruption_signal`, `end_session`, `go_away`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] recognition_result + # @return [::Google::Cloud::Ces::V1beta::RecognitionResult] + # Optional. Realtime speech recognition result for the audio input. + # + # Note: The following fields are mutually exclusive: `recognition_result`, `session_output`, `interruption_signal`, `end_session`, `go_away`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] interruption_signal + # @return [::Google::Cloud::Ces::V1beta::InterruptionSignal] + # Optional. Indicates the agent's audio response has been interrupted. + # + # Note: The following fields are mutually exclusive: `interruption_signal`, `session_output`, `recognition_result`, `end_session`, `go_away`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_session + # @return [::Google::Cloud::Ces::V1beta::EndSession] + # Optional. Indicates that the session has ended. + # + # Note: The following fields are mutually exclusive: `end_session`, `session_output`, `recognition_result`, `interruption_signal`, `go_away`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] go_away + # @return [::Google::Cloud::Ces::V1beta::GoAway] + # Optional. Indicates that the server will disconnect soon and the client + # should half-close and restart the connection. + # + # Note: The following fields are mutually exclusive: `go_away`, `session_output`, `recognition_result`, `interruption_signal`, `end_session`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BidiSessionServerMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AudioEncoding specifies the encoding format for audio data. + module AudioEncoding + # Unspecified audio encoding. + AUDIO_ENCODING_UNSPECIFIED = 0 + + # 16-bit linear PCM audio encoding. + LINEAR16 = 1 + + # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + MULAW = 2 + + # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. + ALAW = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/system_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/system_tool.rb new file mode 100644 index 000000000000..779f3967ce8e --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/system_tool.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Pre-defined system tool. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the system tool. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the system tool. + class SystemTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb new file mode 100644 index 000000000000..f2435d73822d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb @@ -0,0 +1,136 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Ces + module V1beta + # A tool represents an action that the CES agent can take to achieve certain + # goals. + # @!attribute [rw] client_function + # @return [::Google::Cloud::Ces::V1beta::ClientFunction] + # Optional. The client function. + # + # Note: The following fields are mutually exclusive: `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] open_api_tool + # @return [::Google::Cloud::Ces::V1beta::OpenApiTool] + # Optional. The open API tool. + # + # Note: The following fields are mutually exclusive: `open_api_tool`, `client_function`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] google_search_tool + # @return [::Google::Cloud::Ces::V1beta::GoogleSearchTool] + # Optional. The google search tool. + # + # Note: The following fields are mutually exclusive: `google_search_tool`, `client_function`, `open_api_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] connector_tool + # @return [::Google::Cloud::Ces::V1beta::ConnectorTool] + # Optional. The Integration Connector tool. + # + # Note: The following fields are mutually exclusive: `connector_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_store_tool + # @return [::Google::Cloud::Ces::V1beta::DataStoreTool] + # Optional. The data store tool. + # + # Note: The following fields are mutually exclusive: `data_store_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] python_function + # @return [::Google::Cloud::Ces::V1beta::PythonFunction] + # Optional. The python function tool. + # + # Note: The following fields are mutually exclusive: `python_function`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mcp_tool + # @return [::Google::Cloud::Ces::V1beta::McpTool] + # Optional. The MCP tool. An MCP tool cannot be created or updated directly + # and is managed by the MCP toolset. + # + # Note: The following fields are mutually exclusive: `mcp_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] file_search_tool + # @return [::Google::Cloud::Ces::V1beta::FileSearchTool] + # Optional. The file search tool. + # + # Note: The following fields are mutually exclusive: `file_search_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] system_tool + # @return [::Google::Cloud::Ces::V1beta::SystemTool] + # Optional. The system tool. + # + # Note: The following fields are mutually exclusive: `system_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] agent_tool + # @return [::Google::Cloud::Ces::V1beta::AgentTool] + # Optional. The agent tool. + # + # Note: The following fields are mutually exclusive: `agent_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] widget_tool + # @return [::Google::Cloud::Ces::V1beta::WidgetTool] + # Optional. The widget tool. + # + # Note: The following fields are mutually exclusive: `widget_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] remote_agent_tool + # @return [::Google::Cloud::Ces::V1beta::RemoteAgentTool] + # Optional. The remote agent tool. + # + # Note: The following fields are mutually exclusive: `remote_agent_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the tool. Format: + # + # * `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # for standalone tools. + # * `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}/tools/{tool}` + # for tools retrieved from a toolset. + # + # These tools are dynamic and output-only; they cannot be referenced directly + # where a tool is expected. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the tool, derived based on the tool's + # type. For example, display name of a [ClientFunction][Tool.ClientFunction] + # is derived from its `name` property. + # @!attribute [rw] execution_type + # @return [::Google::Cloud::Ces::V1beta::ExecutionType] + # Optional. The execution type of the tool. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Optional. The timeout for the tool execution. If not set, the default + # timeout is 30 seconds for `SYNCHRONOUS` tools and 60 seconds for + # `ASYNCHRONOUS` tools. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the tool was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the tool was last updated. + # @!attribute [rw] etag + # @return [::String] + # Etag used to ensure the object hasn't changed during a read-modify-write + # operation. If the etag is empty, the update will overwrite any concurrent + # changes. + # @!attribute [r] generated_summary + # @return [::String] + # Output only. If the tool is generated by the LLM assistant, this field + # contains a descriptive summary of the generation. + # @!attribute [rw] tool_fake_config + # @return [::Google::Cloud::Ces::V1beta::ToolFakeConfig] + # Optional. Configuration for tool behavior in fake mode. + class Tool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb new file mode 100644 index 000000000000..01584c536336 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Request message for + # {::Google::Cloud::Ces::V1beta::ToolService::Client#execute_tool ToolService.ExecuteTool}. + # @!attribute [rw] tool + # @return [::String] + # Optional. The name of the tool to execute. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} + # + # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] toolset_tool + # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] + # Optional. The toolset tool to execute. Only one tool should match the + # predicate from the toolset. Otherwise, an error will be returned. + # + # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] variables + # @return [::Google::Protobuf::Struct] + # Optional. The variables that are available for the tool execution. + # + # Note: The following fields are mutually exclusive: `variables`, `context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] context + # @return [::Google::Protobuf::Struct] + # Optional. The + # [ToolCallContext](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/python#environment + # for details) to be passed to the Python tool. + # + # Note: The following fields are mutually exclusive: `context`, `variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app which the tool/toolset belongs to. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] args + # @return [::Google::Protobuf::Struct] + # Optional. The input parameters and values for the tool in JSON object + # format. + # @!attribute [rw] mock_config + # @return [::Google::Cloud::Ces::V1beta::MockConfig] + # Optional. Mock configuration for the tool execution. + # If this field is set, tools that call other tools will be + # mocked based on the provided patterns and responses. + class ExecuteToolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::ToolService::Client#execute_tool ToolService.ExecuteTool}. + # @!attribute [rw] tool + # @return [::String] + # The name of the tool that got executed. + # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # + # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] toolset_tool + # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] + # The toolset tool that got executed. + # + # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Struct] + # The tool execution result in JSON object format. + # Use "output" key to specify tool response and "error" key to specify + # error details (if any). If "output" and "error" keys are not specified, + # then whole "response" is treated as tool execution result. + # @!attribute [rw] variables + # @return [::Google::Protobuf::Struct] + # The variable values at the end of the tool execution. + # @!attribute [rw] citations + # @return [::Google::Cloud::Ces::V1beta::Citations] + # Citations that provide the source information for the tool's execution. + # @!attribute [rw] google_search_suggestions + # @return [::Google::Cloud::Ces::V1beta::GoogleSearchSuggestions] + # The suggestions returned from Google Search as a result of invoking the + # Google Search Tool during the tool execution. + class ExecuteToolResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tool_schema ToolService.RetrieveToolSchema}. + # @!attribute [rw] tool + # @return [::String] + # Optional. The name of the tool to retrieve the schema for. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} + # + # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] toolset_tool + # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] + # Optional. The toolset tool to retrieve the schema for. Only one tool + # should match the predicate from the toolset. Otherwise, an error will be + # returned. + # + # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app which the tool/toolset belongs to. + # Format: `projects/{project}/locations/{location}/apps/{app}` + class RetrieveToolSchemaRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tool_schema ToolService.RetrieveToolSchema}. + # @!attribute [rw] tool + # @return [::String] + # The name of the tool that the schema is for. + # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + # + # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] toolset_tool + # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] + # The toolset tool that the schema is for. + # + # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input_schema + # @return [::Google::Cloud::Ces::V1beta::Schema] + # The schema of the tool input parameters. + # @!attribute [rw] output_schema + # @return [::Google::Cloud::Ces::V1beta::Schema] + # The schema of the tool output parameters. + class RetrieveToolSchemaResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tools ToolService.RetrieveTools}. + # @!attribute [rw] toolset + # @return [::String] + # Required. The name of the toolset to retrieve the tools for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` + # @!attribute [rw] tool_ids + # @return [::Array<::String>] + # Optional. The identifiers of the tools to retrieve from the toolset. + # If empty, all tools in the toolset will be returned. + # @!attribute [rw] bypass_persistence_config + # @return [::Boolean] + # Optional. If true, the returned tools will contain raw descriptions and + # schemas directly from the server, bypassing any stored persistence + # configurations (overrides/snapshots). + class RetrieveToolsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tools ToolService.RetrieveTools}. + # @!attribute [rw] tools + # @return [::Array<::Google::Cloud::Ces::V1beta::Tool>] + # The list of tools that are included in the specified toolset. + class RetrieveToolsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset.rb new file mode 100644 index 000000000000..87489b9c3c0a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # A toolset represents a group of dynamically managed tools that can be used + # by the agent. + # @!attribute [rw] mcp_toolset + # @return [::Google::Cloud::Ces::V1beta::McpToolset] + # Optional. A toolset that contains a list of tools that are offered by the + # MCP server. + # + # Note: The following fields are mutually exclusive: `mcp_toolset`, `open_api_toolset`, `connector_toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] open_api_toolset + # @return [::Google::Cloud::Ces::V1beta::OpenApiToolset] + # Optional. A toolset that contains a list of tools that are defined by an + # OpenAPI schema. + # + # Note: The following fields are mutually exclusive: `open_api_toolset`, `mcp_toolset`, `connector_toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] connector_toolset + # @return [::Google::Cloud::Ces::V1beta::ConnectorToolset] + # Optional. A toolset that generates tools from an Integration Connectors + # Connection. + # + # Note: The following fields are mutually exclusive: `connector_toolset`, `mcp_toolset`, `open_api_toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The unique identifier of the toolset. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the toolset. Must be unique within the same + # app. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the toolset. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the toolset was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the toolset was last updated. + # @!attribute [rw] etag + # @return [::String] + # ETag used to ensure the object hasn't changed during a read-modify-write + # operation. If the etag is empty, the update will overwrite any concurrent + # changes. + # @!attribute [rw] execution_type + # @return [::Google::Cloud::Ces::V1beta::ExecutionType] + # Optional. The execution type of the tools in the toolset. + # @!attribute [rw] tool_fake_config + # @return [::Google::Cloud::Ces::V1beta::ToolFakeConfig] + # Optional. Configuration for tools behavior in fake mode. + class Toolset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset_tool.rb new file mode 100644 index 000000000000..30ade4fbb11d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset_tool.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # A tool that is created from a toolset. + # @!attribute [rw] toolset + # @return [::String] + # Required. The resource name of the Toolset from which this tool is derived. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` + # @!attribute [rw] tool_id + # @return [::String] + # Optional. The tool ID to filter the tools to retrieve the schema for. + class ToolsetTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_service.rb new file mode 100644 index 000000000000..54cc5a0029da --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_service.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Request message for + # {::Google::Cloud::Ces::V1beta::WidgetService::Client#generate_chat_token WidgetService.GenerateChatToken}. + # @!attribute [rw] name + # @return [::String] + # Required. The session name to generate the chat token for. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/sessions/\\{session} + # @!attribute [rw] deployment + # @return [::String] + # Required. The deployment of the app to use for the session. + # Format: + # projects/\\{project}/locations/\\{location}/apps/\\{app}/deployments/\\{deployment} + # @!attribute [rw] recaptcha_token + # @return [::String] + # Optional. The reCAPTCHA token generated by the client-side chat widget. + # @!attribute [rw] live_handoff_enabled + # @return [::Boolean] + # Optional. Indicates if live handoff is enabled for the session. + class GenerateChatTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::WidgetService::Client#generate_chat_token WidgetService.GenerateChatToken}. + # @!attribute [rw] chat_token + # @return [::String] + # The session scoped token for chat widget to authenticate with Session APIs. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the chat token expires. + class GenerateChatTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb new file mode 100644 index 000000000000..40d4a164da67 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb @@ -0,0 +1,182 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces + module V1beta + # Represents a widget tool that the agent can invoke. When the tool is chosen + # by the agent, agent will return the widget to the client. The client is + # responsible for processing the widget and generating the next user query to + # continue the interaction with the agent. + # @!attribute [rw] parameters + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Optional. The input parameters of the widget tool. + # @!attribute [rw] name + # @return [::String] + # Required. The display name of the widget tool. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the widget tool. + # @!attribute [rw] widget_type + # @return [::Google::Cloud::Ces::V1beta::WidgetTool::WidgetType] + # Optional. The type of the widget tool. If not specified, the default type + # will be CUSTOMIZED. + # @!attribute [rw] ui_config + # @return [::Google::Protobuf::Struct] + # Optional. Configuration for rendering the widget. + # @!attribute [rw] data_mapping + # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping] + # Optional. The mapping that defines how data from a source tool is mapped to + # the widget's input parameters. + # @!attribute [rw] text_response_config + # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig] + # Optional. Configuration for always-included text responses. + class WidgetTool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for the text response returned with the widget. + # @!attribute [rw] type + # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig::Type] + # Optional. The strategy for providing the text response. + # @!attribute [rw] static_text + # @return [::String] + # Optional. The static text response to return when type is STATIC. + # @!attribute [rw] text_response_instruction + # @return [::String] + # Optional. Instruction for the LLM on how to generate the text response. + # Used as the description for the text response parameter if type is + # LLM_GENERATED. + class TextResponseConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines how the text response is produced. + module Type + # Unspecified type. + TYPE_UNSPECIFIED = 0 + + # The LLM dynamically decides whether to generate a text response + # alongside the widget based on the conversation context. + NONE = 1 + + # The LLM is explicitly required to generate a text response. + LLM_GENERATED = 2 + + # A pre-defined static text response is always used. + STATIC = 3 + end + end + + # Configuration for mapping data from a source tool to the widget's input + # parameters. + # @!attribute [rw] source_tool_name + # @return [::String] + # Optional. The resource name of the tool that provides the data for the + # widget (e.g., a search tool or a custom function). Format: + # `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` + # @!attribute [rw] field_mappings + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. A map of widget input parameter fields to the corresponding + # output fields of the source tool. + # @!attribute [rw] python_function + # @return [::Google::Cloud::Ces::V1beta::PythonFunction] + # Optional. Configuration for a Python function used to transform the + # source tool's output into the widget's input format. + # @!attribute [rw] mode + # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode] + # Optional. The mode of the data mapping. + # @!attribute [rw] python_script + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated: Use `python_function` instead. + class DataMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class FieldMappingsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The strategy used to map data from the source tool to the widget. + module Mode + # Unspecified mode. + MODE_UNSPECIFIED = 0 + + # Use the `field_mappings` map for data transformation. + FIELD_MAPPING = 1 + + # Use the `python_script` for data transformation. + PYTHON_SCRIPT = 2 + end + end + + # All available widget types. + # New values may be added to this enum in the future. + module WidgetType + # Unspecified widget type. + WIDGET_TYPE_UNSPECIFIED = 0 + + # Custom widget type. + CUSTOM = 1 + + # Product carousel widget. + PRODUCT_CAROUSEL = 2 + + # Product details widget. + PRODUCT_DETAILS = 3 + + # Quick actions widget. + QUICK_ACTIONS = 4 + + # Product comparison widget. + PRODUCT_COMPARISON = 5 + + # Advanced product details widget. + ADVANCED_PRODUCT_DETAILS = 6 + + # Short form widget. + SHORT_FORM = 7 + + # Overall satisfaction widget. + OVERALL_SATISFACTION = 8 + + # Order summary widget. + ORDER_SUMMARY = 9 + + # Appointment details widget. + APPOINTMENT_DETAILS = 10 + + # Appointment scheduler widget. + APPOINTMENT_SCHEDULER = 11 + + # Contact form widget. + CONTACT_FORM = 12 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-ces-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-ces-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..bdd4e8573ed9 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-ces-v1beta", path: "../" +else + gem "google-cloud-ces-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-ces-v1beta/snippets/agent_service/batch_delete_conversations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/batch_delete_conversations.rb new file mode 100644 index 000000000000..cc134bf3aa7a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/batch_delete_conversations.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_BatchDeleteConversations_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the batch_delete_conversations call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#batch_delete_conversations. +# +def batch_delete_conversations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new + + # Call the batch_delete_conversations method. + result = client.batch_delete_conversations 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 ces_v1beta_generated_AgentService_BatchDeleteConversations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_agent.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_agent.rb new file mode 100644 index 000000000000..3707bab09b1c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_agent.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_CreateAgent_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_agent call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#create_agent. +# +def create_agent + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateAgentRequest.new + + # Call the create_agent method. + result = client.create_agent request + + # The returned object is of type Google::Cloud::Ces::V1beta::Agent. + p result +end +# [END ces_v1beta_generated_AgentService_CreateAgent_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app.rb new file mode 100644 index 000000000000..1351cdd6d41f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_CreateApp_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_app call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#create_app. +# +def create_app + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateAppRequest.new + + # Call the create_app method. + result = client.create_app 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 ces_v1beta_generated_AgentService_CreateApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app_version.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app_version.rb new file mode 100644 index 000000000000..eb8529ec2bf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_CreateAppVersion_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_app_version call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#create_app_version. +# +def create_app_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new + + # Call the create_app_version method. + result = client.create_app_version request + + # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. + p result +end +# [END ces_v1beta_generated_AgentService_CreateAppVersion_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_deployment.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_deployment.rb new file mode 100644 index 000000000000..afece7ab06d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_CreateDeployment_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_deployment call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#create_deployment. +# +def create_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new + + # Call the create_deployment method. + result = client.create_deployment request + + # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. + p result +end +# [END ces_v1beta_generated_AgentService_CreateDeployment_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_example.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_example.rb new file mode 100644 index 000000000000..198288db759b --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_example.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_CreateExample_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_example call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#create_example. +# +def create_example + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateExampleRequest.new + + # Call the create_example method. + result = client.create_example request + + # The returned object is of type Google::Cloud::Ces::V1beta::Example. + p result +end +# [END ces_v1beta_generated_AgentService_CreateExample_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_guardrail.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_guardrail.rb new file mode 100644 index 000000000000..c3dff2f9fe29 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_guardrail.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_CreateGuardrail_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_guardrail call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#create_guardrail. +# +def create_guardrail + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new + + # Call the create_guardrail method. + result = client.create_guardrail request + + # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. + p result +end +# [END ces_v1beta_generated_AgentService_CreateGuardrail_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_tool.rb new file mode 100644 index 000000000000..856dc8cfca2a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_tool.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_CreateTool_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_tool call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#create_tool. +# +def create_tool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateToolRequest.new + + # Call the create_tool method. + result = client.create_tool request + + # The returned object is of type Google::Cloud::Ces::V1beta::Tool. + p result +end +# [END ces_v1beta_generated_AgentService_CreateTool_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_toolset.rb new file mode 100644 index 000000000000..f329f4d6c492 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_toolset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_CreateToolset_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_toolset call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#create_toolset. +# +def create_toolset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateToolsetRequest.new + + # Call the create_toolset method. + result = client.create_toolset request + + # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. + p result +end +# [END ces_v1beta_generated_AgentService_CreateToolset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_agent.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_agent.rb new file mode 100644 index 000000000000..3228eb2b3c25 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_agent.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_DeleteAgent_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_agent call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#delete_agent. +# +def delete_agent + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteAgentRequest.new + + # Call the delete_agent method. + result = client.delete_agent request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_AgentService_DeleteAgent_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app.rb new file mode 100644 index 000000000000..3320a6a0ea2b --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_DeleteApp_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_app call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#delete_app. +# +def delete_app + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteAppRequest.new + + # Call the delete_app method. + result = client.delete_app 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 ces_v1beta_generated_AgentService_DeleteApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app_version.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app_version.rb new file mode 100644 index 000000000000..50ae1be81d48 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_DeleteAppVersion_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_app_version call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#delete_app_version. +# +def delete_app_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new + + # Call the delete_app_version method. + result = client.delete_app_version request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_AgentService_DeleteAppVersion_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_conversation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_conversation.rb new file mode 100644 index 000000000000..3186a68f3746 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_conversation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_DeleteConversation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_conversation call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#delete_conversation. +# +def delete_conversation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::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 ces_v1beta_generated_AgentService_DeleteConversation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_deployment.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_deployment.rb new file mode 100644 index 000000000000..e673759d2a13 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_DeleteDeployment_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_deployment call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#delete_deployment. +# +def delete_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new + + # Call the delete_deployment method. + result = client.delete_deployment request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_AgentService_DeleteDeployment_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_example.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_example.rb new file mode 100644 index 000000000000..12ca39c282a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_example.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_DeleteExample_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_example call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#delete_example. +# +def delete_example + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteExampleRequest.new + + # Call the delete_example method. + result = client.delete_example request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_AgentService_DeleteExample_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_guardrail.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_guardrail.rb new file mode 100644 index 000000000000..635f74171b2a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_guardrail.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_DeleteGuardrail_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_guardrail call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#delete_guardrail. +# +def delete_guardrail + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new + + # Call the delete_guardrail method. + result = client.delete_guardrail request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_AgentService_DeleteGuardrail_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_tool.rb new file mode 100644 index 000000000000..c09140933e39 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_tool.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_DeleteTool_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_tool call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#delete_tool. +# +def delete_tool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteToolRequest.new + + # Call the delete_tool method. + result = client.delete_tool request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_AgentService_DeleteTool_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_toolset.rb new file mode 100644 index 000000000000..789ac2a07a45 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_toolset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_DeleteToolset_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_toolset call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#delete_toolset. +# +def delete_toolset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new + + # Call the delete_toolset method. + result = client.delete_toolset request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_AgentService_DeleteToolset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/export_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/export_app.rb new file mode 100644 index 000000000000..3773753dcfc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/export_app.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ExportApp_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the export_app call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#export_app. +# +def export_app + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ExportAppRequest.new + + # Call the export_app method. + result = client.export_app 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 ces_v1beta_generated_AgentService_ExportApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/generate_app_resource.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/generate_app_resource.rb new file mode 100644 index 000000000000..c5c5cb8c0b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/generate_app_resource.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GenerateAppResource_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the generate_app_resource call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource. +# +def generate_app_resource + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new + + # Call the generate_app_resource method. + result = client.generate_app_resource 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 ces_v1beta_generated_AgentService_GenerateAppResource_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_agent.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_agent.rb new file mode 100644 index 000000000000..148fe6c2ed01 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_agent.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetAgent_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_agent call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_agent. +# +def get_agent + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetAgentRequest.new + + # Call the get_agent method. + result = client.get_agent request + + # The returned object is of type Google::Cloud::Ces::V1beta::Agent. + p result +end +# [END ces_v1beta_generated_AgentService_GetAgent_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app.rb new file mode 100644 index 000000000000..2768d4016fec --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetApp_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_app call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_app. +# +def get_app + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetAppRequest.new + + # Call the get_app method. + result = client.get_app request + + # The returned object is of type Google::Cloud::Ces::V1beta::App. + p result +end +# [END ces_v1beta_generated_AgentService_GetApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app_version.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app_version.rb new file mode 100644 index 000000000000..7492f5962c3b --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetAppVersion_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_app_version call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_app_version. +# +def get_app_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetAppVersionRequest.new + + # Call the get_app_version method. + result = client.get_app_version request + + # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. + p result +end +# [END ces_v1beta_generated_AgentService_GetAppVersion_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_changelog.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_changelog.rb new file mode 100644 index 000000000000..b61bf7cfc967 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_changelog.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetChangelog_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_changelog call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_changelog. +# +def get_changelog + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetChangelogRequest.new + + # Call the get_changelog method. + result = client.get_changelog request + + # The returned object is of type Google::Cloud::Ces::V1beta::Changelog. + p result +end +# [END ces_v1beta_generated_AgentService_GetChangelog_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_conversation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_conversation.rb new file mode 100644 index 000000000000..fb002469583a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_conversation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetConversation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_conversation call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_conversation. +# +def get_conversation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetConversationRequest.new + + # Call the get_conversation method. + result = client.get_conversation request + + # The returned object is of type Google::Cloud::Ces::V1beta::Conversation. + p result +end +# [END ces_v1beta_generated_AgentService_GetConversation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_deployment.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_deployment.rb new file mode 100644 index 000000000000..58a308fd1a68 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetDeployment_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_deployment call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_deployment. +# +def get_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetDeploymentRequest.new + + # Call the get_deployment method. + result = client.get_deployment request + + # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. + p result +end +# [END ces_v1beta_generated_AgentService_GetDeployment_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_example.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_example.rb new file mode 100644 index 000000000000..717af9e9ae94 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_example.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetExample_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_example call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_example. +# +def get_example + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetExampleRequest.new + + # Call the get_example method. + result = client.get_example request + + # The returned object is of type Google::Cloud::Ces::V1beta::Example. + p result +end +# [END ces_v1beta_generated_AgentService_GetExample_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_guardrail.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_guardrail.rb new file mode 100644 index 000000000000..c08d02764583 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_guardrail.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetGuardrail_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_guardrail call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_guardrail. +# +def get_guardrail + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetGuardrailRequest.new + + # Call the get_guardrail method. + result = client.get_guardrail request + + # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. + p result +end +# [END ces_v1beta_generated_AgentService_GetGuardrail_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_security_settings.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_security_settings.rb new file mode 100644 index 000000000000..e7e16b9d2330 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_security_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetSecuritySettings_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_security_settings call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_security_settings. +# +def get_security_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new + + # Call the get_security_settings method. + result = client.get_security_settings request + + # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. + p result +end +# [END ces_v1beta_generated_AgentService_GetSecuritySettings_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_tool.rb new file mode 100644 index 000000000000..9fcd1a266d36 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_tool.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetTool_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_tool call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_tool. +# +def get_tool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetToolRequest.new + + # Call the get_tool method. + result = client.get_tool request + + # The returned object is of type Google::Cloud::Ces::V1beta::Tool. + p result +end +# [END ces_v1beta_generated_AgentService_GetTool_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_toolset.rb new file mode 100644 index 000000000000..d7b1cde96e9d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_toolset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_GetToolset_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_toolset call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#get_toolset. +# +def get_toolset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetToolsetRequest.new + + # Call the get_toolset method. + result = client.get_toolset request + + # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. + p result +end +# [END ces_v1beta_generated_AgentService_GetToolset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/import_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/import_app.rb new file mode 100644 index 000000000000..545d2f59c86b --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/import_app.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ImportApp_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the import_app call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#import_app. +# +def import_app + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ImportAppRequest.new + + # Call the import_app method. + result = client.import_app 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 ces_v1beta_generated_AgentService_ImportApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_agents.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_agents.rb new file mode 100644 index 000000000000..e8028c636fae --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_agents.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ListAgents_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_agents call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#list_agents. +# +def list_agents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListAgentsRequest.new + + # Call the list_agents method. + result = client.list_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::Ces::V1beta::Agent. + p item + end +end +# [END ces_v1beta_generated_AgentService_ListAgents_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_app_versions.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_app_versions.rb new file mode 100644 index 000000000000..096ba8dfb0eb --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_app_versions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ListAppVersions_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_app_versions call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions. +# +def list_app_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new + + # Call the list_app_versions method. + result = client.list_app_versions 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::Ces::V1beta::AppVersion. + p item + end +end +# [END ces_v1beta_generated_AgentService_ListAppVersions_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_apps.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_apps.rb new file mode 100644 index 000000000000..8400d805d3a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_apps.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ListApps_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_apps call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#list_apps. +# +def list_apps + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListAppsRequest.new + + # Call the list_apps method. + result = client.list_apps 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::Ces::V1beta::App. + p item + end +end +# [END ces_v1beta_generated_AgentService_ListApps_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_changelogs.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_changelogs.rb new file mode 100644 index 000000000000..19185ddf9fc4 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_changelogs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ListChangelogs_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_changelogs call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs. +# +def list_changelogs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListChangelogsRequest.new + + # Call the list_changelogs method. + result = client.list_changelogs 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::Ces::V1beta::Changelog. + p item + end +end +# [END ces_v1beta_generated_AgentService_ListChangelogs_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_conversations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_conversations.rb new file mode 100644 index 000000000000..8539cfada01a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_conversations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ListConversations_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_conversations call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations. +# +def list_conversations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::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::Ces::V1beta::Conversation. + p item + end +end +# [END ces_v1beta_generated_AgentService_ListConversations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_deployments.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_deployments.rb new file mode 100644 index 000000000000..e0bed982f639 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_deployments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ListDeployments_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_deployments call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#list_deployments. +# +def list_deployments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new + + # Call the list_deployments method. + result = client.list_deployments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Ces::V1beta::Deployment. + p item + end +end +# [END ces_v1beta_generated_AgentService_ListDeployments_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_examples.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_examples.rb new file mode 100644 index 000000000000..96b36595ffc8 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_examples.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ListExamples_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_examples call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#list_examples. +# +def list_examples + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListExamplesRequest.new + + # Call the list_examples method. + result = client.list_examples 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::Ces::V1beta::Example. + p item + end +end +# [END ces_v1beta_generated_AgentService_ListExamples_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_guardrails.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_guardrails.rb new file mode 100644 index 000000000000..e3a271563e14 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_guardrails.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ListGuardrails_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_guardrails call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails. +# +def list_guardrails + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new + + # Call the list_guardrails method. + result = client.list_guardrails 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::Ces::V1beta::Guardrail. + p item + end +end +# [END ces_v1beta_generated_AgentService_ListGuardrails_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_tools.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_tools.rb new file mode 100644 index 000000000000..64ddcf8a5f89 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_tools.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ListTools_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_tools call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#list_tools. +# +def list_tools + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListToolsRequest.new + + # Call the list_tools method. + result = client.list_tools 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::Ces::V1beta::Tool. + p item + end +end +# [END ces_v1beta_generated_AgentService_ListTools_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_toolsets.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_toolsets.rb new file mode 100644 index 000000000000..2b1a74465327 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_toolsets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_ListToolsets_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_toolsets call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets. +# +def list_toolsets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListToolsetsRequest.new + + # Call the list_toolsets method. + result = client.list_toolsets 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::Ces::V1beta::Toolset. + p item + end +end +# [END ces_v1beta_generated_AgentService_ListToolsets_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/restore_app_version.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/restore_app_version.rb new file mode 100644 index 000000000000..d0207b6911d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/restore_app_version.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_RestoreAppVersion_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the restore_app_version call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#restore_app_version. +# +def restore_app_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.new + + # Call the restore_app_version method. + result = client.restore_app_version 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 ces_v1beta_generated_AgentService_RestoreAppVersion_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_agent.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_agent.rb new file mode 100644 index 000000000000..558c4820e225 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_agent.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_UpdateAgent_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_agent call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#update_agent. +# +def update_agent + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateAgentRequest.new + + # Call the update_agent method. + result = client.update_agent request + + # The returned object is of type Google::Cloud::Ces::V1beta::Agent. + p result +end +# [END ces_v1beta_generated_AgentService_UpdateAgent_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_app.rb new file mode 100644 index 000000000000..38d09c026728 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_app.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_UpdateApp_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_app call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#update_app. +# +def update_app + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateAppRequest.new + + # Call the update_app method. + result = client.update_app request + + # The returned object is of type Google::Cloud::Ces::V1beta::App. + p result +end +# [END ces_v1beta_generated_AgentService_UpdateApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_deployment.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_deployment.rb new file mode 100644 index 000000000000..d86adee0b940 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_UpdateDeployment_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_deployment call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#update_deployment. +# +def update_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new + + # Call the update_deployment method. + result = client.update_deployment request + + # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. + p result +end +# [END ces_v1beta_generated_AgentService_UpdateDeployment_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_example.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_example.rb new file mode 100644 index 000000000000..9a128dab9599 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_example.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_UpdateExample_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_example call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#update_example. +# +def update_example + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateExampleRequest.new + + # Call the update_example method. + result = client.update_example request + + # The returned object is of type Google::Cloud::Ces::V1beta::Example. + p result +end +# [END ces_v1beta_generated_AgentService_UpdateExample_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_guardrail.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_guardrail.rb new file mode 100644 index 000000000000..04a62fe7cf1e --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_guardrail.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_UpdateGuardrail_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_guardrail call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#update_guardrail. +# +def update_guardrail + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new + + # Call the update_guardrail method. + result = client.update_guardrail request + + # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. + p result +end +# [END ces_v1beta_generated_AgentService_UpdateGuardrail_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_security_settings.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_security_settings.rb new file mode 100644 index 000000000000..b99ab68d151f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_security_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_UpdateSecuritySettings_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_security_settings call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#update_security_settings. +# +def update_security_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new + + # Call the update_security_settings method. + result = client.update_security_settings request + + # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. + p result +end +# [END ces_v1beta_generated_AgentService_UpdateSecuritySettings_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_tool.rb new file mode 100644 index 000000000000..b960f006ef94 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_tool.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_UpdateTool_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_tool call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#update_tool. +# +def update_tool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateToolRequest.new + + # Call the update_tool method. + result = client.update_tool request + + # The returned object is of type Google::Cloud::Ces::V1beta::Tool. + p result +end +# [END ces_v1beta_generated_AgentService_UpdateTool_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_toolset.rb new file mode 100644 index 000000000000..862470b1da7f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_toolset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_AgentService_UpdateToolset_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_toolset call in the AgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::AgentService::Client#update_toolset. +# +def update_toolset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::AgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new + + # Call the update_toolset method. + result = client.update_toolset request + + # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. + p result +end +# [END ces_v1beta_generated_AgentService_UpdateToolset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation.rb new file mode 100644 index 000000000000..0461955b21b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_CreateEvaluation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_evaluation call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation. +# +def create_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new + + # Call the create_evaluation method. + result = client.create_evaluation request + + # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. + p result +end +# [END ces_v1beta_generated_EvaluationService_CreateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_dataset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_dataset.rb new file mode 100644 index 000000000000..1c7eff873e1f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_CreateEvaluationDataset_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_evaluation_dataset call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_dataset. +# +def create_evaluation_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new + + # Call the create_evaluation_dataset method. + result = client.create_evaluation_dataset request + + # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. + p result +end +# [END ces_v1beta_generated_EvaluationService_CreateEvaluationDataset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_expectation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_expectation.rb new file mode 100644 index 000000000000..a2820270778b --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_expectation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_CreateEvaluationExpectation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_evaluation_expectation call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_expectation. +# +def create_evaluation_expectation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new + + # Call the create_evaluation_expectation method. + result = client.create_evaluation_expectation request + + # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. + p result +end +# [END ces_v1beta_generated_EvaluationService_CreateEvaluationExpectation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_scheduled_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_scheduled_evaluation_run.rb new file mode 100644 index 000000000000..a9ca0c5ecb84 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_scheduled_evaluation_run.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_CreateScheduledEvaluationRun_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the create_scheduled_evaluation_run call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#create_scheduled_evaluation_run. +# +def create_scheduled_evaluation_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new + + # Call the create_scheduled_evaluation_run method. + result = client.create_scheduled_evaluation_run request + + # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. + p result +end +# [END ces_v1beta_generated_EvaluationService_CreateScheduledEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation.rb new file mode 100644 index 000000000000..7c342d0fa34c --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_DeleteEvaluation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_evaluation call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation. +# +def delete_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new + + # Call the delete_evaluation method. + result = client.delete_evaluation request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_EvaluationService_DeleteEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_dataset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_dataset.rb new file mode 100644 index 000000000000..1e15d48c7f7f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_DeleteEvaluationDataset_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_evaluation_dataset call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_dataset. +# +def delete_evaluation_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new + + # Call the delete_evaluation_dataset method. + result = client.delete_evaluation_dataset request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_EvaluationService_DeleteEvaluationDataset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_expectation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_expectation.rb new file mode 100644 index 000000000000..4bfc18702dfd --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_expectation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_DeleteEvaluationExpectation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_evaluation_expectation call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_expectation. +# +def delete_evaluation_expectation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new + + # Call the delete_evaluation_expectation method. + result = client.delete_evaluation_expectation request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_EvaluationService_DeleteEvaluationExpectation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_result.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_result.rb new file mode 100644 index 000000000000..5ef7b073137e --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_result.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_DeleteEvaluationResult_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_evaluation_result call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_result. +# +def delete_evaluation_result + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new + + # Call the delete_evaluation_result method. + result = client.delete_evaluation_result request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_EvaluationService_DeleteEvaluationResult_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_run.rb new file mode 100644 index 000000000000..6566b79a0f69 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_run.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_DeleteEvaluationRun_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_evaluation_run call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_run. +# +def delete_evaluation_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new + + # Call the delete_evaluation_run method. + result = client.delete_evaluation_run 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 ces_v1beta_generated_EvaluationService_DeleteEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_scheduled_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_scheduled_evaluation_run.rb new file mode 100644 index 000000000000..90c51a6f83bf --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_scheduled_evaluation_run.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_DeleteScheduledEvaluationRun_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the delete_scheduled_evaluation_run call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_scheduled_evaluation_run. +# +def delete_scheduled_evaluation_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new + + # Call the delete_scheduled_evaluation_run method. + result = client.delete_scheduled_evaluation_run request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END ces_v1beta_generated_EvaluationService_DeleteScheduledEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_results.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_results.rb new file mode 100644 index 000000000000..305a7c987fc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_results.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_ExportEvaluationResults_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the export_evaluation_results call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results. +# +def export_evaluation_results + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new + + # Call the export_evaluation_results method. + result = client.export_evaluation_results 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 ces_v1beta_generated_EvaluationService_ExportEvaluationResults_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_runs.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_runs.rb new file mode 100644 index 000000000000..9ce588f0513a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_runs.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_ExportEvaluationRuns_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the export_evaluation_runs call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs. +# +def export_evaluation_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new + + # Call the export_evaluation_runs method. + result = client.export_evaluation_runs 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 ces_v1beta_generated_EvaluationService_ExportEvaluationRuns_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluations.rb new file mode 100644 index 000000000000..cceb6a6a01f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluations.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_ExportEvaluations_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the export_evaluations call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluations. +# +def export_evaluations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new + + # Call the export_evaluations method. + result = client.export_evaluations 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 ces_v1beta_generated_EvaluationService_ExportEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/generate_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/generate_evaluation.rb new file mode 100644 index 000000000000..8ab06ccda610 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/generate_evaluation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_GenerateEvaluation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the generate_evaluation call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#generate_evaluation. +# +def generate_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new + + # Call the generate_evaluation method. + result = client.generate_evaluation 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 ces_v1beta_generated_EvaluationService_GenerateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation.rb new file mode 100644 index 000000000000..7b5aba264d5d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_GetEvaluation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_evaluation call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation. +# +def get_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetEvaluationRequest.new + + # Call the get_evaluation method. + result = client.get_evaluation request + + # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. + p result +end +# [END ces_v1beta_generated_EvaluationService_GetEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_dataset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_dataset.rb new file mode 100644 index 000000000000..b07e3a27af19 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_GetEvaluationDataset_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_evaluation_dataset call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_dataset. +# +def get_evaluation_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new + + # Call the get_evaluation_dataset method. + result = client.get_evaluation_dataset request + + # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. + p result +end +# [END ces_v1beta_generated_EvaluationService_GetEvaluationDataset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_expectation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_expectation.rb new file mode 100644 index 000000000000..9463c63b85f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_expectation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_GetEvaluationExpectation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_evaluation_expectation call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_expectation. +# +def get_evaluation_expectation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new + + # Call the get_evaluation_expectation method. + result = client.get_evaluation_expectation request + + # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. + p result +end +# [END ces_v1beta_generated_EvaluationService_GetEvaluationExpectation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_result.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_result.rb new file mode 100644 index 000000000000..c63b54793373 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_result.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_GetEvaluationResult_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_evaluation_result call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_result. +# +def get_evaluation_result + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new + + # Call the get_evaluation_result method. + result = client.get_evaluation_result request + + # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationResult. + p result +end +# [END ces_v1beta_generated_EvaluationService_GetEvaluationResult_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_run.rb new file mode 100644 index 000000000000..6cc271debbda --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_run.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_GetEvaluationRun_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_evaluation_run call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_run. +# +def get_evaluation_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new + + # Call the get_evaluation_run method. + result = client.get_evaluation_run request + + # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationRun. + p result +end +# [END ces_v1beta_generated_EvaluationService_GetEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_scheduled_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_scheduled_evaluation_run.rb new file mode 100644 index 000000000000..05ba90712c10 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_scheduled_evaluation_run.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_GetScheduledEvaluationRun_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the get_scheduled_evaluation_run call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_scheduled_evaluation_run. +# +def get_scheduled_evaluation_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new + + # Call the get_scheduled_evaluation_run method. + result = client.get_scheduled_evaluation_run request + + # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. + p result +end +# [END ces_v1beta_generated_EvaluationService_GetScheduledEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/import_evaluations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/import_evaluations.rb new file mode 100644 index 000000000000..506b99d31a24 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/import_evaluations.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_ImportEvaluations_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the import_evaluations call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations. +# +def import_evaluations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new + + # Call the import_evaluations method. + result = client.import_evaluations 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 ces_v1beta_generated_EvaluationService_ImportEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_datasets.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_datasets.rb new file mode 100644 index 000000000000..445671b8cea2 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_datasets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_ListEvaluationDatasets_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_evaluation_datasets call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets. +# +def list_evaluation_datasets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new + + # Call the list_evaluation_datasets method. + result = client.list_evaluation_datasets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Ces::V1beta::EvaluationDataset. + p item + end +end +# [END ces_v1beta_generated_EvaluationService_ListEvaluationDatasets_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_expectations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_expectations.rb new file mode 100644 index 000000000000..7cfc110e2bc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_expectations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_ListEvaluationExpectations_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_evaluation_expectations call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations. +# +def list_evaluation_expectations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new + + # Call the list_evaluation_expectations method. + result = client.list_evaluation_expectations 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::Ces::V1beta::EvaluationExpectation. + p item + end +end +# [END ces_v1beta_generated_EvaluationService_ListEvaluationExpectations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_results.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_results.rb new file mode 100644 index 000000000000..57699677ba6d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_results.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_ListEvaluationResults_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_evaluation_results call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results. +# +def list_evaluation_results + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new + + # Call the list_evaluation_results method. + result = client.list_evaluation_results 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::Ces::V1beta::EvaluationResult. + p item + end +end +# [END ces_v1beta_generated_EvaluationService_ListEvaluationResults_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_runs.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_runs.rb new file mode 100644 index 000000000000..441f99624f7e --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_runs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_ListEvaluationRuns_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_evaluation_runs call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs. +# +def list_evaluation_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new + + # Call the list_evaluation_runs method. + result = client.list_evaluation_runs 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::Ces::V1beta::EvaluationRun. + p item + end +end +# [END ces_v1beta_generated_EvaluationService_ListEvaluationRuns_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluations.rb new file mode 100644 index 000000000000..814694a9c86a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_ListEvaluations_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_evaluations call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations. +# +def list_evaluations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new + + # Call the list_evaluations method. + result = client.list_evaluations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Ces::V1beta::Evaluation. + p item + end +end +# [END ces_v1beta_generated_EvaluationService_ListEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_scheduled_evaluation_runs.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_scheduled_evaluation_runs.rb new file mode 100644 index 000000000000..beb6ed1c6f3f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_scheduled_evaluation_runs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_ListScheduledEvaluationRuns_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the list_scheduled_evaluation_runs call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs. +# +def list_scheduled_evaluation_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new + + # Call the list_scheduled_evaluation_runs method. + result = client.list_scheduled_evaluation_runs 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::Ces::V1beta::ScheduledEvaluationRun. + p item + end +end +# [END ces_v1beta_generated_EvaluationService_ListScheduledEvaluationRuns_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation.rb new file mode 100644 index 000000000000..e2756ddabd7f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_RunEvaluation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the run_evaluation call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation. +# +def run_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::RunEvaluationRequest.new + + # Call the run_evaluation method. + result = client.run_evaluation 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 ces_v1beta_generated_EvaluationService_RunEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation_result_metrics.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation_result_metrics.rb new file mode 100644 index 000000000000..ee7799649d42 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation_result_metrics.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_RunEvaluationResultMetrics_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the run_evaluation_result_metrics call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics. +# +def run_evaluation_result_metrics + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new + + # Call the run_evaluation_result_metrics method. + result = client.run_evaluation_result_metrics 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 ces_v1beta_generated_EvaluationService_RunEvaluationResultMetrics_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/test_persona_voice.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/test_persona_voice.rb new file mode 100644 index 000000000000..8432d7096735 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/test_persona_voice.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_TestPersonaVoice_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the test_persona_voice call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#test_persona_voice. +# +def test_persona_voice + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new + + # Call the test_persona_voice method. + result = client.test_persona_voice request + + # The returned object is of type Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse. + p result +end +# [END ces_v1beta_generated_EvaluationService_TestPersonaVoice_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation.rb new file mode 100644 index 000000000000..eb3b41c5b555 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_UpdateEvaluation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_evaluation call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation. +# +def update_evaluation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new + + # Call the update_evaluation method. + result = client.update_evaluation request + + # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. + p result +end +# [END ces_v1beta_generated_EvaluationService_UpdateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_dataset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_dataset.rb new file mode 100644 index 000000000000..f462929ccfac --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_dataset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_UpdateEvaluationDataset_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_evaluation_dataset call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_dataset. +# +def update_evaluation_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new + + # Call the update_evaluation_dataset method. + result = client.update_evaluation_dataset request + + # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. + p result +end +# [END ces_v1beta_generated_EvaluationService_UpdateEvaluationDataset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_expectation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_expectation.rb new file mode 100644 index 000000000000..083c9c29dbe4 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_expectation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_UpdateEvaluationExpectation_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_evaluation_expectation call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_expectation. +# +def update_evaluation_expectation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new + + # Call the update_evaluation_expectation method. + result = client.update_evaluation_expectation request + + # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. + p result +end +# [END ces_v1beta_generated_EvaluationService_UpdateEvaluationExpectation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_scheduled_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_scheduled_evaluation_run.rb new file mode 100644 index 000000000000..39adaa7ad341 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_scheduled_evaluation_run.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_UpdateScheduledEvaluationRun_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the update_scheduled_evaluation_run call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#update_scheduled_evaluation_run. +# +def update_scheduled_evaluation_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new + + # Call the update_scheduled_evaluation_run method. + result = client.update_scheduled_evaluation_run request + + # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. + p result +end +# [END ces_v1beta_generated_EvaluationService_UpdateScheduledEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/upload_evaluation_audio.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/upload_evaluation_audio.rb new file mode 100644 index 000000000000..28e5868fa6f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/upload_evaluation_audio.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_EvaluationService_UploadEvaluationAudio_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the upload_evaluation_audio call in the EvaluationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::EvaluationService::Client#upload_evaluation_audio. +# +def upload_evaluation_audio + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new + + # Call the upload_evaluation_audio method. + result = client.upload_evaluation_audio request + + # The returned object is of type Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse. + p result +end +# [END ces_v1beta_generated_EvaluationService_UploadEvaluationAudio_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/bidi_run_session.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/bidi_run_session.rb new file mode 100644 index 000000000000..7cf793fd47bb --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/bidi_run_session.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_SessionService_BidiRunSession_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the bidi_run_session call in the SessionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session. +# +def bidi_run_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::SessionService::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the bidi_run_session method to start streaming. + output = client.bidi_run_session input + + # Send requests on the stream. For each request object, set fields by + # passing keyword arguments. Be sure to close the stream when done. + input << Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new + input << Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage + output.each do |current_response| + p current_response + end +end +# [END ces_v1beta_generated_SessionService_BidiRunSession_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/run_session.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/run_session.rb new file mode 100644 index 000000000000..1a8ebbe58157 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/run_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_SessionService_RunSession_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the run_session call in the SessionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::SessionService::Client#run_session. +# +def run_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::RunSessionRequest.new + + # Call the run_session method. + result = client.run_session request + + # The returned object is of type Google::Cloud::Ces::V1beta::RunSessionResponse. + p result +end +# [END ces_v1beta_generated_SessionService_RunSession_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/stream_run_session.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/stream_run_session.rb new file mode 100644 index 000000000000..71b93e462905 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/stream_run_session.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_SessionService_StreamRunSession_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the stream_run_session call in the SessionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::SessionService::Client#stream_run_session. +# +def stream_run_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::SessionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::RunSessionRequest.new + + # Call the stream_run_session method to start streaming. + output = client.stream_run_session request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Ces::V1beta::RunSessionResponse + output.each do |current_response| + p current_response + end +end +# [END ces_v1beta_generated_SessionService_StreamRunSession_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json b/owl-bot-staging/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json new file mode 100644 index 000000000000..48aca717e287 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json @@ -0,0 +1,3735 @@ +{ + "client_library": { + "name": "google-cloud-ces-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.ces.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "ces_v1beta_generated_SessionService_RunSession_sync", + "title": "Snippet for the run_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::SessionService::Client#run_session.", + "file": "session_service/run_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_session", + "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client#run_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::RunSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::RunSessionResponse", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client" + }, + "method": { + "short_name": "RunSession", + "full_name": "google.cloud.ces.v1beta.SessionService.RunSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.ces.v1beta.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_SessionService_StreamRunSession_sync", + "title": "Snippet for the stream_run_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::SessionService::Client#stream_run_session.", + "file": "session_service/stream_run_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "stream_run_session", + "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client#stream_run_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::RunSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::RunSessionResponse", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client" + }, + "method": { + "short_name": "StreamRunSession", + "full_name": "google.cloud.ces.v1beta.SessionService.StreamRunSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.ces.v1beta.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_SessionService_BidiRunSession_sync", + "title": "Snippet for the bidi_run_session call in the SessionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session.", + "file": "session_service/bidi_run_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "bidi_run_session", + "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::BidiSessionClientMessage", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::BidiSessionServerMessage", + "client": { + "short_name": "SessionService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client" + }, + "method": { + "short_name": "BidiRunSession", + "full_name": "google.cloud.ces.v1beta.SessionService.BidiRunSession", + "service": { + "short_name": "SessionService", + "full_name": "google.cloud.ces.v1beta.SessionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ListApps_sync", + "title": "Snippet for the list_apps call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_apps.", + "file": "agent_service/list_apps.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_apps", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_apps", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListAppsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListAppsResponse", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ListApps", + "full_name": "google.cloud.ces.v1beta.AgentService.ListApps", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetApp_sync", + "title": "Snippet for the get_app call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_app.", + "file": "agent_service/get_app.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_app", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_app", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetAppRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::App", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetApp", + "full_name": "google.cloud.ces.v1beta.AgentService.GetApp", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_CreateApp_sync", + "title": "Snippet for the create_app call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_app.", + "file": "agent_service/create_app.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_app", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_app", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateAppRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "CreateApp", + "full_name": "google.cloud.ces.v1beta.AgentService.CreateApp", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_UpdateApp_sync", + "title": "Snippet for the update_app call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_app.", + "file": "agent_service/update_app.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_app", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_app", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateAppRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::App", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "UpdateApp", + "full_name": "google.cloud.ces.v1beta.AgentService.UpdateApp", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_DeleteApp_sync", + "title": "Snippet for the delete_app call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_app.", + "file": "agent_service/delete_app.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_app", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_app", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteAppRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "DeleteApp", + "full_name": "google.cloud.ces.v1beta.AgentService.DeleteApp", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ExportApp_sync", + "title": "Snippet for the export_app call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#export_app.", + "file": "agent_service/export_app.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_app", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#export_app", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ExportAppRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ExportApp", + "full_name": "google.cloud.ces.v1beta.AgentService.ExportApp", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ImportApp_sync", + "title": "Snippet for the import_app call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#import_app.", + "file": "agent_service/import_app.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_app", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#import_app", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ImportAppRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ImportApp", + "full_name": "google.cloud.ces.v1beta.AgentService.ImportApp", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetSecuritySettings_sync", + "title": "Snippet for the get_security_settings call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_security_settings.", + "file": "agent_service/get_security_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_security_settings", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_security_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::SecuritySettings", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetSecuritySettings", + "full_name": "google.cloud.ces.v1beta.AgentService.GetSecuritySettings", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_UpdateSecuritySettings_sync", + "title": "Snippet for the update_security_settings call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_security_settings.", + "file": "agent_service/update_security_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_security_settings", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_security_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::SecuritySettings", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "UpdateSecuritySettings", + "full_name": "google.cloud.ces.v1beta.AgentService.UpdateSecuritySettings", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ListAgents_sync", + "title": "Snippet for the list_agents call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_agents.", + "file": "agent_service/list_agents.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_agents", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_agents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListAgentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListAgentsResponse", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ListAgents", + "full_name": "google.cloud.ces.v1beta.AgentService.ListAgents", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetAgent_sync", + "title": "Snippet for the get_agent call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_agent.", + "file": "agent_service/get_agent.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_agent", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_agent", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetAgentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Agent", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetAgent", + "full_name": "google.cloud.ces.v1beta.AgentService.GetAgent", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_CreateAgent_sync", + "title": "Snippet for the create_agent call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_agent.", + "file": "agent_service/create_agent.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_agent", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_agent", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateAgentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Agent", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "CreateAgent", + "full_name": "google.cloud.ces.v1beta.AgentService.CreateAgent", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_UpdateAgent_sync", + "title": "Snippet for the update_agent call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_agent.", + "file": "agent_service/update_agent.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_agent", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_agent", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateAgentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Agent", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "UpdateAgent", + "full_name": "google.cloud.ces.v1beta.AgentService.UpdateAgent", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_DeleteAgent_sync", + "title": "Snippet for the delete_agent call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_agent.", + "file": "agent_service/delete_agent.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_agent", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_agent", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteAgentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "DeleteAgent", + "full_name": "google.cloud.ces.v1beta.AgentService.DeleteAgent", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ListExamples_sync", + "title": "Snippet for the list_examples call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_examples.", + "file": "agent_service/list_examples.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_examples", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_examples", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListExamplesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListExamplesResponse", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ListExamples", + "full_name": "google.cloud.ces.v1beta.AgentService.ListExamples", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetExample_sync", + "title": "Snippet for the get_example call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_example.", + "file": "agent_service/get_example.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_example", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_example", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetExampleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Example", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetExample", + "full_name": "google.cloud.ces.v1beta.AgentService.GetExample", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_CreateExample_sync", + "title": "Snippet for the create_example call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_example.", + "file": "agent_service/create_example.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_example", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_example", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateExampleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Example", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "CreateExample", + "full_name": "google.cloud.ces.v1beta.AgentService.CreateExample", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_UpdateExample_sync", + "title": "Snippet for the update_example call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_example.", + "file": "agent_service/update_example.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_example", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_example", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateExampleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Example", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "UpdateExample", + "full_name": "google.cloud.ces.v1beta.AgentService.UpdateExample", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_DeleteExample_sync", + "title": "Snippet for the delete_example call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_example.", + "file": "agent_service/delete_example.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_example", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_example", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteExampleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "DeleteExample", + "full_name": "google.cloud.ces.v1beta.AgentService.DeleteExample", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ListTools_sync", + "title": "Snippet for the list_tools call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_tools.", + "file": "agent_service/list_tools.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tools", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_tools", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListToolsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListToolsResponse", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ListTools", + "full_name": "google.cloud.ces.v1beta.AgentService.ListTools", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetTool_sync", + "title": "Snippet for the get_tool call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_tool.", + "file": "agent_service/get_tool.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_tool", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_tool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetToolRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Tool", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetTool", + "full_name": "google.cloud.ces.v1beta.AgentService.GetTool", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ListConversations_sync", + "title": "Snippet for the list_conversations call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations.", + "file": "agent_service/list_conversations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_conversations", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListConversationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListConversationsResponse", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ListConversations", + "full_name": "google.cloud.ces.v1beta.AgentService.ListConversations", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetConversation_sync", + "title": "Snippet for the get_conversation call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_conversation.", + "file": "agent_service/get_conversation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_conversation", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_conversation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetConversationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Conversation", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetConversation", + "full_name": "google.cloud.ces.v1beta.AgentService.GetConversation", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_DeleteConversation_sync", + "title": "Snippet for the delete_conversation call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_conversation.", + "file": "agent_service/delete_conversation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_conversation", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_conversation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteConversationRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "DeleteConversation", + "full_name": "google.cloud.ces.v1beta.AgentService.DeleteConversation", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_BatchDeleteConversations_sync", + "title": "Snippet for the batch_delete_conversations call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#batch_delete_conversations.", + "file": "agent_service/batch_delete_conversations.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_delete_conversations", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#batch_delete_conversations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "BatchDeleteConversations", + "full_name": "google.cloud.ces.v1beta.AgentService.BatchDeleteConversations", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_CreateTool_sync", + "title": "Snippet for the create_tool call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_tool.", + "file": "agent_service/create_tool.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_tool", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_tool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateToolRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Tool", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "CreateTool", + "full_name": "google.cloud.ces.v1beta.AgentService.CreateTool", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_UpdateTool_sync", + "title": "Snippet for the update_tool call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_tool.", + "file": "agent_service/update_tool.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_tool", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_tool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateToolRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Tool", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "UpdateTool", + "full_name": "google.cloud.ces.v1beta.AgentService.UpdateTool", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_DeleteTool_sync", + "title": "Snippet for the delete_tool call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_tool.", + "file": "agent_service/delete_tool.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_tool", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_tool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteToolRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "DeleteTool", + "full_name": "google.cloud.ces.v1beta.AgentService.DeleteTool", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ListGuardrails_sync", + "title": "Snippet for the list_guardrails call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails.", + "file": "agent_service/list_guardrails.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_guardrails", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListGuardrailsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListGuardrailsResponse", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ListGuardrails", + "full_name": "google.cloud.ces.v1beta.AgentService.ListGuardrails", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetGuardrail_sync", + "title": "Snippet for the get_guardrail call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_guardrail.", + "file": "agent_service/get_guardrail.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_guardrail", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_guardrail", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetGuardrailRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Guardrail", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetGuardrail", + "full_name": "google.cloud.ces.v1beta.AgentService.GetGuardrail", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_CreateGuardrail_sync", + "title": "Snippet for the create_guardrail call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_guardrail.", + "file": "agent_service/create_guardrail.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_guardrail", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_guardrail", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateGuardrailRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Guardrail", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "CreateGuardrail", + "full_name": "google.cloud.ces.v1beta.AgentService.CreateGuardrail", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_UpdateGuardrail_sync", + "title": "Snippet for the update_guardrail call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_guardrail.", + "file": "agent_service/update_guardrail.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_guardrail", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_guardrail", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Guardrail", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "UpdateGuardrail", + "full_name": "google.cloud.ces.v1beta.AgentService.UpdateGuardrail", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_DeleteGuardrail_sync", + "title": "Snippet for the delete_guardrail call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_guardrail.", + "file": "agent_service/delete_guardrail.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_guardrail", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_guardrail", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "DeleteGuardrail", + "full_name": "google.cloud.ces.v1beta.AgentService.DeleteGuardrail", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ListDeployments_sync", + "title": "Snippet for the list_deployments call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_deployments.", + "file": "agent_service/list_deployments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_deployments", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_deployments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListDeploymentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListDeploymentsResponse", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ListDeployments", + "full_name": "google.cloud.ces.v1beta.AgentService.ListDeployments", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetDeployment_sync", + "title": "Snippet for the get_deployment call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_deployment.", + "file": "agent_service/get_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_deployment", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Deployment", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetDeployment", + "full_name": "google.cloud.ces.v1beta.AgentService.GetDeployment", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_CreateDeployment_sync", + "title": "Snippet for the create_deployment call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_deployment.", + "file": "agent_service/create_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_deployment", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Deployment", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "CreateDeployment", + "full_name": "google.cloud.ces.v1beta.AgentService.CreateDeployment", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_UpdateDeployment_sync", + "title": "Snippet for the update_deployment call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_deployment.", + "file": "agent_service/update_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_deployment", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Deployment", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "UpdateDeployment", + "full_name": "google.cloud.ces.v1beta.AgentService.UpdateDeployment", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_DeleteDeployment_sync", + "title": "Snippet for the delete_deployment call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_deployment.", + "file": "agent_service/delete_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_deployment", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "DeleteDeployment", + "full_name": "google.cloud.ces.v1beta.AgentService.DeleteDeployment", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ListToolsets_sync", + "title": "Snippet for the list_toolsets call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets.", + "file": "agent_service/list_toolsets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_toolsets", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListToolsetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListToolsetsResponse", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ListToolsets", + "full_name": "google.cloud.ces.v1beta.AgentService.ListToolsets", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetToolset_sync", + "title": "Snippet for the get_toolset call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_toolset.", + "file": "agent_service/get_toolset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_toolset", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_toolset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetToolsetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Toolset", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetToolset", + "full_name": "google.cloud.ces.v1beta.AgentService.GetToolset", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_CreateToolset_sync", + "title": "Snippet for the create_toolset call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_toolset.", + "file": "agent_service/create_toolset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_toolset", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_toolset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateToolsetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Toolset", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "CreateToolset", + "full_name": "google.cloud.ces.v1beta.AgentService.CreateToolset", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_UpdateToolset_sync", + "title": "Snippet for the update_toolset call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_toolset.", + "file": "agent_service/update_toolset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_toolset", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_toolset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateToolsetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Toolset", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "UpdateToolset", + "full_name": "google.cloud.ces.v1beta.AgentService.UpdateToolset", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_DeleteToolset_sync", + "title": "Snippet for the delete_toolset call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_toolset.", + "file": "agent_service/delete_toolset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_toolset", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_toolset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteToolsetRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "DeleteToolset", + "full_name": "google.cloud.ces.v1beta.AgentService.DeleteToolset", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ListAppVersions_sync", + "title": "Snippet for the list_app_versions call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions.", + "file": "agent_service/list_app_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_app_versions", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListAppVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListAppVersionsResponse", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ListAppVersions", + "full_name": "google.cloud.ces.v1beta.AgentService.ListAppVersions", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetAppVersion_sync", + "title": "Snippet for the get_app_version call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_app_version.", + "file": "agent_service/get_app_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_app_version", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_app_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetAppVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::AppVersion", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetAppVersion", + "full_name": "google.cloud.ces.v1beta.AgentService.GetAppVersion", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_CreateAppVersion_sync", + "title": "Snippet for the create_app_version call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_app_version.", + "file": "agent_service/create_app_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_app_version", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_app_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateAppVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::AppVersion", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "CreateAppVersion", + "full_name": "google.cloud.ces.v1beta.AgentService.CreateAppVersion", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_DeleteAppVersion_sync", + "title": "Snippet for the delete_app_version call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_app_version.", + "file": "agent_service/delete_app_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_app_version", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_app_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "DeleteAppVersion", + "full_name": "google.cloud.ces.v1beta.AgentService.DeleteAppVersion", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_RestoreAppVersion_sync", + "title": "Snippet for the restore_app_version call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#restore_app_version.", + "file": "agent_service/restore_app_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "restore_app_version", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#restore_app_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "RestoreAppVersion", + "full_name": "google.cloud.ces.v1beta.AgentService.RestoreAppVersion", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GenerateAppResource_sync", + "title": "Snippet for the generate_app_resource call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource.", + "file": "agent_service/generate_app_resource.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_app_resource", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GenerateAppResource", + "full_name": "google.cloud.ces.v1beta.AgentService.GenerateAppResource", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_ListChangelogs_sync", + "title": "Snippet for the list_changelogs call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs.", + "file": "agent_service/list_changelogs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_changelogs", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListChangelogsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListChangelogsResponse", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "ListChangelogs", + "full_name": "google.cloud.ces.v1beta.AgentService.ListChangelogs", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_AgentService_GetChangelog_sync", + "title": "Snippet for the get_changelog call in the AgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_changelog.", + "file": "agent_service/get_changelog.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_changelog", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_changelog", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetChangelogRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Changelog", + "client": { + "short_name": "AgentService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" + }, + "method": { + "short_name": "GetChangelog", + "full_name": "google.cloud.ces.v1beta.AgentService.GetChangelog", + "service": { + "short_name": "AgentService", + "full_name": "google.cloud.ces.v1beta.AgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_RunEvaluation_sync", + "title": "Snippet for the run_evaluation call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation.", + "file": "evaluation_service/run_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_evaluation", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::RunEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "RunEvaluation", + "full_name": "google.cloud.ces.v1beta.EvaluationService.RunEvaluation", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_UploadEvaluationAudio_sync", + "title": "Snippet for the upload_evaluation_audio call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#upload_evaluation_audio.", + "file": "evaluation_service/upload_evaluation_audio.rb", + "language": "RUBY", + "client_method": { + "short_name": "upload_evaluation_audio", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#upload_evaluation_audio", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "UploadEvaluationAudio", + "full_name": "google.cloud.ces.v1beta.EvaluationService.UploadEvaluationAudio", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_CreateEvaluation_sync", + "title": "Snippet for the create_evaluation call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation.", + "file": "evaluation_service/create_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_evaluation", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Evaluation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "CreateEvaluation", + "full_name": "google.cloud.ces.v1beta.EvaluationService.CreateEvaluation", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_GenerateEvaluation_sync", + "title": "Snippet for the generate_evaluation call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#generate_evaluation.", + "file": "evaluation_service/generate_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_evaluation", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#generate_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "GenerateEvaluation", + "full_name": "google.cloud.ces.v1beta.EvaluationService.GenerateEvaluation", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ImportEvaluations_sync", + "title": "Snippet for the import_evaluations call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations.", + "file": "evaluation_service/import_evaluations.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_evaluations", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ImportEvaluations", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ImportEvaluations", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_CreateEvaluationDataset_sync", + "title": "Snippet for the create_evaluation_dataset call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_dataset.", + "file": "evaluation_service/create_evaluation_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_evaluation_dataset", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::EvaluationDataset", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "CreateEvaluationDataset", + "full_name": "google.cloud.ces.v1beta.EvaluationService.CreateEvaluationDataset", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_UpdateEvaluation_sync", + "title": "Snippet for the update_evaluation call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation.", + "file": "evaluation_service/update_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_evaluation", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Evaluation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "UpdateEvaluation", + "full_name": "google.cloud.ces.v1beta.EvaluationService.UpdateEvaluation", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_UpdateEvaluationDataset_sync", + "title": "Snippet for the update_evaluation_dataset call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_dataset.", + "file": "evaluation_service/update_evaluation_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_evaluation_dataset", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::EvaluationDataset", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "UpdateEvaluationDataset", + "full_name": "google.cloud.ces.v1beta.EvaluationService.UpdateEvaluationDataset", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_DeleteEvaluation_sync", + "title": "Snippet for the delete_evaluation call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation.", + "file": "evaluation_service/delete_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_evaluation", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "DeleteEvaluation", + "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteEvaluation", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_DeleteEvaluationResult_sync", + "title": "Snippet for the delete_evaluation_result call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_result.", + "file": "evaluation_service/delete_evaluation_result.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_evaluation_result", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_result", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "DeleteEvaluationResult", + "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationResult", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_DeleteEvaluationDataset_sync", + "title": "Snippet for the delete_evaluation_dataset call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_dataset.", + "file": "evaluation_service/delete_evaluation_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_evaluation_dataset", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "DeleteEvaluationDataset", + "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationDataset", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_DeleteEvaluationRun_sync", + "title": "Snippet for the delete_evaluation_run call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_run.", + "file": "evaluation_service/delete_evaluation_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_evaluation_run", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "DeleteEvaluationRun", + "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationRun", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_GetEvaluation_sync", + "title": "Snippet for the get_evaluation call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation.", + "file": "evaluation_service/get_evaluation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_evaluation", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetEvaluationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::Evaluation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "GetEvaluation", + "full_name": "google.cloud.ces.v1beta.EvaluationService.GetEvaluation", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_GetEvaluationResult_sync", + "title": "Snippet for the get_evaluation_result call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_result.", + "file": "evaluation_service/get_evaluation_result.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_evaluation_result", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_result", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::EvaluationResult", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "GetEvaluationResult", + "full_name": "google.cloud.ces.v1beta.EvaluationService.GetEvaluationResult", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_GetEvaluationDataset_sync", + "title": "Snippet for the get_evaluation_dataset call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_dataset.", + "file": "evaluation_service/get_evaluation_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_evaluation_dataset", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::EvaluationDataset", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "GetEvaluationDataset", + "full_name": "google.cloud.ces.v1beta.EvaluationService.GetEvaluationDataset", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_GetEvaluationRun_sync", + "title": "Snippet for the get_evaluation_run call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_run.", + "file": "evaluation_service/get_evaluation_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_evaluation_run", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::EvaluationRun", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "GetEvaluationRun", + "full_name": "google.cloud.ces.v1beta.EvaluationService.GetEvaluationRun", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ListEvaluations_sync", + "title": "Snippet for the list_evaluations call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations.", + "file": "evaluation_service/list_evaluations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_evaluations", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListEvaluationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListEvaluationsResponse", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ListEvaluations", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ListEvaluations", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ListEvaluationResults_sync", + "title": "Snippet for the list_evaluation_results call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results.", + "file": "evaluation_service/list_evaluation_results.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_evaluation_results", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ListEvaluationResults", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ListEvaluationResults", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ListEvaluationDatasets_sync", + "title": "Snippet for the list_evaluation_datasets call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets.", + "file": "evaluation_service/list_evaluation_datasets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_evaluation_datasets", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ListEvaluationDatasets", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ListEvaluationDatasets", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ListEvaluationRuns_sync", + "title": "Snippet for the list_evaluation_runs call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs.", + "file": "evaluation_service/list_evaluation_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_evaluation_runs", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ListEvaluationRuns", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ListEvaluationRuns", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ListEvaluationExpectations_sync", + "title": "Snippet for the list_evaluation_expectations call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations.", + "file": "evaluation_service/list_evaluation_expectations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_evaluation_expectations", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ListEvaluationExpectations", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ListEvaluationExpectations", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_GetEvaluationExpectation_sync", + "title": "Snippet for the get_evaluation_expectation call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_expectation.", + "file": "evaluation_service/get_evaluation_expectation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_evaluation_expectation", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_expectation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::EvaluationExpectation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "GetEvaluationExpectation", + "full_name": "google.cloud.ces.v1beta.EvaluationService.GetEvaluationExpectation", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_CreateEvaluationExpectation_sync", + "title": "Snippet for the create_evaluation_expectation call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_expectation.", + "file": "evaluation_service/create_evaluation_expectation.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_evaluation_expectation", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_expectation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::EvaluationExpectation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "CreateEvaluationExpectation", + "full_name": "google.cloud.ces.v1beta.EvaluationService.CreateEvaluationExpectation", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_UpdateEvaluationExpectation_sync", + "title": "Snippet for the update_evaluation_expectation call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_expectation.", + "file": "evaluation_service/update_evaluation_expectation.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_evaluation_expectation", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_expectation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::EvaluationExpectation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "UpdateEvaluationExpectation", + "full_name": "google.cloud.ces.v1beta.EvaluationService.UpdateEvaluationExpectation", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_DeleteEvaluationExpectation_sync", + "title": "Snippet for the delete_evaluation_expectation call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_expectation.", + "file": "evaluation_service/delete_evaluation_expectation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_evaluation_expectation", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_expectation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "DeleteEvaluationExpectation", + "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationExpectation", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_CreateScheduledEvaluationRun_sync", + "title": "Snippet for the create_scheduled_evaluation_run call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#create_scheduled_evaluation_run.", + "file": "evaluation_service/create_scheduled_evaluation_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_scheduled_evaluation_run", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_scheduled_evaluation_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "CreateScheduledEvaluationRun", + "full_name": "google.cloud.ces.v1beta.EvaluationService.CreateScheduledEvaluationRun", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_GetScheduledEvaluationRun_sync", + "title": "Snippet for the get_scheduled_evaluation_run call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_scheduled_evaluation_run.", + "file": "evaluation_service/get_scheduled_evaluation_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scheduled_evaluation_run", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_scheduled_evaluation_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "GetScheduledEvaluationRun", + "full_name": "google.cloud.ces.v1beta.EvaluationService.GetScheduledEvaluationRun", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ListScheduledEvaluationRuns_sync", + "title": "Snippet for the list_scheduled_evaluation_runs call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs.", + "file": "evaluation_service/list_scheduled_evaluation_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scheduled_evaluation_runs", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ListScheduledEvaluationRuns", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ListScheduledEvaluationRuns", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_UpdateScheduledEvaluationRun_sync", + "title": "Snippet for the update_scheduled_evaluation_run call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#update_scheduled_evaluation_run.", + "file": "evaluation_service/update_scheduled_evaluation_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_scheduled_evaluation_run", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_scheduled_evaluation_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "UpdateScheduledEvaluationRun", + "full_name": "google.cloud.ces.v1beta.EvaluationService.UpdateScheduledEvaluationRun", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_DeleteScheduledEvaluationRun_sync", + "title": "Snippet for the delete_scheduled_evaluation_run call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_scheduled_evaluation_run.", + "file": "evaluation_service/delete_scheduled_evaluation_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_scheduled_evaluation_run", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_scheduled_evaluation_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "DeleteScheduledEvaluationRun", + "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteScheduledEvaluationRun", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_TestPersonaVoice_sync", + "title": "Snippet for the test_persona_voice call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#test_persona_voice.", + "file": "evaluation_service/test_persona_voice.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_persona_voice", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#test_persona_voice", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "TestPersonaVoice", + "full_name": "google.cloud.ces.v1beta.EvaluationService.TestPersonaVoice", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ExportEvaluations_sync", + "title": "Snippet for the export_evaluations call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluations.", + "file": "evaluation_service/export_evaluations.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_evaluations", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ExportEvaluations", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ExportEvaluations", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ExportEvaluationRuns_sync", + "title": "Snippet for the export_evaluation_runs call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs.", + "file": "evaluation_service/export_evaluation_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_evaluation_runs", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ExportEvaluationRuns", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ExportEvaluationRuns", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ExportEvaluationResults_sync", + "title": "Snippet for the export_evaluation_results call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results.", + "file": "evaluation_service/export_evaluation_results.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_evaluation_results", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ExportEvaluationResults", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ExportEvaluationResults", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_RunEvaluationResultMetrics_sync", + "title": "Snippet for the run_evaluation_result_metrics call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics.", + "file": "evaluation_service/run_evaluation_result_metrics.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_evaluation_result_metrics", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "RunEvaluationResultMetrics", + "full_name": "google.cloud.ces.v1beta.EvaluationService.RunEvaluationResultMetrics", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_ToolService_ExecuteTool_sync", + "title": "Snippet for the execute_tool call in the ToolService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::ToolService::Client#execute_tool.", + "file": "tool_service/execute_tool.rb", + "language": "RUBY", + "client_method": { + "short_name": "execute_tool", + "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client#execute_tool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ExecuteToolRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::ExecuteToolResponse", + "client": { + "short_name": "ToolService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client" + }, + "method": { + "short_name": "ExecuteTool", + "full_name": "google.cloud.ces.v1beta.ToolService.ExecuteTool", + "service": { + "short_name": "ToolService", + "full_name": "google.cloud.ces.v1beta.ToolService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_ToolService_RetrieveToolSchema_sync", + "title": "Snippet for the retrieve_tool_schema call in the ToolService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tool_schema.", + "file": "tool_service/retrieve_tool_schema.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_tool_schema", + "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tool_schema", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse", + "client": { + "short_name": "ToolService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client" + }, + "method": { + "short_name": "RetrieveToolSchema", + "full_name": "google.cloud.ces.v1beta.ToolService.RetrieveToolSchema", + "service": { + "short_name": "ToolService", + "full_name": "google.cloud.ces.v1beta.ToolService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_ToolService_RetrieveTools_sync", + "title": "Snippet for the retrieve_tools call in the ToolService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tools.", + "file": "tool_service/retrieve_tools.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_tools", + "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tools", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::RetrieveToolsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::RetrieveToolsResponse", + "client": { + "short_name": "ToolService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client" + }, + "method": { + "short_name": "RetrieveTools", + "full_name": "google.cloud.ces.v1beta.ToolService.RetrieveTools", + "service": { + "short_name": "ToolService", + "full_name": "google.cloud.ces.v1beta.ToolService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_WidgetService_GenerateChatToken_sync", + "title": "Snippet for the generate_chat_token call in the WidgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::WidgetService::Client#generate_chat_token.", + "file": "widget_service/generate_chat_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_chat_token", + "full_name": "::Google::Cloud::Ces::V1beta::WidgetService::Client#generate_chat_token", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse", + "client": { + "short_name": "WidgetService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::WidgetService::Client" + }, + "method": { + "short_name": "GenerateChatToken", + "full_name": "google.cloud.ces.v1beta.WidgetService.GenerateChatToken", + "service": { + "short_name": "WidgetService", + "full_name": "google.cloud.ces.v1beta.WidgetService" + } + } + }, + "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-ces-v1beta/snippets/tool_service/execute_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/execute_tool.rb new file mode 100644 index 000000000000..6703b432d710 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/execute_tool.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_ToolService_ExecuteTool_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the execute_tool call in the ToolService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::ToolService::Client#execute_tool. +# +def execute_tool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::ToolService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::ExecuteToolRequest.new + + # Call the execute_tool method. + result = client.execute_tool request + + # The returned object is of type Google::Cloud::Ces::V1beta::ExecuteToolResponse. + p result +end +# [END ces_v1beta_generated_ToolService_ExecuteTool_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tool_schema.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tool_schema.rb new file mode 100644 index 000000000000..6ddf67b348a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tool_schema.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_ToolService_RetrieveToolSchema_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the retrieve_tool_schema call in the ToolService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tool_schema. +# +def retrieve_tool_schema + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::ToolService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new + + # Call the retrieve_tool_schema method. + result = client.retrieve_tool_schema request + + # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse. + p result +end +# [END ces_v1beta_generated_ToolService_RetrieveToolSchema_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tools.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tools.rb new file mode 100644 index 000000000000..a6778d617a30 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tools.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_ToolService_RetrieveTools_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the retrieve_tools call in the ToolService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tools. +# +def retrieve_tools + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::ToolService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new + + # Call the retrieve_tools method. + result = client.retrieve_tools request + + # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolsResponse. + p result +end +# [END ces_v1beta_generated_ToolService_RetrieveTools_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/widget_service/generate_chat_token.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/widget_service/generate_chat_token.rb new file mode 100644 index 000000000000..467330d2c2bf --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/snippets/widget_service/generate_chat_token.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START ces_v1beta_generated_WidgetService_GenerateChatToken_sync] +require "google/cloud/ces/v1beta" + +## +# Snippet for the generate_chat_token call in the WidgetService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Ces::V1beta::WidgetService::Client#generate_chat_token. +# +def generate_chat_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Ces::V1beta::WidgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new + + # Call the generate_chat_token method. + result = client.generate_chat_token request + + # The returned object is of type Google::Cloud::Ces::V1beta::GenerateChatTokenResponse. + p result +end +# [END ces_v1beta_generated_WidgetService_GenerateChatToken_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_operations_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_operations_test.rb new file mode 100644 index 000000000000..9592fc1ca1ae --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/ces/v1beta/agent_service_pb" +require "google/cloud/ces/v1beta/agent_service_services_pb" +require "google/cloud/ces/v1beta/agent_service" + +class ::Google::Cloud::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_paths_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_paths_test.rb new file mode 100644 index 000000000000..cf90cd39220f --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_paths_test.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/agent_service" + +class ::Google::Cloud::Ces::V1beta::AgentService::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_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::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.agent_path project: "value0", location: "value1", app: "value2", agent: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/agents/value3", path + end + end + + def test_app_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_path project: "value0", location: "value1", app: "value2" + assert_equal "projects/value0/locations/value1/apps/value2", path + end + end + + def test_app_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_version_path project: "value0", location: "value1", app: "value2", version: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/versions/value3", path + end + end + + def test_changelog_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.changelog_path project: "value0", location: "value1", app: "value2", changelog: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/changelogs/value3", path + 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::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.conversation_path project: "value0", location: "value1", app: "value2", conversation: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/conversations/value3", path + end + end + + def test_dataset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project: "value0", location: "value1", dataset: "value2" + assert_equal "projects/value0/locations/value1/datasets/value2", path + end + end + + def test_deidentify_template_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.deidentify_template_path organization: "value0", location: "value1", deidentify_template: "value2" + assert_equal "organizations/value0/locations/value1/deidentifyTemplates/value2", path + + path = client.deidentify_template_path project: "value0", location: "value1", deidentify_template: "value2" + assert_equal "projects/value0/locations/value1/deidentifyTemplates/value2", path + end + end + + def test_deployment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.deployment_path project: "value0", location: "value1", app: "value2", deployment: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/deployments/value3", path + end + end + + def test_dialogflow_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::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dialogflow_agent_path project: "value0", location: "value1", agent: "value2" + assert_equal "projects/value0/locations/value1/agents/value2", path + end + end + + def test_engine_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.engine_path project: "value0", location: "value1", collection: "value2", engine: "value3" + assert_equal "projects/value0/locations/value1/collections/value2/engines/value3", path + end + end + + def test_evaluation_run_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.evaluation_run_path project: "value0", location: "value1", app: "value2", evaluation_run: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/evaluationRuns/value3", path + end + end + + def test_example_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.example_path project: "value0", location: "value1", app: "value2", example: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/examples/value3", path + end + end + + def test_guardrail_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.guardrail_path project: "value0", location: "value1", app: "value2", guardrail: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/guardrails/value3", path + end + end + + def test_inspect_template_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.inspect_template_path organization: "value0", location: "value1", inspect_template: "value2" + assert_equal "organizations/value0/locations/value1/inspectTemplates/value2", path + + path = client.inspect_template_path project: "value0", location: "value1", inspect_template: "value2" + assert_equal "projects/value0/locations/value1/inspectTemplates/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::Ces::V1beta::AgentService::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_secret_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" + assert_equal "projects/value0/secrets/value1/versions/value2", path + end + end + + def test_security_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_settings_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/securitySettings", path + end + end + + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" + assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path + end + end + + def test_tool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tool_path project: "value0", location: "value1", app: "value2", tool: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/tools/value3", path + end + end + + def test_toolset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.toolset_path project: "value0", location: "value1", app: "value2", toolset: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/toolsets/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_rest_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_rest_test.rb new file mode 100644 index 000000000000..270907c2d238 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_rest_test.rb @@ -0,0 +1,2948 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/agent_service_pb" +require "google/cloud/ces/v1beta/agent_service/rest" + + +class ::Google::Cloud::Ces::V1beta::AgentService::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_apps + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListAppsResponse.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" + + list_apps_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_apps_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_apps_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_apps({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_apps parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_apps ::Google::Cloud::Ces::V1beta::ListAppsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_apps({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_apps(::Google::Cloud::Ces::V1beta::ListAppsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_apps_client_stub.call_count + end + end + end + + def test_get_app + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::App.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_app_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_app({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_app name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_app ::Google::Cloud::Ces::V1beta::GetAppRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_app({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_app(::Google::Cloud::Ces::V1beta::GetAppRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_app_client_stub.call_count + end + end + end + + def test_create_app + # 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" + app_id = "hello world" + app = {} + + create_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_app_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_app({ parent: parent, app_id: app_id, app: app }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_app parent: parent, app_id: app_id, app: app do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_app ::Google::Cloud::Ces::V1beta::CreateAppRequest.new(parent: parent, app_id: app_id, app: app) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_app({ parent: parent, app_id: app_id, app: app }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_app(::Google::Cloud::Ces::V1beta::CreateAppRequest.new(parent: parent, app_id: app_id, app: app), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_app_client_stub.call_count + end + end + end + + def test_update_app + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::App.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + app = {} + update_mask = {} + + update_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_app_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_app({ app: app, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_app app: app, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_app ::Google::Cloud::Ces::V1beta::UpdateAppRequest.new(app: app, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_app({ app: app, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_app(::Google::Cloud::Ces::V1beta::UpdateAppRequest.new(app: app, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_app_client_stub.call_count + end + end + end + + def test_delete_app + # 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" + etag = "hello world" + + delete_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_app_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_app({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_app name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_app ::Google::Cloud::Ces::V1beta::DeleteAppRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_app({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_app(::Google::Cloud::Ces::V1beta::DeleteAppRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_app_client_stub.call_count + end + end + end + + def test_export_app + # 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" + export_format = :EXPORT_FORMAT_UNSPECIFIED + gcs_uri = "hello world" + app_version = "hello world" + + export_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_export_app_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_app({ name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_app name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_app ::Google::Cloud::Ces::V1beta::ExportAppRequest.new(name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_app({ name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_app(::Google::Cloud::Ces::V1beta::ExportAppRequest.new(name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_app_client_stub.call_count + end + end + end + + def test_import_app + # 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. + gcs_uri = "hello world" + parent = "hello world" + display_name = "hello world" + app_id = "hello world" + import_options = {} + ignore_app_lock = true + + import_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_import_app_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_app({ gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_app gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_app ::Google::Cloud::Ces::V1beta::ImportAppRequest.new(gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_app({ gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_app(::Google::Cloud::Ces::V1beta::ImportAppRequest.new(gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_app_client_stub.call_count + end + end + end + + def test_get_security_settings + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::SecuritySettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_security_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_security_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_security_settings_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_security_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_security_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_security_settings ::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_security_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_security_settings(::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_security_settings_client_stub.call_count + end + end + end + + def test_update_security_settings + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::SecuritySettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + security_settings = {} + update_mask = {} + + update_security_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_security_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_security_settings_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_security_settings({ security_settings: security_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_security_settings security_settings: security_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_security_settings ::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new(security_settings: security_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_security_settings({ security_settings: security_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_security_settings(::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new(security_settings: security_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_security_settings_client_stub.call_count + end + end + end + + def test_list_agents + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListAgentsResponse.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" + + list_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_agents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_agents_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_agents ::Google::Cloud::Ces::V1beta::ListAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_agents(::Google::Cloud::Ces::V1beta::ListAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_agents_client_stub.call_count + end + end + end + + def test_get_agent + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Agent.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_agent_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_agent_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_agent({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_agent name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_agent ::Google::Cloud::Ces::V1beta::GetAgentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_agent({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_agent(::Google::Cloud::Ces::V1beta::GetAgentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_agent_client_stub.call_count + end + end + end + + def test_create_agent + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Agent.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + agent_id = "hello world" + agent = {} + + create_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_agent_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_agent_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_agent({ parent: parent, agent_id: agent_id, agent: agent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_agent parent: parent, agent_id: agent_id, agent: agent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_agent ::Google::Cloud::Ces::V1beta::CreateAgentRequest.new(parent: parent, agent_id: agent_id, agent: agent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_agent({ parent: parent, agent_id: agent_id, agent: agent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_agent(::Google::Cloud::Ces::V1beta::CreateAgentRequest.new(parent: parent, agent_id: agent_id, agent: agent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_agent_client_stub.call_count + end + end + end + + def test_update_agent + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Agent.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + agent = {} + update_mask = {} + + update_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_agent_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_agent_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_agent({ agent: agent, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_agent agent: agent, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_agent ::Google::Cloud::Ces::V1beta::UpdateAgentRequest.new(agent: agent, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_agent({ agent: agent, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_agent(::Google::Cloud::Ces::V1beta::UpdateAgentRequest.new(agent: agent, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_agent_client_stub.call_count + end + end + end + + def test_delete_agent + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + etag = "hello world" + + delete_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_agent_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_agent_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_agent({ name: name, force: force, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_agent name: name, force: force, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_agent ::Google::Cloud::Ces::V1beta::DeleteAgentRequest.new(name: name, force: force, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_agent({ name: name, force: force, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_agent(::Google::Cloud::Ces::V1beta::DeleteAgentRequest.new(name: name, force: force, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_agent_client_stub.call_count + end + end + end + + def test_list_examples + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListExamplesResponse.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" + + list_examples_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_examples_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_examples_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_examples({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_examples parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_examples ::Google::Cloud::Ces::V1beta::ListExamplesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_examples({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_examples(::Google::Cloud::Ces::V1beta::ListExamplesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_examples_client_stub.call_count + end + end + end + + def test_get_example + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Example.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_example_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_example_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_example_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_example({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_example name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_example ::Google::Cloud::Ces::V1beta::GetExampleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_example({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_example(::Google::Cloud::Ces::V1beta::GetExampleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_example_client_stub.call_count + end + end + end + + def test_create_example + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Example.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + example_id = "hello world" + example = {} + + create_example_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_example_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_example_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_example({ parent: parent, example_id: example_id, example: example }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_example parent: parent, example_id: example_id, example: example do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_example ::Google::Cloud::Ces::V1beta::CreateExampleRequest.new(parent: parent, example_id: example_id, example: example) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_example({ parent: parent, example_id: example_id, example: example }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_example(::Google::Cloud::Ces::V1beta::CreateExampleRequest.new(parent: parent, example_id: example_id, example: example), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_example_client_stub.call_count + end + end + end + + def test_update_example + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Example.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + example = {} + update_mask = {} + + update_example_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_example_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_example_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_example({ example: example, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_example example: example, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_example ::Google::Cloud::Ces::V1beta::UpdateExampleRequest.new(example: example, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_example({ example: example, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_example(::Google::Cloud::Ces::V1beta::UpdateExampleRequest.new(example: example, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_example_client_stub.call_count + end + end + end + + def test_delete_example + # 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" + etag = "hello world" + + delete_example_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_example_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_example_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_example({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_example name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_example ::Google::Cloud::Ces::V1beta::DeleteExampleRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_example({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_example(::Google::Cloud::Ces::V1beta::DeleteExampleRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_example_client_stub.call_count + end + end + end + + def test_list_tools + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListToolsResponse.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" + + list_tools_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_tools_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tools_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tools parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tools ::Google::Cloud::Ces::V1beta::ListToolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_tools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_tools(::Google::Cloud::Ces::V1beta::ListToolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tools_client_stub.call_count + end + end + end + + def test_get_tool + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Tool.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_tool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_tool_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_tool({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_tool name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_tool ::Google::Cloud::Ces::V1beta::GetToolRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_tool({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_tool(::Google::Cloud::Ces::V1beta::GetToolRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_tool_client_stub.call_count + end + end + end + + def test_list_conversations + # Create test objects. + client_result = ::Google::Cloud::Ces::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" + source = :SOURCE_UNSPECIFIED + sources = [:SOURCE_UNSPECIFIED] + + 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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_conversations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_conversations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::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, source: source, sources: sources }) 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, source: source, sources: sources do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_conversations ::Google::Cloud::Ces::V1beta::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, source: source, sources: sources) 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, source: source, sources: sources }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_conversations(::Google::Cloud::Ces::V1beta::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, source: source, sources: sources), 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_get_conversation + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Conversation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + source = :SOURCE_UNSPECIFIED + + 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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_conversation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_conversation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_conversation({ name: name, source: source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_conversation name: name, source: source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_conversation ::Google::Cloud::Ces::V1beta::GetConversationRequest.new(name: name, source: source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_conversation({ name: name, source: source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_conversation(::Google::Cloud::Ces::V1beta::GetConversationRequest.new(name: name, source: source), 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_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" + source = :SOURCE_UNSPECIFIED + + 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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_conversation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_conversation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_conversation({ name: name, source: source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_conversation name: name, source: source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_conversation ::Google::Cloud::Ces::V1beta::DeleteConversationRequest.new(name: name, source: source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_conversation({ name: name, source: source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_conversation(::Google::Cloud::Ces::V1beta::DeleteConversationRequest.new(name: name, source: source), 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_batch_delete_conversations + # 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" + conversations = ["hello world"] + + batch_delete_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_batch_delete_conversations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_delete_conversations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_delete_conversations({ parent: parent, conversations: conversations }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_delete_conversations parent: parent, conversations: conversations do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_delete_conversations ::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new(parent: parent, conversations: conversations) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_delete_conversations({ parent: parent, conversations: conversations }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_delete_conversations(::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new(parent: parent, conversations: conversations), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_delete_conversations_client_stub.call_count + end + end + end + + def test_create_tool + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Tool.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tool_id = "hello world" + tool = {} + + create_tool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_tool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_tool_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_tool({ parent: parent, tool_id: tool_id, tool: tool }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_tool parent: parent, tool_id: tool_id, tool: tool do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_tool ::Google::Cloud::Ces::V1beta::CreateToolRequest.new(parent: parent, tool_id: tool_id, tool: tool) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_tool({ parent: parent, tool_id: tool_id, tool: tool }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_tool(::Google::Cloud::Ces::V1beta::CreateToolRequest.new(parent: parent, tool_id: tool_id, tool: tool), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_tool_client_stub.call_count + end + end + end + + def test_update_tool + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Tool.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + tool = {} + update_mask = {} + + update_tool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_tool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_tool_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_tool({ tool: tool, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_tool tool: tool, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_tool ::Google::Cloud::Ces::V1beta::UpdateToolRequest.new(tool: tool, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_tool({ tool: tool, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_tool(::Google::Cloud::Ces::V1beta::UpdateToolRequest.new(tool: tool, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_tool_client_stub.call_count + end + end + end + + def test_delete_tool + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + etag = "hello world" + + delete_tool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_tool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_tool_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_tool({ name: name, force: force, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_tool name: name, force: force, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_tool ::Google::Cloud::Ces::V1beta::DeleteToolRequest.new(name: name, force: force, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_tool({ name: name, force: force, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_tool(::Google::Cloud::Ces::V1beta::DeleteToolRequest.new(name: name, force: force, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_tool_client_stub.call_count + end + end + end + + def test_list_guardrails + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListGuardrailsResponse.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" + + list_guardrails_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_guardrails_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_guardrails_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_guardrails({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_guardrails parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_guardrails ::Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_guardrails({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_guardrails(::Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_guardrails_client_stub.call_count + end + end + end + + def test_get_guardrail + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Guardrail.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_guardrail_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_guardrail_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_guardrail_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_guardrail({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_guardrail name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_guardrail ::Google::Cloud::Ces::V1beta::GetGuardrailRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_guardrail({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_guardrail(::Google::Cloud::Ces::V1beta::GetGuardrailRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_guardrail_client_stub.call_count + end + end + end + + def test_create_guardrail + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Guardrail.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + guardrail_id = "hello world" + guardrail = {} + + create_guardrail_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_guardrail_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_guardrail_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_guardrail({ parent: parent, guardrail_id: guardrail_id, guardrail: guardrail }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_guardrail parent: parent, guardrail_id: guardrail_id, guardrail: guardrail do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_guardrail ::Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new(parent: parent, guardrail_id: guardrail_id, guardrail: guardrail) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_guardrail({ parent: parent, guardrail_id: guardrail_id, guardrail: guardrail }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_guardrail(::Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new(parent: parent, guardrail_id: guardrail_id, guardrail: guardrail), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_guardrail_client_stub.call_count + end + end + end + + def test_update_guardrail + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Guardrail.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + guardrail = {} + update_mask = {} + + update_guardrail_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_guardrail_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_guardrail_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_guardrail({ guardrail: guardrail, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_guardrail guardrail: guardrail, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_guardrail ::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new(guardrail: guardrail, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_guardrail({ guardrail: guardrail, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_guardrail(::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new(guardrail: guardrail, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_guardrail_client_stub.call_count + end + end + end + + def test_delete_guardrail + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + etag = "hello world" + + delete_guardrail_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_guardrail_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_guardrail_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_guardrail({ name: name, force: force, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_guardrail name: name, force: force, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_guardrail ::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new(name: name, force: force, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_guardrail({ name: name, force: force, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_guardrail(::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new(name: name, force: force, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_guardrail_client_stub.call_count + end + end + end + + def test_list_deployments + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListDeploymentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_deployments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_deployments_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_deployments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_deployments parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_deployments ::Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_deployments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_deployments(::Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_deployments_client_stub.call_count + end + end + end + + def test_get_deployment + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Deployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_deployment_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_deployment ::Google::Cloud::Ces::V1beta::GetDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_deployment(::Google::Cloud::Ces::V1beta::GetDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_deployment_client_stub.call_count + end + end + end + + def test_create_deployment + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Deployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + deployment_id = "hello world" + deployment = {} + + create_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_deployment_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_deployment parent: parent, deployment_id: deployment_id, deployment: deployment do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_deployment ::Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_deployment(::Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_deployment_client_stub.call_count + end + end + end + + def test_update_deployment + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Deployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + deployment = {} + update_mask = {} + + update_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_deployment_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_deployment({ deployment: deployment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_deployment deployment: deployment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_deployment ::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_deployment({ deployment: deployment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_deployment(::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_deployment_client_stub.call_count + end + end + end + + def test_delete_deployment + # 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" + etag = "hello world" + + delete_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_deployment_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_deployment({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_deployment name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_deployment ::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_deployment({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_deployment(::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_deployment_client_stub.call_count + end + end + end + + def test_list_toolsets + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListToolsetsResponse.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" + + list_toolsets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_toolsets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_toolsets_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_toolsets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_toolsets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_toolsets ::Google::Cloud::Ces::V1beta::ListToolsetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_toolsets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_toolsets(::Google::Cloud::Ces::V1beta::ListToolsetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_toolsets_client_stub.call_count + end + end + end + + def test_get_toolset + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Toolset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_toolset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_toolset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_toolset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_toolset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_toolset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_toolset ::Google::Cloud::Ces::V1beta::GetToolsetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_toolset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_toolset(::Google::Cloud::Ces::V1beta::GetToolsetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_toolset_client_stub.call_count + end + end + end + + def test_create_toolset + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Toolset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + toolset_id = "hello world" + toolset = {} + + create_toolset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_toolset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_toolset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_toolset({ parent: parent, toolset_id: toolset_id, toolset: toolset }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_toolset parent: parent, toolset_id: toolset_id, toolset: toolset do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_toolset ::Google::Cloud::Ces::V1beta::CreateToolsetRequest.new(parent: parent, toolset_id: toolset_id, toolset: toolset) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_toolset({ parent: parent, toolset_id: toolset_id, toolset: toolset }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_toolset(::Google::Cloud::Ces::V1beta::CreateToolsetRequest.new(parent: parent, toolset_id: toolset_id, toolset: toolset), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_toolset_client_stub.call_count + end + end + end + + def test_update_toolset + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Toolset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + toolset = {} + update_mask = {} + + update_toolset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_toolset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_toolset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_toolset({ toolset: toolset, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_toolset toolset: toolset, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_toolset ::Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new(toolset: toolset, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_toolset({ toolset: toolset, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_toolset(::Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new(toolset: toolset, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_toolset_client_stub.call_count + end + end + end + + def test_delete_toolset + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + etag = "hello world" + + delete_toolset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_toolset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_toolset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_toolset({ name: name, force: force, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_toolset name: name, force: force, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_toolset ::Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new(name: name, force: force, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_toolset({ name: name, force: force, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_toolset(::Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new(name: name, force: force, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_toolset_client_stub.call_count + end + end + end + + def test_list_app_versions + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListAppVersionsResponse.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" + + list_app_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_app_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_app_versions_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_app_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_app_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_app_versions ::Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_app_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_app_versions(::Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_app_versions_client_stub.call_count + end + end + end + + def test_get_app_version + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::AppVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_app_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_app_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_app_version_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_app_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_app_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_app_version ::Google::Cloud::Ces::V1beta::GetAppVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_app_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_app_version(::Google::Cloud::Ces::V1beta::GetAppVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_app_version_client_stub.call_count + end + end + end + + def test_create_app_version + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::AppVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + app_version_id = "hello world" + app_version = {} + + create_app_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_app_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_app_version_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_app_version({ parent: parent, app_version_id: app_version_id, app_version: app_version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_app_version parent: parent, app_version_id: app_version_id, app_version: app_version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_app_version ::Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new(parent: parent, app_version_id: app_version_id, app_version: app_version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_app_version({ parent: parent, app_version_id: app_version_id, app_version: app_version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_app_version(::Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new(parent: parent, app_version_id: app_version_id, app_version: app_version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_app_version_client_stub.call_count + end + end + end + + def test_delete_app_version + # 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" + etag = "hello world" + + delete_app_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_app_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_app_version_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_app_version({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_app_version name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_app_version ::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_app_version({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_app_version(::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_app_version_client_stub.call_count + end + end + end + + def test_restore_app_version + # 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" + + restore_app_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_restore_app_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restore_app_version_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.restore_app_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.restore_app_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.restore_app_version ::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.restore_app_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.restore_app_version(::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restore_app_version_client_stub.call_count + end + end + end + + def test_generate_app_resource + # 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. + agent = {} + parent = "hello world" + refine_instructions = [{}] + tool_generation_config = {} + app_generation_config = {} + evaluation_generation_config = {} + evaluation_personas_generation_config = {} + quality_report_generation_config = {} + hill_climbing_fix_config = {} + + generate_app_resource_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_generate_app_resource_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_app_resource_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_app_resource({ agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_app_resource agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_app_resource ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new(agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_app_resource({ agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_app_resource(::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new(agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_app_resource_client_stub.call_count + end + end + end + + def test_list_changelogs + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListChangelogsResponse.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" + + list_changelogs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_changelogs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_changelogs_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_changelogs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_changelogs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_changelogs ::Google::Cloud::Ces::V1beta::ListChangelogsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_changelogs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_changelogs(::Google::Cloud::Ces::V1beta::ListChangelogsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_changelogs_client_stub.call_count + end + end + end + + def test_get_changelog + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Changelog.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_changelog_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_changelog_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_changelog_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_changelog({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_changelog name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_changelog ::Google::Cloud::Ces::V1beta::GetChangelogRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_changelog({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_changelog(::Google::Cloud::Ces::V1beta::GetChangelogRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_changelog_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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_test.rb new file mode 100644 index 000000000000..305a13412200 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_test.rb @@ -0,0 +1,3353 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/agent_service_pb" +require "google/cloud/ces/v1beta/agent_service" + +class ::Google::Cloud::Ces::V1beta::AgentService::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_apps + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListAppsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_apps_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_apps, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListAppsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_apps_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_apps({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_apps parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_apps ::Google::Cloud::Ces::V1beta::ListAppsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_apps({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_apps(::Google::Cloud::Ces::V1beta::ListAppsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_apps_client_stub.call_rpc_count + end + end + + def test_get_app + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::App.new + grpc_operation = GRPC::ActiveCall::Operation.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_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_app, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetAppRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_app({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_app name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_app ::Google::Cloud::Ces::V1beta::GetAppRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_app({ 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_app(::Google::Cloud::Ces::V1beta::GetAppRequest.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_app_client_stub.call_rpc_count + end + end + + def test_create_app + # 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" + app_id = "hello world" + app = {} + + create_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_app, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateAppRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["app_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::App), request["app"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_app({ parent: parent, app_id: app_id, app: app }) 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_app parent: parent, app_id: app_id, app: app 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_app ::Google::Cloud::Ces::V1beta::CreateAppRequest.new(parent: parent, app_id: app_id, app: app) 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_app({ parent: parent, app_id: app_id, app: app }, 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_app(::Google::Cloud::Ces::V1beta::CreateAppRequest.new(parent: parent, app_id: app_id, app: app), 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_app_client_stub.call_rpc_count + end + end + + def test_update_app + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::App.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + app = {} + update_mask = {} + + update_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_app, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateAppRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::App), request["app"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_app({ app: app, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_app app: app, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_app ::Google::Cloud::Ces::V1beta::UpdateAppRequest.new(app: app, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_app({ app: app, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_app(::Google::Cloud::Ces::V1beta::UpdateAppRequest.new(app: app, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_app_client_stub.call_rpc_count + end + end + + def test_delete_app + # 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" + etag = "hello world" + + delete_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_app, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteAppRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_app({ name: name, etag: etag }) 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_app name: name, etag: etag 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_app ::Google::Cloud::Ces::V1beta::DeleteAppRequest.new(name: name, etag: etag) 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_app({ name: name, etag: etag }, 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_app(::Google::Cloud::Ces::V1beta::DeleteAppRequest.new(name: name, etag: etag), 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_app_client_stub.call_rpc_count + end + end + + def test_export_app + # 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" + export_format = :EXPORT_FORMAT_UNSPECIFIED + gcs_uri = "hello world" + app_version = "hello world" + + export_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_app, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ExportAppRequest, request + assert_equal "hello world", request["name"] + assert_equal :EXPORT_FORMAT_UNSPECIFIED, request["export_format"] + assert_equal "hello world", request["gcs_uri"] + assert_equal "hello world", request["app_version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_app({ name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version }) 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.export_app name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version 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.export_app ::Google::Cloud::Ces::V1beta::ExportAppRequest.new(name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version) 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.export_app({ name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version }, 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.export_app(::Google::Cloud::Ces::V1beta::ExportAppRequest.new(name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_app_client_stub.call_rpc_count + end + end + + def test_import_app + # 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. + gcs_uri = "hello world" + parent = "hello world" + display_name = "hello world" + app_id = "hello world" + import_options = {} + ignore_app_lock = true + + import_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_app, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ImportAppRequest, request + assert_equal "hello world", request["gcs_uri"] + assert_equal :gcs_uri, request.app + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["display_name"] + assert_equal "hello world", request["app_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ImportAppRequest::ImportOptions), request["import_options"] + assert_equal true, request["ignore_app_lock"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_app_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_app({ gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock }) 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.import_app gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock 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.import_app ::Google::Cloud::Ces::V1beta::ImportAppRequest.new(gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock) 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.import_app({ gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock }, 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.import_app(::Google::Cloud::Ces::V1beta::ImportAppRequest.new(gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_app_client_stub.call_rpc_count + end + end + + def test_get_security_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::SecuritySettings.new + grpc_operation = GRPC::ActiveCall::Operation.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_security_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_security_settings, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_security_settings_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_security_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_security_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_security_settings ::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_security_settings({ 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_security_settings(::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.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_security_settings_client_stub.call_rpc_count + end + end + + def test_update_security_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::SecuritySettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + security_settings = {} + update_mask = {} + + update_security_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_security_settings, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::SecuritySettings), request["security_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_security_settings_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_security_settings({ security_settings: security_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_security_settings security_settings: security_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_security_settings ::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new(security_settings: security_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_security_settings({ security_settings: security_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_security_settings(::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new(security_settings: security_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_security_settings_client_stub.call_rpc_count + end + end + + def test_list_agents + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListAgentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_agents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_agents, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListAgentsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_agents_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_agents ::Google::Cloud::Ces::V1beta::ListAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_agents(::Google::Cloud::Ces::V1beta::ListAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_agents_client_stub.call_rpc_count + end + end + + def test_get_agent + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Agent.new + grpc_operation = GRPC::ActiveCall::Operation.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_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_agent, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetAgentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_agent_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_agent({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_agent name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_agent ::Google::Cloud::Ces::V1beta::GetAgentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_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_agent(::Google::Cloud::Ces::V1beta::GetAgentRequest.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_agent_client_stub.call_rpc_count + end + end + + def test_create_agent + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Agent.new + grpc_operation = GRPC::ActiveCall::Operation.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" + agent_id = "hello world" + agent = {} + + create_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_agent, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateAgentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["agent_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Agent), request["agent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_agent_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_agent({ parent: parent, agent_id: agent_id, agent: agent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_agent parent: parent, agent_id: agent_id, agent: agent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_agent ::Google::Cloud::Ces::V1beta::CreateAgentRequest.new(parent: parent, agent_id: agent_id, agent: agent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_agent({ parent: parent, agent_id: agent_id, agent: agent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_agent(::Google::Cloud::Ces::V1beta::CreateAgentRequest.new(parent: parent, agent_id: agent_id, agent: agent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_agent_client_stub.call_rpc_count + end + end + + def test_update_agent + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Agent.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + agent = {} + update_mask = {} + + update_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_agent, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateAgentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Agent), request["agent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_agent_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_agent({ agent: agent, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_agent agent: agent, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_agent ::Google::Cloud::Ces::V1beta::UpdateAgentRequest.new(agent: agent, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_agent({ agent: agent, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_agent(::Google::Cloud::Ces::V1beta::UpdateAgentRequest.new(agent: agent, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_agent_client_stub.call_rpc_count + end + end + + def test_delete_agent + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + etag = "hello world" + + delete_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_agent, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteAgentRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_agent_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_agent({ name: name, force: force, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_agent name: name, force: force, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_agent ::Google::Cloud::Ces::V1beta::DeleteAgentRequest.new(name: name, force: force, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_agent({ name: name, force: force, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_agent(::Google::Cloud::Ces::V1beta::DeleteAgentRequest.new(name: name, force: force, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_agent_client_stub.call_rpc_count + end + end + + def test_list_examples + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListExamplesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_examples_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_examples, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListExamplesRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_examples_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_examples({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_examples parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_examples ::Google::Cloud::Ces::V1beta::ListExamplesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_examples({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_examples(::Google::Cloud::Ces::V1beta::ListExamplesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_examples_client_stub.call_rpc_count + end + end + + def test_get_example + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Example.new + grpc_operation = GRPC::ActiveCall::Operation.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_example_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_example, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetExampleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_example_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_example({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_example name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_example ::Google::Cloud::Ces::V1beta::GetExampleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_example({ 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_example(::Google::Cloud::Ces::V1beta::GetExampleRequest.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_example_client_stub.call_rpc_count + end + end + + def test_create_example + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Example.new + grpc_operation = GRPC::ActiveCall::Operation.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" + example_id = "hello world" + example = {} + + create_example_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_example, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateExampleRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["example_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Example), request["example"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_example_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_example({ parent: parent, example_id: example_id, example: example }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_example parent: parent, example_id: example_id, example: example do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_example ::Google::Cloud::Ces::V1beta::CreateExampleRequest.new(parent: parent, example_id: example_id, example: example) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_example({ parent: parent, example_id: example_id, example: example }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_example(::Google::Cloud::Ces::V1beta::CreateExampleRequest.new(parent: parent, example_id: example_id, example: example), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_example_client_stub.call_rpc_count + end + end + + def test_update_example + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Example.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + example = {} + update_mask = {} + + update_example_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_example, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateExampleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Example), request["example"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_example_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_example({ example: example, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_example example: example, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_example ::Google::Cloud::Ces::V1beta::UpdateExampleRequest.new(example: example, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_example({ example: example, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_example(::Google::Cloud::Ces::V1beta::UpdateExampleRequest.new(example: example, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_example_client_stub.call_rpc_count + end + end + + def test_delete_example + # 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" + etag = "hello world" + + delete_example_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_example, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteExampleRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_example_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_example({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_example name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_example ::Google::Cloud::Ces::V1beta::DeleteExampleRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_example({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_example(::Google::Cloud::Ces::V1beta::DeleteExampleRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_example_client_stub.call_rpc_count + end + end + + def test_list_tools + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListToolsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_tools_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tools, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListToolsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tools_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_tools parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_tools ::Google::Cloud::Ces::V1beta::ListToolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_tools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_tools(::Google::Cloud::Ces::V1beta::ListToolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_tools_client_stub.call_rpc_count + end + end + + def test_get_tool + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Tool.new + grpc_operation = GRPC::ActiveCall::Operation.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_tool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_tool, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetToolRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_tool_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_tool({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_tool name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_tool ::Google::Cloud::Ces::V1beta::GetToolRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_tool({ 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_tool(::Google::Cloud::Ces::V1beta::GetToolRequest.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_tool_client_stub.call_rpc_count + end + end + + def test_list_conversations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::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" + source = :SOURCE_UNSPECIFIED + sources = [:SOURCE_UNSPECIFIED] + + list_conversations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_conversations, name + assert_kind_of ::Google::Cloud::Ces::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"] + assert_equal :SOURCE_UNSPECIFIED, request["source"] + assert_equal [:SOURCE_UNSPECIFIED], request["sources"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_conversations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::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, source: source, sources: sources }) 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, source: source, sources: sources 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::Ces::V1beta::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, source: source, sources: sources) 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, source: source, sources: sources }, 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::Ces::V1beta::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, source: source, sources: sources), 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_get_conversation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::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" + source = :SOURCE_UNSPECIFIED + + get_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_conversation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetConversationRequest, request + assert_equal "hello world", request["name"] + assert_equal :SOURCE_UNSPECIFIED, request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_conversation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_conversation({ name: name, source: source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_conversation name: name, source: source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_conversation ::Google::Cloud::Ces::V1beta::GetConversationRequest.new(name: name, source: source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_conversation({ name: name, source: source }, 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::Ces::V1beta::GetConversationRequest.new(name: name, source: source), 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_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" + source = :SOURCE_UNSPECIFIED + + delete_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_conversation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteConversationRequest, request + assert_equal "hello world", request["name"] + assert_equal :SOURCE_UNSPECIFIED, request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_conversation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_conversation({ name: name, source: source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_conversation name: name, source: source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_conversation ::Google::Cloud::Ces::V1beta::DeleteConversationRequest.new(name: name, source: source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_conversation({ name: name, source: source }, 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::Ces::V1beta::DeleteConversationRequest.new(name: name, source: source), 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_batch_delete_conversations + # 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" + conversations = ["hello world"] + + batch_delete_conversations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_delete_conversations, name + assert_kind_of ::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["conversations"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_delete_conversations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_delete_conversations({ parent: parent, conversations: conversations }) 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.batch_delete_conversations parent: parent, conversations: conversations 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.batch_delete_conversations ::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new(parent: parent, conversations: conversations) 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.batch_delete_conversations({ parent: parent, conversations: conversations }, 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.batch_delete_conversations(::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new(parent: parent, conversations: conversations), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_delete_conversations_client_stub.call_rpc_count + end + end + + def test_create_tool + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Tool.new + grpc_operation = GRPC::ActiveCall::Operation.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" + tool_id = "hello world" + tool = {} + + create_tool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_tool, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateToolRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["tool_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Tool), request["tool"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_tool_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_tool({ parent: parent, tool_id: tool_id, tool: tool }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_tool parent: parent, tool_id: tool_id, tool: tool do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_tool ::Google::Cloud::Ces::V1beta::CreateToolRequest.new(parent: parent, tool_id: tool_id, tool: tool) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_tool({ parent: parent, tool_id: tool_id, tool: tool }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_tool(::Google::Cloud::Ces::V1beta::CreateToolRequest.new(parent: parent, tool_id: tool_id, tool: tool), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_tool_client_stub.call_rpc_count + end + end + + def test_update_tool + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Tool.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + tool = {} + update_mask = {} + + update_tool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_tool, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateToolRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Tool), request["tool"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_tool_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_tool({ tool: tool, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_tool tool: tool, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_tool ::Google::Cloud::Ces::V1beta::UpdateToolRequest.new(tool: tool, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_tool({ tool: tool, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_tool(::Google::Cloud::Ces::V1beta::UpdateToolRequest.new(tool: tool, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_tool_client_stub.call_rpc_count + end + end + + def test_delete_tool + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + etag = "hello world" + + delete_tool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_tool, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteToolRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_tool_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_tool({ name: name, force: force, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_tool name: name, force: force, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_tool ::Google::Cloud::Ces::V1beta::DeleteToolRequest.new(name: name, force: force, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_tool({ name: name, force: force, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_tool(::Google::Cloud::Ces::V1beta::DeleteToolRequest.new(name: name, force: force, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_tool_client_stub.call_rpc_count + end + end + + def test_list_guardrails + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListGuardrailsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_guardrails_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_guardrails, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListGuardrailsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_guardrails_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_guardrails({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_guardrails parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_guardrails ::Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_guardrails({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_guardrails(::Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_guardrails_client_stub.call_rpc_count + end + end + + def test_get_guardrail + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Guardrail.new + grpc_operation = GRPC::ActiveCall::Operation.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_guardrail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_guardrail, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetGuardrailRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_guardrail_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_guardrail({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_guardrail name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_guardrail ::Google::Cloud::Ces::V1beta::GetGuardrailRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_guardrail({ 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_guardrail(::Google::Cloud::Ces::V1beta::GetGuardrailRequest.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_guardrail_client_stub.call_rpc_count + end + end + + def test_create_guardrail + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Guardrail.new + grpc_operation = GRPC::ActiveCall::Operation.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" + guardrail_id = "hello world" + guardrail = {} + + create_guardrail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_guardrail, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateGuardrailRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["guardrail_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Guardrail), request["guardrail"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_guardrail_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_guardrail({ parent: parent, guardrail_id: guardrail_id, guardrail: guardrail }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_guardrail parent: parent, guardrail_id: guardrail_id, guardrail: guardrail do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_guardrail ::Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new(parent: parent, guardrail_id: guardrail_id, guardrail: guardrail) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_guardrail({ parent: parent, guardrail_id: guardrail_id, guardrail: guardrail }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_guardrail(::Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new(parent: parent, guardrail_id: guardrail_id, guardrail: guardrail), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_guardrail_client_stub.call_rpc_count + end + end + + def test_update_guardrail + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Guardrail.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + guardrail = {} + update_mask = {} + + update_guardrail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_guardrail, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Guardrail), request["guardrail"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_guardrail_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_guardrail({ guardrail: guardrail, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_guardrail guardrail: guardrail, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_guardrail ::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new(guardrail: guardrail, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_guardrail({ guardrail: guardrail, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_guardrail(::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new(guardrail: guardrail, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_guardrail_client_stub.call_rpc_count + end + end + + def test_delete_guardrail + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + etag = "hello world" + + delete_guardrail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_guardrail, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_guardrail_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_guardrail({ name: name, force: force, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_guardrail name: name, force: force, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_guardrail ::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new(name: name, force: force, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_guardrail({ name: name, force: force, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_guardrail(::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new(name: name, force: force, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_guardrail_client_stub.call_rpc_count + end + end + + def test_list_deployments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListDeploymentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_deployments, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListDeploymentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_deployments_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_deployments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_deployments parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_deployments ::Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_deployments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_deployments(::Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_deployments_client_stub.call_rpc_count + end + end + + def test_get_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Deployment.new + grpc_operation = GRPC::ActiveCall::Operation.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_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_deployment, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_deployment_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_deployment ::Google::Cloud::Ces::V1beta::GetDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_deployment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_deployment(::Google::Cloud::Ces::V1beta::GetDeploymentRequest.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_deployment_client_stub.call_rpc_count + end + end + + def test_create_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Deployment.new + grpc_operation = GRPC::ActiveCall::Operation.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" + deployment_id = "hello world" + deployment = {} + + create_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_deployment, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateDeploymentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["deployment_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Deployment), request["deployment"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_deployment_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_deployment parent: parent, deployment_id: deployment_id, deployment: deployment do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_deployment ::Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_deployment(::Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_deployment_client_stub.call_rpc_count + end + end + + def test_update_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Deployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + deployment = {} + update_mask = {} + + update_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_deployment, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Deployment), request["deployment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_deployment_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_deployment({ deployment: deployment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_deployment deployment: deployment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_deployment ::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_deployment({ deployment: deployment, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_deployment(::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_deployment_client_stub.call_rpc_count + end + end + + def test_delete_deployment + # 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" + etag = "hello world" + + delete_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_deployment, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_deployment_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_deployment({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_deployment name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_deployment ::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_deployment({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_deployment(::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_deployment_client_stub.call_rpc_count + end + end + + def test_list_toolsets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListToolsetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_toolsets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_toolsets, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListToolsetsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_toolsets_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_toolsets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_toolsets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_toolsets ::Google::Cloud::Ces::V1beta::ListToolsetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_toolsets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_toolsets(::Google::Cloud::Ces::V1beta::ListToolsetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_toolsets_client_stub.call_rpc_count + end + end + + def test_get_toolset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Toolset.new + grpc_operation = GRPC::ActiveCall::Operation.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_toolset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_toolset, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetToolsetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_toolset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_toolset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_toolset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_toolset ::Google::Cloud::Ces::V1beta::GetToolsetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_toolset({ 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_toolset(::Google::Cloud::Ces::V1beta::GetToolsetRequest.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_toolset_client_stub.call_rpc_count + end + end + + def test_create_toolset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Toolset.new + grpc_operation = GRPC::ActiveCall::Operation.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" + toolset_id = "hello world" + toolset = {} + + create_toolset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_toolset, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateToolsetRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["toolset_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Toolset), request["toolset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_toolset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_toolset({ parent: parent, toolset_id: toolset_id, toolset: toolset }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_toolset parent: parent, toolset_id: toolset_id, toolset: toolset do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_toolset ::Google::Cloud::Ces::V1beta::CreateToolsetRequest.new(parent: parent, toolset_id: toolset_id, toolset: toolset) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_toolset({ parent: parent, toolset_id: toolset_id, toolset: toolset }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_toolset(::Google::Cloud::Ces::V1beta::CreateToolsetRequest.new(parent: parent, toolset_id: toolset_id, toolset: toolset), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_toolset_client_stub.call_rpc_count + end + end + + def test_update_toolset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Toolset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + toolset = {} + update_mask = {} + + update_toolset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_toolset, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateToolsetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Toolset), request["toolset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_toolset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_toolset({ toolset: toolset, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_toolset toolset: toolset, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_toolset ::Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new(toolset: toolset, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_toolset({ toolset: toolset, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_toolset(::Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new(toolset: toolset, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_toolset_client_stub.call_rpc_count + end + end + + def test_delete_toolset + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + etag = "hello world" + + delete_toolset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_toolset, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteToolsetRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_toolset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_toolset({ name: name, force: force, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_toolset name: name, force: force, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_toolset ::Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new(name: name, force: force, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_toolset({ name: name, force: force, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_toolset(::Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new(name: name, force: force, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_toolset_client_stub.call_rpc_count + end + end + + def test_list_app_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListAppVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_app_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_app_versions, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListAppVersionsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_app_versions_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_app_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_app_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_app_versions ::Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_app_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_app_versions(::Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_app_versions_client_stub.call_rpc_count + end + end + + def test_get_app_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::AppVersion.new + grpc_operation = GRPC::ActiveCall::Operation.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_app_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_app_version, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetAppVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_app_version_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_app_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_app_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_app_version ::Google::Cloud::Ces::V1beta::GetAppVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_app_version({ 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_app_version(::Google::Cloud::Ces::V1beta::GetAppVersionRequest.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_app_version_client_stub.call_rpc_count + end + end + + def test_create_app_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::AppVersion.new + grpc_operation = GRPC::ActiveCall::Operation.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" + app_version_id = "hello world" + app_version = {} + + create_app_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_app_version, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateAppVersionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["app_version_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::AppVersion), request["app_version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_app_version_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_app_version({ parent: parent, app_version_id: app_version_id, app_version: app_version }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_app_version parent: parent, app_version_id: app_version_id, app_version: app_version do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_app_version ::Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new(parent: parent, app_version_id: app_version_id, app_version: app_version) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_app_version({ parent: parent, app_version_id: app_version_id, app_version: app_version }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_app_version(::Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new(parent: parent, app_version_id: app_version_id, app_version: app_version), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_app_version_client_stub.call_rpc_count + end + end + + def test_delete_app_version + # 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" + etag = "hello world" + + delete_app_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_app_version, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_app_version_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_app_version({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_app_version name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_app_version ::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_app_version({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_app_version(::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_app_version_client_stub.call_rpc_count + end + end + + def test_restore_app_version + # 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" + + restore_app_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restore_app_version, name + assert_kind_of ::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, restore_app_version_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.restore_app_version({ 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.restore_app_version 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.restore_app_version ::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.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.restore_app_version({ 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.restore_app_version(::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.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, restore_app_version_client_stub.call_rpc_count + end + end + + def test_generate_app_resource + # 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. + agent = {} + parent = "hello world" + refine_instructions = [{}] + tool_generation_config = {} + app_generation_config = {} + evaluation_generation_config = {} + evaluation_personas_generation_config = {} + quality_report_generation_config = {} + hill_climbing_fix_config = {} + + generate_app_resource_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_app_resource, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Agent), request["agent"] + assert_equal :agent, request.resource + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::RefineInstructions, request["refine_instructions"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig), request["tool_generation_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppGenerationConfig), request["app_generation_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationGenerationConfig), request["evaluation_generation_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationPersonasGenerationConfig), request["evaluation_personas_generation_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::QualityReportGenerationConfig), request["quality_report_generation_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::HillClimbingFixConfig), request["hill_climbing_fix_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_app_resource_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_app_resource({ agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_app_resource agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_app_resource ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new(agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_app_resource({ agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_app_resource(::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new(agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_app_resource_client_stub.call_rpc_count + end + end + + def test_list_changelogs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListChangelogsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_changelogs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_changelogs, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListChangelogsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_changelogs_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_changelogs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_changelogs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_changelogs ::Google::Cloud::Ces::V1beta::ListChangelogsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_changelogs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_changelogs(::Google::Cloud::Ces::V1beta::ListChangelogsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_changelogs_client_stub.call_rpc_count + end + end + + def test_get_changelog + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Changelog.new + grpc_operation = GRPC::ActiveCall::Operation.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_changelog_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_changelog, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetChangelogRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_changelog_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_changelog({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_changelog name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_changelog ::Google::Cloud::Ces::V1beta::GetChangelogRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_changelog({ 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_changelog(::Google::Cloud::Ces::V1beta::GetChangelogRequest.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_changelog_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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Ces::V1beta::AgentService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_operations_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_operations_test.rb new file mode 100644 index 000000000000..8f5161ff35b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/ces/v1beta/evaluation_service_pb" +require "google/cloud/ces/v1beta/evaluation_service_services_pb" +require "google/cloud/ces/v1beta/evaluation_service" + +class ::Google::Cloud::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_paths_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_paths_test.rb new file mode 100644 index 000000000000..a1433e91ff99 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_paths_test.rb @@ -0,0 +1,199 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/evaluation_service" + +class ::Google::Cloud::Ces::V1beta::EvaluationService::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_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::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.agent_path project: "value0", location: "value1", app: "value2", agent: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/agents/value3", path + end + end + + def test_app_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_path project: "value0", location: "value1", app: "value2" + assert_equal "projects/value0/locations/value1/apps/value2", path + end + end + + def test_app_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_version_path project: "value0", location: "value1", app: "value2", version: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/versions/value3", path + end + end + + def test_changelog_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.changelog_path project: "value0", location: "value1", app: "value2", changelog: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/changelogs/value3", path + 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::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.conversation_path project: "value0", location: "value1", app: "value2", conversation: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/conversations/value3", path + end + end + + def test_evaluation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.evaluation_path project: "value0", location: "value1", app: "value2", evaluation: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/evaluations/value3", path + end + end + + def test_evaluation_dataset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.evaluation_dataset_path project: "value0", location: "value1", app: "value2", evaluation_dataset: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/evaluationDatasets/value3", path + end + end + + def test_evaluation_expectation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.evaluation_expectation_path project: "value0", location: "value1", app: "value2", evaluation_expectation: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/evaluationExpectations/value3", path + end + end + + def test_evaluation_result_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.evaluation_result_path project: "value0", location: "value1", app: "value2", evaluation: "value3", evaluation_result: "value4" + assert_equal "projects/value0/locations/value1/apps/value2/evaluations/value3/results/value4", path + end + end + + def test_evaluation_run_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.evaluation_run_path project: "value0", location: "value1", app: "value2", evaluation_run: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/evaluationRuns/value3", path + end + end + + def test_scheduled_evaluation_run_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.scheduled_evaluation_run_path project: "value0", location: "value1", app: "value2", scheduled_evaluation_run: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/scheduledEvaluationRuns/value3", path + end + end + + def test_tool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tool_path project: "value0", location: "value1", app: "value2", tool: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/tools/value3", path + end + end + + def test_toolset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.toolset_path project: "value0", location: "value1", app: "value2", toolset: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/toolsets/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb new file mode 100644 index 000000000000..5d266592e5a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb @@ -0,0 +1,2059 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/evaluation_service_pb" +require "google/cloud/ces/v1beta/evaluation_service/rest" + + +class ::Google::Cloud::Ces::V1beta::EvaluationService::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_run_evaluation + # 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. + app = "hello world" + evaluations = ["hello world"] + evaluation_dataset = "hello world" + display_name = "hello world" + app_version = "hello world" + config = {} + run_count = 42 + persona_run_configs = [{}] + optimization_config = {} + scheduled_evaluation_run = "hello world" + golden_run_method = :GOLDEN_RUN_METHOD_UNSPECIFIED + generate_latency_report = true + + run_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_run_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_evaluation({ app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_evaluation app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_evaluation ::Google::Cloud::Ces::V1beta::RunEvaluationRequest.new(app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_evaluation({ app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_evaluation(::Google::Cloud::Ces::V1beta::RunEvaluationRequest.new(app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_evaluation_client_stub.call_count + end + end + end + + def test_upload_evaluation_audio + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + audio_content = "hello world" + previous_audio_gcs_uri = "hello world" + + upload_evaluation_audio_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_upload_evaluation_audio_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, upload_evaluation_audio_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.upload_evaluation_audio({ name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.upload_evaluation_audio name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.upload_evaluation_audio ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new(name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.upload_evaluation_audio({ name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.upload_evaluation_audio(::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new(name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, upload_evaluation_audio_client_stub.call_count + end + end + end + + def test_create_evaluation + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Evaluation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + evaluation_id = "hello world" + evaluation = {} + + create_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_create_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_evaluation parent: parent, evaluation_id: evaluation_id, evaluation: evaluation do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_evaluation ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_evaluation(::Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_evaluation_client_stub.call_count + end + end + end + + def test_generate_evaluation + # 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. + conversation = "hello world" + source = :SOURCE_UNSPECIFIED + + generate_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_generate_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_evaluation({ conversation: conversation, source: source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_evaluation conversation: conversation, source: source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_evaluation ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new(conversation: conversation, source: source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_evaluation({ conversation: conversation, source: source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_evaluation(::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new(conversation: conversation, source: source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_evaluation_client_stub.call_count + end + end + end + + def test_import_evaluations + # 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. + conversation_list = {} + parent = "hello world" + import_options = {} + + import_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_import_evaluations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_evaluations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_evaluations({ conversation_list: conversation_list, parent: parent, import_options: import_options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_evaluations conversation_list: conversation_list, parent: parent, import_options: import_options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_evaluations ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new(conversation_list: conversation_list, parent: parent, import_options: import_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_evaluations({ conversation_list: conversation_list, parent: parent, import_options: import_options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_evaluations(::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new(conversation_list: conversation_list, parent: parent, import_options: import_options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_evaluations_client_stub.call_count + end + end + end + + def test_create_evaluation_dataset + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + evaluation_dataset_id = "hello world" + evaluation_dataset = {} + + create_evaluation_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_create_evaluation_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_evaluation_dataset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_evaluation_dataset({ parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_evaluation_dataset parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_evaluation_dataset ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new(parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_evaluation_dataset({ parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_evaluation_dataset(::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new(parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_evaluation_dataset_client_stub.call_count + end + end + end + + def test_update_evaluation + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Evaluation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + evaluation = {} + update_mask = {} + + update_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_update_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_evaluation({ evaluation: evaluation, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_evaluation evaluation: evaluation, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_evaluation ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new(evaluation: evaluation, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_evaluation({ evaluation: evaluation, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_evaluation(::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new(evaluation: evaluation, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_evaluation_client_stub.call_count + end + end + end + + def test_update_evaluation_dataset + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + evaluation_dataset = {} + update_mask = {} + + update_evaluation_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_update_evaluation_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_evaluation_dataset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_evaluation_dataset({ evaluation_dataset: evaluation_dataset, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_evaluation_dataset evaluation_dataset: evaluation_dataset, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_evaluation_dataset ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new(evaluation_dataset: evaluation_dataset, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_evaluation_dataset({ evaluation_dataset: evaluation_dataset, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_evaluation_dataset(::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new(evaluation_dataset: evaluation_dataset, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_evaluation_dataset_client_stub.call_count + end + end + end + + def test_delete_evaluation + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + etag = "hello world" + + delete_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_evaluation({ name: name, force: force, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_evaluation name: name, force: force, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_evaluation ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new(name: name, force: force, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_evaluation({ name: name, force: force, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_evaluation(::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new(name: name, force: force, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_evaluation_client_stub.call_count + end + end + end + + def test_delete_evaluation_result + # 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_evaluation_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_evaluation_result_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_evaluation_result_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_evaluation_result({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_evaluation_result name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_evaluation_result ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_evaluation_result({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_evaluation_result(::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_evaluation_result_client_stub.call_count + end + end + end + + def test_delete_evaluation_dataset + # 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" + etag = "hello world" + + delete_evaluation_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_evaluation_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_evaluation_dataset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_evaluation_dataset({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_evaluation_dataset name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_evaluation_dataset ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_evaluation_dataset({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_evaluation_dataset(::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_evaluation_dataset_client_stub.call_count + end + end + end + + def test_delete_evaluation_run + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_evaluation_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_evaluation_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_evaluation_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_evaluation_run ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_evaluation_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_evaluation_run(::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_evaluation_run_client_stub.call_count + end + end + end + + def test_get_evaluation + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::Evaluation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_evaluation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_evaluation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_evaluation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_evaluation ::Google::Cloud::Ces::V1beta::GetEvaluationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_evaluation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_evaluation(::Google::Cloud::Ces::V1beta::GetEvaluationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_evaluation_client_stub.call_count + end + end + end + + def test_get_evaluation_result + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::EvaluationResult.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_evaluation_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_evaluation_result_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_evaluation_result_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_evaluation_result({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_evaluation_result name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_evaluation_result ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_evaluation_result({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_evaluation_result(::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_evaluation_result_client_stub.call_count + end + end + end + + def test_get_evaluation_dataset + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_evaluation_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_evaluation_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_evaluation_dataset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_evaluation_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_evaluation_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_evaluation_dataset ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_evaluation_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_evaluation_dataset(::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_evaluation_dataset_client_stub.call_count + end + end + end + + def test_get_evaluation_run + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::EvaluationRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_evaluation_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_evaluation_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_evaluation_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_evaluation_run ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_evaluation_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_evaluation_run(::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_evaluation_run_client_stub.call_count + end + end + end + + def test_list_evaluations + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListEvaluationsResponse.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" + evaluation_filter = "hello world" + evaluation_run_filter = "hello world" + order_by = "hello world" + last_ten_results = true + + list_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_evaluations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_evaluations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_evaluations parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_evaluations ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_evaluations(::Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_evaluations_client_stub.call_count + end + end + end + + def test_list_evaluation_results + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse.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" + + list_evaluation_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_evaluation_results_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_evaluation_results_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_evaluation_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_evaluation_results parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_evaluation_results ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_evaluation_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_evaluation_results(::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_evaluation_results_client_stub.call_count + end + end + end + + def test_list_evaluation_datasets + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse.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" + + list_evaluation_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_evaluation_datasets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_evaluation_datasets_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_evaluation_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_evaluation_datasets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_evaluation_datasets ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_evaluation_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_evaluation_datasets(::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_evaluation_datasets_client_stub.call_count + end + end + end + + def test_list_evaluation_runs + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse.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" + + list_evaluation_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_evaluation_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_evaluation_runs_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_evaluation_runs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_evaluation_runs ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_evaluation_runs(::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_evaluation_runs_client_stub.call_count + end + end + end + + def test_list_evaluation_expectations + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse.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" + + list_evaluation_expectations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_evaluation_expectations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_evaluation_expectations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_evaluation_expectations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_evaluation_expectations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_evaluation_expectations ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_evaluation_expectations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_evaluation_expectations(::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_evaluation_expectations_client_stub.call_count + end + end + end + + def test_get_evaluation_expectation + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_evaluation_expectation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_evaluation_expectation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_evaluation_expectation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_evaluation_expectation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_evaluation_expectation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_evaluation_expectation ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_evaluation_expectation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_evaluation_expectation(::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_evaluation_expectation_client_stub.call_count + end + end + end + + def test_create_evaluation_expectation + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + evaluation_expectation_id = "hello world" + evaluation_expectation = {} + + create_evaluation_expectation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_create_evaluation_expectation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_evaluation_expectation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_evaluation_expectation({ parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_evaluation_expectation parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_evaluation_expectation ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new(parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_evaluation_expectation({ parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_evaluation_expectation(::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new(parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_evaluation_expectation_client_stub.call_count + end + end + end + + def test_update_evaluation_expectation + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + evaluation_expectation = {} + update_mask = {} + + update_evaluation_expectation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_update_evaluation_expectation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_evaluation_expectation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_evaluation_expectation({ evaluation_expectation: evaluation_expectation, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_evaluation_expectation evaluation_expectation: evaluation_expectation, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_evaluation_expectation ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new(evaluation_expectation: evaluation_expectation, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_evaluation_expectation({ evaluation_expectation: evaluation_expectation, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_evaluation_expectation(::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new(evaluation_expectation: evaluation_expectation, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_evaluation_expectation_client_stub.call_count + end + end + end + + def test_delete_evaluation_expectation + # 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" + etag = "hello world" + + delete_evaluation_expectation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_evaluation_expectation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_evaluation_expectation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_evaluation_expectation({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_evaluation_expectation name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_evaluation_expectation ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_evaluation_expectation({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_evaluation_expectation(::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_evaluation_expectation_client_stub.call_count + end + end + end + + def test_create_scheduled_evaluation_run + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + scheduled_evaluation_run_id = "hello world" + scheduled_evaluation_run = {} + + create_scheduled_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_create_scheduled_evaluation_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_scheduled_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_scheduled_evaluation_run({ parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_scheduled_evaluation_run parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new(parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_scheduled_evaluation_run({ parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new(parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_scheduled_evaluation_run_client_stub.call_count + end + end + end + + def test_get_scheduled_evaluation_run + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scheduled_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_scheduled_evaluation_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scheduled_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scheduled_evaluation_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scheduled_evaluation_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scheduled_evaluation_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scheduled_evaluation_run_client_stub.call_count + end + end + end + + def test_list_scheduled_evaluation_runs + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse.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" + + list_scheduled_evaluation_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_scheduled_evaluation_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scheduled_evaluation_runs_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scheduled_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scheduled_evaluation_runs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scheduled_evaluation_runs ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_scheduled_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_scheduled_evaluation_runs(::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_scheduled_evaluation_runs_client_stub.call_count + end + end + end + + def test_update_scheduled_evaluation_run + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scheduled_evaluation_run = {} + update_mask = {} + + update_scheduled_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_update_scheduled_evaluation_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_scheduled_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_scheduled_evaluation_run({ scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_scheduled_evaluation_run scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new(scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_scheduled_evaluation_run({ scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new(scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_scheduled_evaluation_run_client_stub.call_count + end + end + end + + def test_delete_scheduled_evaluation_run + # 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" + etag = "hello world" + + delete_scheduled_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_scheduled_evaluation_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_scheduled_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_scheduled_evaluation_run({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_scheduled_evaluation_run name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_scheduled_evaluation_run({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_scheduled_evaluation_run_client_stub.call_count + end + end + end + + def test_test_persona_voice + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + app = "hello world" + persona_id = "hello world" + text = "hello world" + + test_persona_voice_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_test_persona_voice_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_persona_voice_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_persona_voice({ app: app, persona_id: persona_id, text: text }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_persona_voice app: app, persona_id: persona_id, text: text do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_persona_voice ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new(app: app, persona_id: persona_id, text: text) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_persona_voice({ app: app, persona_id: persona_id, text: text }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_persona_voice(::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new(app: app, persona_id: persona_id, text: text), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_persona_voice_client_stub.call_count + end + end + end + + def test_export_evaluations + # 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" + names = ["hello world"] + export_options = {} + include_evaluation_results = true + include_evaluations = true + + export_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_export_evaluations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_evaluations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_evaluations({ parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_evaluations parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_evaluations ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new(parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_evaluations({ parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_evaluations(::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new(parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_evaluations_client_stub.call_count + end + end + end + + def test_export_evaluation_runs + # 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" + names = ["hello world"] + export_options = {} + + export_evaluation_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_export_evaluation_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_evaluation_runs_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_evaluation_runs parent: parent, names: names, export_options: export_options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_evaluation_runs ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_evaluation_runs(::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_evaluation_runs_client_stub.call_count + end + end + end + + def test_export_evaluation_results + # 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" + names = ["hello world"] + export_options = {} + + export_evaluation_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_export_evaluation_results_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_evaluation_results_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_evaluation_results({ parent: parent, names: names, export_options: export_options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_evaluation_results parent: parent, names: names, export_options: export_options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_evaluation_results ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_evaluation_results({ parent: parent, names: names, export_options: export_options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_evaluation_results(::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_evaluation_results_client_stub.call_count + end + end + end + + def test_run_evaluation_result_metrics + # 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. + evaluation_result_id = "hello world" + + run_evaluation_result_metrics_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_run_evaluation_result_metrics_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_evaluation_result_metrics_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_evaluation_result_metrics evaluation_result_id: evaluation_result_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_evaluation_result_metrics ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_evaluation_result_metrics(::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_evaluation_result_metrics_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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb new file mode 100644 index 000000000000..021883c5e66d --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb @@ -0,0 +1,2360 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/evaluation_service_pb" +require "google/cloud/ces/v1beta/evaluation_service" + +class ::Google::Cloud::Ces::V1beta::EvaluationService::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_run_evaluation + # 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. + app = "hello world" + evaluations = ["hello world"] + evaluation_dataset = "hello world" + display_name = "hello world" + app_version = "hello world" + config = {} + run_count = 42 + persona_run_configs = [{}] + optimization_config = {} + scheduled_evaluation_run = "hello world" + golden_run_method = :GOLDEN_RUN_METHOD_UNSPECIFIED + generate_latency_report = true + + run_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_evaluation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::RunEvaluationRequest, request + assert_equal "hello world", request["app"] + assert_equal ["hello world"], request["evaluations"] + assert_equal "hello world", request["evaluation_dataset"] + assert_equal "hello world", request["display_name"] + assert_equal "hello world", request["app_version"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::EvaluationConfig), request["config"] + assert_equal 42, request["run_count"] + assert request.has_run_count? + assert_kind_of ::Google::Cloud::Ces::V1beta::PersonaRunConfig, request["persona_run_configs"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::OptimizationConfig), request["optimization_config"] + assert_equal "hello world", request["scheduled_evaluation_run"] + assert_equal :GOLDEN_RUN_METHOD_UNSPECIFIED, request["golden_run_method"] + assert_equal true, request["generate_latency_report"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_evaluation({ app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report }) 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.run_evaluation app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report 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.run_evaluation ::Google::Cloud::Ces::V1beta::RunEvaluationRequest.new(app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report) 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.run_evaluation({ app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report }, 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.run_evaluation(::Google::Cloud::Ces::V1beta::RunEvaluationRequest.new(app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report), 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, run_evaluation_client_stub.call_rpc_count + end + end + + def test_upload_evaluation_audio + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + audio_content = "hello world" + previous_audio_gcs_uri = "hello world" + + upload_evaluation_audio_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :upload_evaluation_audio, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["audio_content"] + assert_equal "hello world", request["previous_audio_gcs_uri"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, upload_evaluation_audio_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.upload_evaluation_audio({ name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.upload_evaluation_audio name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.upload_evaluation_audio ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new(name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.upload_evaluation_audio({ name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.upload_evaluation_audio(::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new(name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, upload_evaluation_audio_client_stub.call_rpc_count + end + end + + def test_create_evaluation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Evaluation.new + grpc_operation = GRPC::ActiveCall::Operation.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" + evaluation_id = "hello world" + evaluation = {} + + create_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_evaluation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["evaluation_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Evaluation), request["evaluation"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_evaluation parent: parent, evaluation_id: evaluation_id, evaluation: evaluation do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_evaluation ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_evaluation(::Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_evaluation_client_stub.call_rpc_count + end + end + + def test_generate_evaluation + # 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. + conversation = "hello world" + source = :SOURCE_UNSPECIFIED + + generate_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_evaluation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest, request + assert_equal "hello world", request["conversation"] + assert_equal :SOURCE_UNSPECIFIED, request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_evaluation({ conversation: conversation, source: source }) 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.generate_evaluation conversation: conversation, source: source 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.generate_evaluation ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new(conversation: conversation, source: source) 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.generate_evaluation({ conversation: conversation, source: source }, 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.generate_evaluation(::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new(conversation: conversation, source: source), 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, generate_evaluation_client_stub.call_rpc_count + end + end + + def test_import_evaluations + # 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. + conversation_list = {} + parent = "hello world" + import_options = {} + + import_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_evaluations, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ConversationList), request["conversation_list"] + assert_equal :conversation_list, request.source + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions), request["import_options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_evaluations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_evaluations({ conversation_list: conversation_list, parent: parent, import_options: import_options }) 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.import_evaluations conversation_list: conversation_list, parent: parent, import_options: import_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 + client.import_evaluations ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new(conversation_list: conversation_list, parent: parent, import_options: import_options) 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.import_evaluations({ conversation_list: conversation_list, parent: parent, import_options: import_options }, 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.import_evaluations(::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new(conversation_list: conversation_list, parent: parent, import_options: import_options), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_evaluations_client_stub.call_rpc_count + end + end + + def test_create_evaluation_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new + grpc_operation = GRPC::ActiveCall::Operation.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" + evaluation_dataset_id = "hello world" + evaluation_dataset = {} + + create_evaluation_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_evaluation_dataset, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["evaluation_dataset_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::EvaluationDataset), request["evaluation_dataset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_evaluation_dataset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_evaluation_dataset({ parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_evaluation_dataset parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_evaluation_dataset ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new(parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_evaluation_dataset({ parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_evaluation_dataset(::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new(parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_evaluation_dataset_client_stub.call_rpc_count + end + end + + def test_update_evaluation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Evaluation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + evaluation = {} + update_mask = {} + + update_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_evaluation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Evaluation), request["evaluation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_evaluation({ evaluation: evaluation, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_evaluation evaluation: evaluation, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_evaluation ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new(evaluation: evaluation, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_evaluation({ evaluation: evaluation, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_evaluation(::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new(evaluation: evaluation, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_evaluation_client_stub.call_rpc_count + end + end + + def test_update_evaluation_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + evaluation_dataset = {} + update_mask = {} + + update_evaluation_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_evaluation_dataset, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::EvaluationDataset), request["evaluation_dataset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_evaluation_dataset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_evaluation_dataset({ evaluation_dataset: evaluation_dataset, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_evaluation_dataset evaluation_dataset: evaluation_dataset, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_evaluation_dataset ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new(evaluation_dataset: evaluation_dataset, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_evaluation_dataset({ evaluation_dataset: evaluation_dataset, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_evaluation_dataset(::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new(evaluation_dataset: evaluation_dataset, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_evaluation_dataset_client_stub.call_rpc_count + end + end + + def test_delete_evaluation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + etag = "hello world" + + delete_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_evaluation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_evaluation({ name: name, force: force, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_evaluation name: name, force: force, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_evaluation ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new(name: name, force: force, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_evaluation({ name: name, force: force, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_evaluation(::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new(name: name, force: force, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_evaluation_client_stub.call_rpc_count + end + end + + def test_delete_evaluation_result + # 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_evaluation_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_evaluation_result, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_evaluation_result_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_evaluation_result({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_evaluation_result name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_evaluation_result ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_evaluation_result({ 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_evaluation_result(::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.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_evaluation_result_client_stub.call_rpc_count + end + end + + def test_delete_evaluation_dataset + # 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" + etag = "hello world" + + delete_evaluation_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_evaluation_dataset, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_evaluation_dataset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_evaluation_dataset({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_evaluation_dataset name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_evaluation_dataset ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_evaluation_dataset({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_evaluation_dataset(::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_evaluation_dataset_client_stub.call_rpc_count + end + end + + def test_delete_evaluation_run + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_evaluation_run, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_evaluation_run({ 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.delete_evaluation_run 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.delete_evaluation_run ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.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.delete_evaluation_run({ 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.delete_evaluation_run(::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_evaluation_run_client_stub.call_rpc_count + end + end + + def test_get_evaluation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::Evaluation.new + grpc_operation = GRPC::ActiveCall::Operation.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_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_evaluation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetEvaluationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_evaluation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_evaluation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_evaluation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_evaluation ::Google::Cloud::Ces::V1beta::GetEvaluationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_evaluation({ 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_evaluation(::Google::Cloud::Ces::V1beta::GetEvaluationRequest.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_evaluation_client_stub.call_rpc_count + end + end + + def test_get_evaluation_result + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationResult.new + grpc_operation = GRPC::ActiveCall::Operation.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_evaluation_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_evaluation_result, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_evaluation_result_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_evaluation_result({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_evaluation_result name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_evaluation_result ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_evaluation_result({ 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_evaluation_result(::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.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_evaluation_result_client_stub.call_rpc_count + end + end + + def test_get_evaluation_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new + grpc_operation = GRPC::ActiveCall::Operation.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_evaluation_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_evaluation_dataset, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_evaluation_dataset_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_evaluation_dataset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_evaluation_dataset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_evaluation_dataset ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_evaluation_dataset({ 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_evaluation_dataset(::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.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_evaluation_dataset_client_stub.call_rpc_count + end + end + + def test_get_evaluation_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationRun.new + grpc_operation = GRPC::ActiveCall::Operation.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_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_evaluation_run, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_evaluation_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_evaluation_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_evaluation_run ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_evaluation_run({ 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_evaluation_run(::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.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_evaluation_run_client_stub.call_rpc_count + end + end + + def test_list_evaluations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListEvaluationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + evaluation_filter = "hello world" + evaluation_run_filter = "hello world" + order_by = "hello world" + last_ten_results = true + + list_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_evaluations, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest, 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["evaluation_filter"] + assert_equal "hello world", request["evaluation_run_filter"] + assert_equal "hello world", request["order_by"] + assert_equal true, request["last_ten_results"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_evaluations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results }) 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_evaluations parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results 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_evaluations ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results) 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_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results }, 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_evaluations(::Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results), 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_evaluations_client_stub.call_rpc_count + end + end + + def test_list_evaluation_results + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_evaluation_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_evaluation_results, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_evaluation_results_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_evaluation_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_evaluation_results parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_evaluation_results ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_evaluation_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_evaluation_results(::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_evaluation_results_client_stub.call_rpc_count + end + end + + def test_list_evaluation_datasets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_evaluation_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_evaluation_datasets, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_evaluation_datasets_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_evaluation_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_evaluation_datasets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_evaluation_datasets ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_evaluation_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_evaluation_datasets(::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_evaluation_datasets_client_stub.call_rpc_count + end + end + + def test_list_evaluation_runs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_evaluation_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_evaluation_runs, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_evaluation_runs_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_evaluation_runs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_evaluation_runs ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_evaluation_runs(::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_evaluation_runs_client_stub.call_rpc_count + end + end + + def test_list_evaluation_expectations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_evaluation_expectations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_evaluation_expectations, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_evaluation_expectations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_evaluation_expectations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_evaluation_expectations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_evaluation_expectations ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_evaluation_expectations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_evaluation_expectations(::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_evaluation_expectations_client_stub.call_rpc_count + end + end + + def test_get_evaluation_expectation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new + grpc_operation = GRPC::ActiveCall::Operation.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_evaluation_expectation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_evaluation_expectation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_evaluation_expectation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_evaluation_expectation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_evaluation_expectation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_evaluation_expectation ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_evaluation_expectation({ 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_evaluation_expectation(::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.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_evaluation_expectation_client_stub.call_rpc_count + end + end + + def test_create_evaluation_expectation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new + grpc_operation = GRPC::ActiveCall::Operation.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" + evaluation_expectation_id = "hello world" + evaluation_expectation = {} + + create_evaluation_expectation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_evaluation_expectation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["evaluation_expectation_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::EvaluationExpectation), request["evaluation_expectation"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_evaluation_expectation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_evaluation_expectation({ parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_evaluation_expectation parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_evaluation_expectation ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new(parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_evaluation_expectation({ parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_evaluation_expectation(::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new(parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_evaluation_expectation_client_stub.call_rpc_count + end + end + + def test_update_evaluation_expectation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + evaluation_expectation = {} + update_mask = {} + + update_evaluation_expectation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_evaluation_expectation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::EvaluationExpectation), request["evaluation_expectation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_evaluation_expectation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_evaluation_expectation({ evaluation_expectation: evaluation_expectation, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_evaluation_expectation evaluation_expectation: evaluation_expectation, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_evaluation_expectation ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new(evaluation_expectation: evaluation_expectation, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_evaluation_expectation({ evaluation_expectation: evaluation_expectation, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_evaluation_expectation(::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new(evaluation_expectation: evaluation_expectation, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_evaluation_expectation_client_stub.call_rpc_count + end + end + + def test_delete_evaluation_expectation + # 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" + etag = "hello world" + + delete_evaluation_expectation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_evaluation_expectation, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_evaluation_expectation_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_evaluation_expectation({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_evaluation_expectation name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_evaluation_expectation ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_evaluation_expectation({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_evaluation_expectation(::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_evaluation_expectation_client_stub.call_rpc_count + end + end + + def test_create_scheduled_evaluation_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new + grpc_operation = GRPC::ActiveCall::Operation.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" + scheduled_evaluation_run_id = "hello world" + scheduled_evaluation_run = {} + + create_scheduled_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_scheduled_evaluation_run, name + assert_kind_of ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["scheduled_evaluation_run_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun), request["scheduled_evaluation_run"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_scheduled_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_scheduled_evaluation_run({ parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_scheduled_evaluation_run parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new(parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_scheduled_evaluation_run({ parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new(parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_scheduled_evaluation_run_client_stub.call_rpc_count + end + end + + def test_get_scheduled_evaluation_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new + grpc_operation = GRPC::ActiveCall::Operation.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_scheduled_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scheduled_evaluation_run, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scheduled_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scheduled_evaluation_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scheduled_evaluation_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scheduled_evaluation_run({ 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_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.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_scheduled_evaluation_run_client_stub.call_rpc_count + end + end + + def test_list_scheduled_evaluation_runs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + + list_scheduled_evaluation_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scheduled_evaluation_runs, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_scheduled_evaluation_runs_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scheduled_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_scheduled_evaluation_runs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_scheduled_evaluation_runs ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_scheduled_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_scheduled_evaluation_runs(::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_scheduled_evaluation_runs_client_stub.call_rpc_count + end + end + + def test_update_scheduled_evaluation_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scheduled_evaluation_run = {} + update_mask = {} + + update_scheduled_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_scheduled_evaluation_run, name + assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun), request["scheduled_evaluation_run"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_scheduled_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_scheduled_evaluation_run({ scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_scheduled_evaluation_run scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new(scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_scheduled_evaluation_run({ scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new(scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_scheduled_evaluation_run_client_stub.call_rpc_count + end + end + + def test_delete_scheduled_evaluation_run + # 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" + etag = "hello world" + + delete_scheduled_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_scheduled_evaluation_run, name + assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_scheduled_evaluation_run_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_scheduled_evaluation_run({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_scheduled_evaluation_run name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_scheduled_evaluation_run({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_scheduled_evaluation_run_client_stub.call_rpc_count + end + end + + def test_test_persona_voice + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + app = "hello world" + persona_id = "hello world" + text = "hello world" + + test_persona_voice_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_persona_voice, name + assert_kind_of ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest, request + assert_equal "hello world", request["app"] + assert_equal "hello world", request["persona_id"] + assert_equal "hello world", request["text"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_persona_voice_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_persona_voice({ app: app, persona_id: persona_id, text: text }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_persona_voice app: app, persona_id: persona_id, text: text do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_persona_voice ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new(app: app, persona_id: persona_id, text: text) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_persona_voice({ app: app, persona_id: persona_id, text: text }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_persona_voice(::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new(app: app, persona_id: persona_id, text: text), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_persona_voice_client_stub.call_rpc_count + end + end + + def test_export_evaluations + # 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" + names = ["hello world"] + export_options = {} + include_evaluation_results = true + include_evaluations = true + + export_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_evaluations, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ExportOptions), request["export_options"] + assert_equal true, request["include_evaluation_results"] + assert_equal true, request["include_evaluations"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_evaluations_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_evaluations({ parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations }) 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.export_evaluations parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations 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.export_evaluations ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new(parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations) 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.export_evaluations({ parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations }, 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.export_evaluations(::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new(parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_evaluations_client_stub.call_rpc_count + end + end + + def test_export_evaluation_runs + # 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" + names = ["hello world"] + export_options = {} + + export_evaluation_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_evaluation_runs, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ExportOptions), request["export_options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_evaluation_runs_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }) 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.export_evaluation_runs parent: parent, names: names, export_options: export_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 + client.export_evaluation_runs ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options) 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.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }, 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.export_evaluation_runs(::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_evaluation_runs_client_stub.call_rpc_count + end + end + + def test_export_evaluation_results + # 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" + names = ["hello world"] + export_options = {} + + export_evaluation_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_evaluation_results, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ExportOptions), request["export_options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_evaluation_results_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_evaluation_results({ parent: parent, names: names, export_options: export_options }) 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.export_evaluation_results parent: parent, names: names, export_options: export_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 + client.export_evaluation_results ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options) 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.export_evaluation_results({ parent: parent, names: names, export_options: export_options }, 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.export_evaluation_results(::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_evaluation_results_client_stub.call_rpc_count + end + end + + def test_run_evaluation_result_metrics + # 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. + evaluation_result_id = "hello world" + + run_evaluation_result_metrics_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_evaluation_result_metrics, name + assert_kind_of ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, request + assert_equal "hello world", request["evaluation_result_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_evaluation_result_metrics_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics(::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_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, run_evaluation_result_metrics_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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Ces::V1beta::EvaluationService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_paths_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_paths_test.rb new file mode 100644 index 000000000000..db6c426481ca --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/ces/v1beta/session_service" + +class ::Google::Cloud::Ces::V1beta::SessionService::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_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::Ces::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.agent_path project: "value0", location: "value1", app: "value2", agent: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/agents/value3", path + end + end + + def test_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.session_path project: "value0", location: "value1", app: "value2", session: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/sessions/value3", path + end + end + + def test_tool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tool_path project: "value0", location: "value1", app: "value2", tool: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/tools/value3", path + end + end + + def test_toolset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.toolset_path project: "value0", location: "value1", app: "value2", toolset: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/toolsets/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_rest_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_rest_test.rb new file mode 100644 index 000000000000..4fcd30463b97 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_rest_test.rb @@ -0,0 +1,209 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/session_service_pb" +require "google/cloud/ces/v1beta/session_service/rest" + + +class ::Google::Cloud::Ces::V1beta::SessionService::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_run_session + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::RunSessionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + config = {} + inputs = [{}] + + run_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::SessionService::Rest::ServiceStub.stub :transcode_run_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_session_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_session({ config: config, inputs: inputs }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_session config: config, inputs: inputs do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_session ::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_session({ config: config, inputs: inputs }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_session(::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_session_client_stub.call_count + end + end + end + + def test_stream_run_session + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::RunSessionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + config = {} + inputs = [{}] + + stream_run_session_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::Ces::V1beta::SessionService::Rest::ServiceStub.stub :transcode_stream_run_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, stream_run_session_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.stream_run_session({ config: config, inputs: inputs }) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use named arguments + client.stream_run_session config: config, inputs: inputs do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object + client.stream_run_session ::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use hash object with options + client.stream_run_session({ config: config, inputs: inputs }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object with options + client.stream_run_session(::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Verify method calls + assert_equal 5, stream_run_session_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::Ces::V1beta::SessionService::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::Ces::V1beta::SessionService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_test.rb new file mode 100644 index 000000000000..7f8888953312 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_test.rb @@ -0,0 +1,328 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/session_service_pb" +require "google/cloud/ces/v1beta/session_service" + +class ::Google::Cloud::Ces::V1beta::SessionService::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_run_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::RunSessionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + config = {} + inputs = [{}] + + run_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_session, name + assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::SessionConfig), request["config"] + assert_kind_of ::Google::Cloud::Ces::V1beta::SessionInput, request["inputs"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_session_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_session({ config: config, inputs: inputs }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_session config: config, inputs: inputs do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_session ::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_session({ config: config, inputs: inputs }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_session(::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_session_client_stub.call_rpc_count + end + end + + def test_stream_run_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::RunSessionResponse.new + grpc_operation = GRPC::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. + config = {} + inputs = [{}] + + stream_run_session_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :stream_run_session, name + assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::SessionConfig), request["config"] + assert_kind_of ::Google::Cloud::Ces::V1beta::SessionInput, request["inputs"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, stream_run_session_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.stream_run_session({ config: config, inputs: inputs }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.stream_run_session config: config, inputs: inputs do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.stream_run_session ::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.stream_run_session({ config: config, inputs: inputs }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.stream_run_session(::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, stream_run_session_client_stub.call_rpc_count + end + end + + def test_bidi_run_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a bidi streaming method. + config = {} + + bidi_run_session_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :bidi_run_session, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, bidi_run_session_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { config: config } + request_proto = ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new config: config + enum_input = [request_hash, request_proto].to_enum + client.bidi_run_session enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { config: config } + request_proto = ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new config: config + stream_input = Gapic::StreamInput.new + client.bidi_run_session stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Use enumerable object with hash and protobuf object with options. + request_hash = { config: config } + request_proto = ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new config: config + enum_input = [request_hash, request_proto].to_enum + client.bidi_run_session enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { config: config } + request_proto = ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new config: config + stream_input = Gapic::StreamInput.new + client.bidi_run_session stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Verify method calls + assert_equal 4, bidi_run_session_client_stub.call_rpc_count + bidi_run_session_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage, r + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::SessionConfig), r["config"] + assert_equal :config, r.message_type + end + end + 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::Ces::V1beta::SessionService::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::Ces::V1beta::SessionService::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::Ces::V1beta::SessionService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Ces::V1beta::SessionService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_paths_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_paths_test.rb new file mode 100644 index 000000000000..a5e5c3aac9a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/ces/v1beta/tool_service" + +class ::Google::Cloud::Ces::V1beta::ToolService::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_app_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.app_path project: "value0", location: "value1", app: "value2" + assert_equal "projects/value0/locations/value1/apps/value2", path + end + end + + def test_tool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tool_path project: "value0", location: "value1", app: "value2", tool: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/tools/value3", path + end + end + + def test_toolset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.toolset_path project: "value0", location: "value1", app: "value2", toolset: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/toolsets/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb new file mode 100644 index 000000000000..07aa71523536 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb @@ -0,0 +1,268 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/tool_service_pb" +require "google/cloud/ces/v1beta/tool_service/rest" + + +class ::Google::Cloud::Ces::V1beta::ToolService::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_execute_tool + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::ExecuteToolResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + tool = "hello world" + variables = {} + parent = "hello world" + args = {} + mock_config = {} + + execute_tool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::ToolService::Rest::ServiceStub.stub :transcode_execute_tool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, execute_tool_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.execute_tool({ tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.execute_tool tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.execute_tool ::Google::Cloud::Ces::V1beta::ExecuteToolRequest.new(tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.execute_tool({ tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.execute_tool(::Google::Cloud::Ces::V1beta::ExecuteToolRequest.new(tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, execute_tool_client_stub.call_count + end + end + end + + def test_retrieve_tool_schema + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + tool = "hello world" + parent = "hello world" + + retrieve_tool_schema_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::ToolService::Rest::ServiceStub.stub :transcode_retrieve_tool_schema_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retrieve_tool_schema_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.retrieve_tool_schema({ tool: tool, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.retrieve_tool_schema tool: tool, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.retrieve_tool_schema ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new(tool: tool, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.retrieve_tool_schema({ tool: tool, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.retrieve_tool_schema(::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new(tool: tool, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retrieve_tool_schema_client_stub.call_count + end + end + end + + def test_retrieve_tools + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::RetrieveToolsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + toolset = "hello world" + tool_ids = ["hello world"] + bypass_persistence_config = true + + retrieve_tools_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::ToolService::Rest::ServiceStub.stub :transcode_retrieve_tools_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retrieve_tools_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.retrieve_tools toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.retrieve_tools ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.retrieve_tools(::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retrieve_tools_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::Ces::V1beta::ToolService::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::Ces::V1beta::ToolService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb new file mode 100644 index 000000000000..be227e6c59fb --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb @@ -0,0 +1,295 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/tool_service_pb" +require "google/cloud/ces/v1beta/tool_service" + +class ::Google::Cloud::Ces::V1beta::ToolService::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_execute_tool + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::ExecuteToolResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + tool = "hello world" + variables = {} + parent = "hello world" + args = {} + mock_config = {} + + execute_tool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :execute_tool, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ExecuteToolRequest, request + assert_equal "hello world", request["tool"] + assert_equal :tool, request.tool_identifier + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Struct), request["variables"] + assert_equal :variables, request.tool_execution_context + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Struct), request["args"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::MockConfig), request["mock_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, execute_tool_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.execute_tool({ tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.execute_tool tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.execute_tool ::Google::Cloud::Ces::V1beta::ExecuteToolRequest.new(tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.execute_tool({ tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.execute_tool(::Google::Cloud::Ces::V1beta::ExecuteToolRequest.new(tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, execute_tool_client_stub.call_rpc_count + end + end + + def test_retrieve_tool_schema + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + tool = "hello world" + parent = "hello world" + + retrieve_tool_schema_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_tool_schema, name + assert_kind_of ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest, request + assert_equal "hello world", request["tool"] + assert_equal :tool, request.tool_identifier + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_tool_schema_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.retrieve_tool_schema({ tool: tool, parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.retrieve_tool_schema tool: tool, parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.retrieve_tool_schema ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new(tool: tool, parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.retrieve_tool_schema({ tool: tool, parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.retrieve_tool_schema(::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new(tool: tool, parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, retrieve_tool_schema_client_stub.call_rpc_count + end + end + + def test_retrieve_tools + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::RetrieveToolsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + toolset = "hello world" + tool_ids = ["hello world"] + bypass_persistence_config = true + + retrieve_tools_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_tools, name + assert_kind_of ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest, request + assert_equal "hello world", request["toolset"] + assert_equal ["hello world"], request["tool_ids"] + assert_equal true, request["bypass_persistence_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_tools_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.retrieve_tools toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.retrieve_tools ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.retrieve_tools(::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, retrieve_tools_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::Ces::V1beta::ToolService::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::Ces::V1beta::ToolService::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::Ces::V1beta::ToolService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Ces::V1beta::ToolService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_paths_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_paths_test.rb new file mode 100644 index 000000000000..17f310fbf092 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/ces/v1beta/widget_service" + +class ::Google::Cloud::Ces::V1beta::WidgetService::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_deployment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.deployment_path project: "value0", location: "value1", app: "value2", deployment: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/deployments/value3", path + end + end + + def test_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.session_path project: "value0", location: "value1", app: "value2", session: "value3" + assert_equal "projects/value0/locations/value1/apps/value2/sessions/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_rest_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_rest_test.rb new file mode 100644 index 000000000000..21ffd340569a --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_rest_test.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/widget_service_pb" +require "google/cloud/ces/v1beta/widget_service/rest" + + +class ::Google::Cloud::Ces::V1beta::WidgetService::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_generate_chat_token + # Create test objects. + client_result = ::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + deployment = "hello world" + recaptcha_token = "hello world" + live_handoff_enabled = true + + generate_chat_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::WidgetService::Rest::ServiceStub.stub :transcode_generate_chat_token_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_chat_token_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_chat_token({ name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_chat_token name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_chat_token ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new(name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_chat_token({ name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_chat_token(::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new(name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_chat_token_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::Ces::V1beta::WidgetService::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::Ces::V1beta::WidgetService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_test.rb new file mode 100644 index 000000000000..17b8beff8848 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_test.rb @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/ces/v1beta/widget_service_pb" +require "google/cloud/ces/v1beta/widget_service" + +class ::Google::Cloud::Ces::V1beta::WidgetService::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_generate_chat_token + # Create GRPC objects. + grpc_response = ::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + deployment = "hello world" + recaptcha_token = "hello world" + live_handoff_enabled = true + + generate_chat_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_chat_token, name + assert_kind_of ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["deployment"] + assert_equal "hello world", request["recaptcha_token"] + assert_equal true, request["live_handoff_enabled"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_chat_token_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_chat_token({ name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_chat_token name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_chat_token ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new(name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_chat_token({ name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_chat_token(::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new(name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_chat_token_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::Ces::V1beta::WidgetService::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::Ces::V1beta::WidgetService::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::Ces::V1beta::WidgetService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Ces::V1beta::WidgetService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-ces-v1beta/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From c78d011dccd953cf2172142ad204b4efa416bbaa Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 9 Jun 2026 10:03:59 +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 --- google-cloud-ces-v1beta/.owlbot-manifest.json | 7 + google-cloud-ces-v1beta/gapic_metadata.json | 15 + .../google/cloud/ces/v1beta/agent_card_pb.rb | 0 .../lib/google/cloud/ces/v1beta/agent_pb.rb | 2 +- .../cloud/ces/v1beta/agent_service/client.rb | 12 +- .../ces/v1beta/agent_service/rest/client.rb | 12 +- .../cloud/ces/v1beta/agent_service_pb.rb | 3 +- .../lib/google/cloud/ces/v1beta/app_pb.rb | 5 +- .../cloud/ces/v1beta/conversation_pb.rb | 2 +- .../google/cloud/ces/v1beta/deployment_pb.rb | 6 +- .../v1beta/evaluation_metrics_config_pb.rb | 0 .../google/cloud/ces/v1beta/evaluation_pb.rb | 3 +- .../ces/v1beta/evaluation_service/client.rb | 316 + .../v1beta/evaluation_service/rest/client.rb | 295 + .../evaluation_service/rest/service_stub.rb | 186 + .../cloud/ces/v1beta/evaluation_service_pb.rb | 9 +- .../v1beta/evaluation_service_services_pb.rb | 6 + .../google/cloud/ces/v1beta/mcp_tool_pb.rb | 3 +- .../google/cloud/ces/v1beta/mcp_toolset_pb.rb | 5 +- .../cloud/ces/v1beta/python_function_pb.rb | 3 +- .../cloud/ces/v1beta/session_service_pb.rb | 3 +- .../lib/google/cloud/ces/v1beta/tool_pb.rb | 4 +- .../cloud/ces/v1beta/tool_service/client.rb | 6 +- .../ces/v1beta/tool_service/rest/client.rb | 6 +- .../cloud/ces/v1beta/tool_service_pb.rb | 3 +- .../google/cloud/ces/v1beta/widget_tool_pb.rb | 4 +- .../google/cloud/ces/v1beta/agent.rb | 9 + .../google/cloud/ces/v1beta/agent_card.rb | 0 .../google/cloud/ces/v1beta/agent_service.rb | 27 +- .../proto_docs/google/cloud/ces/v1beta/app.rb | 53 +- .../google/cloud/ces/v1beta/conversation.rb | 15 +- .../google/cloud/ces/v1beta/deployment.rb | 61 + .../google/cloud/ces/v1beta/evaluation.rb | 95 +- .../ces/v1beta/evaluation_metrics_config.rb | 0 .../cloud/ces/v1beta/evaluation_service.rb | 82 +- .../google/cloud/ces/v1beta/mcp_tool.rb | 25 + .../google/cloud/ces/v1beta/mcp_toolset.rb | 47 + .../cloud/ces/v1beta/python_function.rb | 3 + .../cloud/ces/v1beta/session_service.rb | 3 + .../google/cloud/ces/v1beta/tool.rb | 32 +- .../google/cloud/ces/v1beta/tool_service.rb | 12 + .../google/cloud/ces/v1beta/widget_tool.rb | 36 + .../export_evaluation_results.rb | 0 .../export_evaluation_runs.rb | 0 .../run_evaluation_result_metrics.rb | 0 ...ppet_metadata_google.cloud.ces.v1beta.json | 120 + .../v1beta/evaluation_service_rest_test.rb | 166 + .../ces/v1beta/evaluation_service_test.rb | 197 + .../ces/v1beta/tool_service_rest_test.rb | 11 +- .../cloud/ces/v1beta/tool_service_test.rb | 12 +- .../google-cloud-ces-v1beta/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-ces-v1beta/.rubocop.yml | 33 - .../google-cloud-ces-v1beta/.toys.rb | 28 - .../google-cloud-ces-v1beta/.yardopts | 12 - .../google-cloud-ces-v1beta/AUTHENTICATION.md | 122 - .../google-cloud-ces-v1beta/CHANGELOG.md | 2 - .../google-cloud-ces-v1beta/Gemfile | 14 - .../google-cloud-ces-v1beta/LICENSE.md | 201 - .../google-cloud-ces-v1beta/README.md | 154 - .../google-cloud-ces-v1beta/Rakefile | 169 - .../gapic_metadata.json | 519 -- .../google-cloud-ces-v1beta.gemspec | 29 - .../lib/google-cloud-ces-v1beta.rb | 21 - .../lib/google/cloud/ces/v1beta.rb | 49 - .../lib/google/cloud/ces/v1beta/agent_pb.rb | 30 - .../google/cloud/ces/v1beta/agent_service.rb | 57 - .../cloud/ces/v1beta/agent_service/client.rb | 5639 ----------------- .../ces/v1beta/agent_service/credentials.rb | 48 - .../ces/v1beta/agent_service/operations.rb | 841 --- .../cloud/ces/v1beta/agent_service/paths.rb | 481 -- .../cloud/ces/v1beta/agent_service/rest.rb | 55 - .../ces/v1beta/agent_service/rest/client.rb | 5247 --------------- .../v1beta/agent_service/rest/operations.rb | 925 --- .../v1beta/agent_service/rest/service_stub.rb | 3213 ---------- .../cloud/ces/v1beta/agent_service_pb.rb | 132 - .../ces/v1beta/agent_service_services_pb.rb | 148 - .../google/cloud/ces/v1beta/agent_tool_pb.rb | 24 - .../cloud/ces/v1beta/agent_transfers_pb.rb | 29 - .../lib/google/cloud/ces/v1beta/app_pb.rb | 70 - .../google/cloud/ces/v1beta/app_version_pb.rb | 32 - .../lib/google/cloud/ces/v1beta/auth_pb.rb | 34 - .../cloud/ces/v1beta/bigquery_export_pb.rb | 23 - .../cloud/ces/v1beta/bindings_override.rb | 75 - .../google/cloud/ces/v1beta/changelog_pb.rb | 26 - .../cloud/ces/v1beta/client_function_pb.rb | 24 - .../lib/google/cloud/ces/v1beta/common_pb.rb | 46 - .../cloud/ces/v1beta/connector_tool_pb.rb | 27 - .../cloud/ces/v1beta/connector_toolset_pb.rb | 25 - .../cloud/ces/v1beta/conversation_pb.rb | 31 - .../google/cloud/ces/v1beta/data_store_pb.rb | 27 - .../cloud/ces/v1beta/data_store_tool_pb.rb | 40 - .../google/cloud/ces/v1beta/deployment_pb.rb | 30 - .../google/cloud/ces/v1beta/evaluation_pb.rb | 99 - .../cloud/ces/v1beta/evaluation_service.rb | 56 - .../ces/v1beta/evaluation_service/client.rb | 4048 ------------ .../v1beta/evaluation_service/credentials.rb | 48 - .../v1beta/evaluation_service/operations.rb | 841 --- .../ces/v1beta/evaluation_service/paths.rb | 306 - .../ces/v1beta/evaluation_service/rest.rb | 54 - .../v1beta/evaluation_service/rest/client.rb | 3768 ----------- .../evaluation_service/rest/operations.rb | 925 --- .../evaluation_service/rest/service_stub.rb | 2233 ------- .../cloud/ces/v1beta/evaluation_service_pb.rb | 93 - .../v1beta/evaluation_service_services_pb.rb | 116 - .../lib/google/cloud/ces/v1beta/example_pb.rb | 34 - .../lib/google/cloud/ces/v1beta/fakes_pb.rb | 25 - .../cloud/ces/v1beta/file_context_pb.rb | 24 - .../cloud/ces/v1beta/file_search_tool_pb.rb | 24 - .../google/cloud/ces/v1beta/golden_run_pb.rb | 21 - .../cloud/ces/v1beta/google_search_tool_pb.rb | 24 - .../google/cloud/ces/v1beta/guardrail_pb.rb | 37 - .../google/cloud/ces/v1beta/mcp_tool_pb.rb | 27 - .../google/cloud/ces/v1beta/mcp_toolset_pb.rb | 28 - .../lib/google/cloud/ces/v1beta/mocks_pb.rb | 26 - .../google/cloud/ces/v1beta/omnichannel_pb.rb | 31 - .../ces/v1beta/omnichannel_service_pb.rb | 27 - .../cloud/ces/v1beta/open_api_tool_pb.rb | 25 - .../cloud/ces/v1beta/open_api_toolset_pb.rb | 25 - .../cloud/ces/v1beta/python_function_pb.rb | 24 - .../lib/google/cloud/ces/v1beta/rest.rb | 42 - .../lib/google/cloud/ces/v1beta/schema_pb.rb | 25 - .../cloud/ces/v1beta/search_suggestions_pb.rb | 22 - .../cloud/ces/v1beta/security_settings_pb.rb | 27 - .../cloud/ces/v1beta/session_service.rb | 55 - .../ces/v1beta/session_service/client.rb | 760 --- .../ces/v1beta/session_service/credentials.rb | 48 - .../cloud/ces/v1beta/session_service/paths.rb | 117 - .../cloud/ces/v1beta/session_service/rest.rb | 53 - .../ces/v1beta/session_service/rest/client.rb | 560 -- .../session_service/rest/service_stub.rb | 199 - .../cloud/ces/v1beta/session_service_pb.rb | 54 - .../ces/v1beta/session_service_services_pb.rb | 120 - .../google/cloud/ces/v1beta/system_tool_pb.rb | 23 - .../lib/google/cloud/ces/v1beta/tool_pb.rb | 40 - .../google/cloud/ces/v1beta/tool_service.rb | 55 - .../cloud/ces/v1beta/tool_service/client.rb | 731 --- .../ces/v1beta/tool_service/credentials.rb | 48 - .../cloud/ces/v1beta/tool_service/paths.rb | 94 - .../cloud/ces/v1beta/tool_service/rest.rb | 53 - .../ces/v1beta/tool_service/rest/client.rb | 675 -- .../v1beta/tool_service/rest/service_stub.rb | 267 - .../cloud/ces/v1beta/tool_service_pb.rb | 37 - .../ces/v1beta/tool_service_services_pb.rb | 50 - .../lib/google/cloud/ces/v1beta/toolset_pb.rb | 30 - .../cloud/ces/v1beta/toolset_tool_pb.rb | 24 - .../lib/google/cloud/ces/v1beta/version.rb | 28 - .../google/cloud/ces/v1beta/widget_service.rb | 55 - .../cloud/ces/v1beta/widget_service/client.rb | 501 -- .../ces/v1beta/widget_service/credentials.rb | 48 - .../cloud/ces/v1beta/widget_service/paths.rb | 75 - .../cloud/ces/v1beta/widget_service/rest.rb | 53 - .../ces/v1beta/widget_service/rest/client.rb | 459 -- .../widget_service/rest/service_stub.rb | 143 - .../cloud/ces/v1beta/widget_service_pb.rb | 28 - .../ces/v1beta/widget_service_services_pb.rb | 46 - .../google/cloud/ces/v1beta/widget_tool_pb.rb | 31 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/ces/v1beta/agent.rb | 233 - .../google/cloud/ces/v1beta/agent_service.rb | 1682 ----- .../google/cloud/ces/v1beta/agent_tool.rb | 48 - .../cloud/ces/v1beta/agent_transfers.rb | 111 - .../proto_docs/google/cloud/ces/v1beta/app.rb | 883 --- .../google/cloud/ces/v1beta/app_version.rb | 83 - .../google/cloud/ces/v1beta/auth.rb | 214 - .../cloud/ces/v1beta/bigquery_export.rb | 45 - .../google/cloud/ces/v1beta/changelog.rb | 73 - .../cloud/ces/v1beta/client_function.rb | 48 - .../google/cloud/ces/v1beta/common.rb | 375 -- .../google/cloud/ces/v1beta/connector_tool.rb | 122 - .../cloud/ces/v1beta/connector_toolset.rb | 52 - .../google/cloud/ces/v1beta/conversation.rb | 159 - .../google/cloud/ces/v1beta/data_store.rb | 102 - .../cloud/ces/v1beta/data_store_tool.rb | 328 - .../google/cloud/ces/v1beta/deployment.rb | 123 - .../google/cloud/ces/v1beta/evaluation.rb | 1687 ----- .../cloud/ces/v1beta/evaluation_service.rb | 1087 ---- .../google/cloud/ces/v1beta/example.rb | 245 - .../google/cloud/ces/v1beta/fakes.rb | 67 - .../google/cloud/ces/v1beta/file_context.rb | 50 - .../cloud/ces/v1beta/file_search_tool.rb | 60 - .../google/cloud/ces/v1beta/golden_run.rb | 40 - .../cloud/ces/v1beta/google_search_tool.rb | 76 - .../google/cloud/ces/v1beta/guardrail.rb | 324 - .../google/cloud/ces/v1beta/mcp_tool.rb | 110 - .../google/cloud/ces/v1beta/mcp_toolset.rb | 118 - .../google/cloud/ces/v1beta/mocks.rb | 60 - .../google/cloud/ces/v1beta/omnichannel.rb | 163 - .../cloud/ces/v1beta/omnichannel_service.rb | 45 - .../google/cloud/ces/v1beta/open_api_tool.rb | 66 - .../cloud/ces/v1beta/open_api_toolset.rb | 57 - .../cloud/ces/v1beta/python_function.rb | 47 - .../google/cloud/ces/v1beta/schema.rb | 162 - .../cloud/ces/v1beta/search_suggestions.rb | 55 - .../cloud/ces/v1beta/security_settings.rb | 80 - .../cloud/ces/v1beta/session_service.rb | 493 -- .../google/cloud/ces/v1beta/system_tool.rb | 38 - .../google/cloud/ces/v1beta/tool.rb | 136 - .../google/cloud/ces/v1beta/tool_service.rb | 185 - .../google/cloud/ces/v1beta/toolset.rb | 80 - .../google/cloud/ces/v1beta/toolset_tool.rb | 40 - .../google/cloud/ces/v1beta/widget_service.rb | 62 - .../google/cloud/ces/v1beta/widget_tool.rb | 182 - .../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/rpc/status.rb | 48 - .../google-cloud-ces-v1beta/snippets/Gemfile | 32 - .../batch_delete_conversations.rb | 54 - .../snippets/agent_service/create_agent.rb | 47 - .../snippets/agent_service/create_app.rb | 54 - .../agent_service/create_app_version.rb | 47 - .../agent_service/create_deployment.rb | 47 - .../snippets/agent_service/create_example.rb | 47 - .../agent_service/create_guardrail.rb | 47 - .../snippets/agent_service/create_tool.rb | 47 - .../snippets/agent_service/create_toolset.rb | 47 - .../snippets/agent_service/delete_agent.rb | 47 - .../snippets/agent_service/delete_app.rb | 54 - .../agent_service/delete_app_version.rb | 47 - .../agent_service/delete_conversation.rb | 47 - .../agent_service/delete_deployment.rb | 47 - .../snippets/agent_service/delete_example.rb | 47 - .../agent_service/delete_guardrail.rb | 47 - .../snippets/agent_service/delete_tool.rb | 47 - .../snippets/agent_service/delete_toolset.rb | 47 - .../snippets/agent_service/export_app.rb | 54 - .../agent_service/generate_app_resource.rb | 54 - .../snippets/agent_service/get_agent.rb | 47 - .../snippets/agent_service/get_app.rb | 47 - .../snippets/agent_service/get_app_version.rb | 47 - .../snippets/agent_service/get_changelog.rb | 47 - .../agent_service/get_conversation.rb | 47 - .../snippets/agent_service/get_deployment.rb | 47 - .../snippets/agent_service/get_example.rb | 47 - .../snippets/agent_service/get_guardrail.rb | 47 - .../agent_service/get_security_settings.rb | 47 - .../snippets/agent_service/get_tool.rb | 47 - .../snippets/agent_service/get_toolset.rb | 47 - .../snippets/agent_service/import_app.rb | 54 - .../snippets/agent_service/list_agents.rb | 51 - .../agent_service/list_app_versions.rb | 51 - .../snippets/agent_service/list_apps.rb | 51 - .../snippets/agent_service/list_changelogs.rb | 51 - .../agent_service/list_conversations.rb | 51 - .../agent_service/list_deployments.rb | 51 - .../snippets/agent_service/list_examples.rb | 51 - .../snippets/agent_service/list_guardrails.rb | 51 - .../snippets/agent_service/list_tools.rb | 51 - .../snippets/agent_service/list_toolsets.rb | 51 - .../agent_service/restore_app_version.rb | 54 - .../snippets/agent_service/update_agent.rb | 47 - .../snippets/agent_service/update_app.rb | 47 - .../agent_service/update_deployment.rb | 47 - .../snippets/agent_service/update_example.rb | 47 - .../agent_service/update_guardrail.rb | 47 - .../agent_service/update_security_settings.rb | 47 - .../snippets/agent_service/update_tool.rb | 47 - .../snippets/agent_service/update_toolset.rb | 47 - .../evaluation_service/create_evaluation.rb | 47 - .../create_evaluation_dataset.rb | 47 - .../create_evaluation_expectation.rb | 47 - .../create_scheduled_evaluation_run.rb | 47 - .../evaluation_service/delete_evaluation.rb | 47 - .../delete_evaluation_dataset.rb | 47 - .../delete_evaluation_expectation.rb | 47 - .../delete_evaluation_result.rb | 47 - .../delete_evaluation_run.rb | 54 - .../delete_scheduled_evaluation_run.rb | 47 - .../evaluation_service/export_evaluations.rb | 54 - .../evaluation_service/generate_evaluation.rb | 54 - .../evaluation_service/get_evaluation.rb | 47 - .../get_evaluation_dataset.rb | 47 - .../get_evaluation_expectation.rb | 47 - .../get_evaluation_result.rb | 47 - .../evaluation_service/get_evaluation_run.rb | 47 - .../get_scheduled_evaluation_run.rb | 47 - .../evaluation_service/import_evaluations.rb | 54 - .../list_evaluation_datasets.rb | 51 - .../list_evaluation_expectations.rb | 51 - .../list_evaluation_results.rb | 51 - .../list_evaluation_runs.rb | 51 - .../evaluation_service/list_evaluations.rb | 51 - .../list_scheduled_evaluation_runs.rb | 51 - .../evaluation_service/run_evaluation.rb | 54 - .../evaluation_service/test_persona_voice.rb | 47 - .../evaluation_service/update_evaluation.rb | 47 - .../update_evaluation_dataset.rb | 47 - .../update_evaluation_expectation.rb | 47 - .../update_scheduled_evaluation_run.rb | 47 - .../upload_evaluation_audio.rb | 47 - .../session_service/bidi_run_session.rb | 56 - .../snippets/session_service/run_session.rb | 47 - .../session_service/stream_run_session.rb | 50 - ...ppet_metadata_google.cloud.ces.v1beta.json | 3735 ----------- .../snippets/tool_service/execute_tool.rb | 47 - .../tool_service/retrieve_tool_schema.rb | 47 - .../snippets/tool_service/retrieve_tools.rb | 47 - .../widget_service/generate_chat_token.rb | 47 - .../v1beta/agent_service_operations_test.rb | 400 -- .../ces/v1beta/agent_service_paths_test.rb | 289 - .../ces/v1beta/agent_service_rest_test.rb | 2948 --------- .../cloud/ces/v1beta/agent_service_test.rb | 3353 ---------- .../evaluation_service_operations_test.rb | 400 -- .../v1beta/evaluation_service_paths_test.rb | 199 - .../v1beta/evaluation_service_rest_test.rb | 2059 ------ .../ces/v1beta/evaluation_service_test.rb | 2360 ------- .../ces/v1beta/session_service_paths_test.rb | 91 - .../ces/v1beta/session_service_rest_test.rb | 209 - .../cloud/ces/v1beta/session_service_test.rb | 328 - .../ces/v1beta/tool_service_paths_test.rb | 79 - .../ces/v1beta/tool_service_rest_test.rb | 268 - .../cloud/ces/v1beta/tool_service_test.rb | 295 - .../ces/v1beta/widget_service_paths_test.rb | 67 - .../ces/v1beta/widget_service_rest_test.rb | 156 - .../cloud/ces/v1beta/widget_service_test.rb | 168 - .../google-cloud-ces-v1beta/test/helper.rb | 26 - 325 files changed, 1850 insertions(+), 71816 deletions(-) rename {owl-bot-staging/google-cloud-ces-v1beta => google-cloud-ces-v1beta}/lib/google/cloud/ces/v1beta/agent_card_pb.rb (100%) rename {owl-bot-staging/google-cloud-ces-v1beta => google-cloud-ces-v1beta}/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb (100%) rename {owl-bot-staging/google-cloud-ces-v1beta => google-cloud-ces-v1beta}/proto_docs/google/cloud/ces/v1beta/agent_card.rb (100%) rename {owl-bot-staging/google-cloud-ces-v1beta => google-cloud-ces-v1beta}/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb (100%) rename {owl-bot-staging/google-cloud-ces-v1beta => google-cloud-ces-v1beta}/snippets/evaluation_service/export_evaluation_results.rb (100%) rename {owl-bot-staging/google-cloud-ces-v1beta => google-cloud-ces-v1beta}/snippets/evaluation_service/export_evaluation_runs.rb (100%) rename {owl-bot-staging/google-cloud-ces-v1beta => google-cloud-ces-v1beta}/snippets/evaluation_service/run_evaluation_result_metrics.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/README.md delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/google-cloud-ces-v1beta.gemspec delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google-cloud-ces-v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_transfers_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/app_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/app_version_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/auth_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/changelog_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/client_function_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/example_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/fakes_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/file_context_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/file_search_tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/golden_run_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/google_search_tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/guardrail_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/mcp_tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/mcp_toolset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/mocks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/omnichannel_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/omnichannel_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/open_api_tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/open_api_toolset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/python_function_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/schema_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/search_suggestions_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/security_settings_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/system_tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/version.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_transfers.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app_version.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/auth.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/bigquery_export.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/changelog.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/client_function.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/common.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_toolset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/example.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/fakes.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_context.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_search_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/golden_run.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/google_search_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/guardrail.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mocks.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_toolset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/schema.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/search_suggestions.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/security_settings.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/system_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_service.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/batch_delete_conversations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_agent.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app_version.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_example.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_guardrail.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_toolset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_agent.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app_version.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_conversation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_example.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_guardrail.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_toolset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/export_app.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/generate_app_resource.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_agent.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app_version.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_changelog.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_conversation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_example.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_guardrail.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_security_settings.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_toolset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/import_app.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_agents.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_app_versions.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_apps.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_changelogs.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_conversations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_deployments.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_examples.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_guardrails.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_tools.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_toolsets.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/restore_app_version.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_agent.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_app.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_example.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_guardrail.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_security_settings.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_toolset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_expectation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_scheduled_evaluation_run.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_expectation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_result.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_run.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_scheduled_evaluation_run.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/generate_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_expectation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_result.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_run.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_scheduled_evaluation_run.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/import_evaluations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_datasets.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_expectations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_results.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_runs.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluations.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_scheduled_evaluation_runs.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/test_persona_voice.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_expectation.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_scheduled_evaluation_run.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/upload_evaluation_audio.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/bidi_run_session.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/run_session.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/stream_run_session.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/execute_tool.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tool_schema.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tools.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/snippets/widget_service/generate_chat_token.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-ces-v1beta/test/helper.rb diff --git a/google-cloud-ces-v1beta/.owlbot-manifest.json b/google-cloud-ces-v1beta/.owlbot-manifest.json index 07c0bed45cd6..84ebf08e9ed6 100644 --- a/google-cloud-ces-v1beta/.owlbot-manifest.json +++ b/google-cloud-ces-v1beta/.owlbot-manifest.json @@ -15,6 +15,7 @@ "google-cloud-ces-v1beta.gemspec", "lib/google-cloud-ces-v1beta.rb", "lib/google/cloud/ces/v1beta.rb", + "lib/google/cloud/ces/v1beta/agent_card_pb.rb", "lib/google/cloud/ces/v1beta/agent_pb.rb", "lib/google/cloud/ces/v1beta/agent_service.rb", "lib/google/cloud/ces/v1beta/agent_service/client.rb", @@ -43,6 +44,7 @@ "lib/google/cloud/ces/v1beta/data_store_pb.rb", "lib/google/cloud/ces/v1beta/data_store_tool_pb.rb", "lib/google/cloud/ces/v1beta/deployment_pb.rb", + "lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb", "lib/google/cloud/ces/v1beta/evaluation_pb.rb", "lib/google/cloud/ces/v1beta/evaluation_service.rb", "lib/google/cloud/ces/v1beta/evaluation_service/client.rb", @@ -113,6 +115,7 @@ "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", "proto_docs/google/cloud/ces/v1beta/agent.rb", + "proto_docs/google/cloud/ces/v1beta/agent_card.rb", "proto_docs/google/cloud/ces/v1beta/agent_service.rb", "proto_docs/google/cloud/ces/v1beta/agent_tool.rb", "proto_docs/google/cloud/ces/v1beta/agent_transfers.rb", @@ -130,6 +133,7 @@ "proto_docs/google/cloud/ces/v1beta/data_store_tool.rb", "proto_docs/google/cloud/ces/v1beta/deployment.rb", "proto_docs/google/cloud/ces/v1beta/evaluation.rb", + "proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb", "proto_docs/google/cloud/ces/v1beta/evaluation_service.rb", "proto_docs/google/cloud/ces/v1beta/example.rb", "proto_docs/google/cloud/ces/v1beta/fakes.rb", @@ -227,6 +231,8 @@ "snippets/evaluation_service/delete_evaluation_result.rb", "snippets/evaluation_service/delete_evaluation_run.rb", "snippets/evaluation_service/delete_scheduled_evaluation_run.rb", + "snippets/evaluation_service/export_evaluation_results.rb", + "snippets/evaluation_service/export_evaluation_runs.rb", "snippets/evaluation_service/export_evaluations.rb", "snippets/evaluation_service/generate_evaluation.rb", "snippets/evaluation_service/get_evaluation.rb", @@ -243,6 +249,7 @@ "snippets/evaluation_service/list_evaluations.rb", "snippets/evaluation_service/list_scheduled_evaluation_runs.rb", "snippets/evaluation_service/run_evaluation.rb", + "snippets/evaluation_service/run_evaluation_result_metrics.rb", "snippets/evaluation_service/test_persona_voice.rb", "snippets/evaluation_service/update_evaluation.rb", "snippets/evaluation_service/update_evaluation_dataset.rb", diff --git a/google-cloud-ces-v1beta/gapic_metadata.json b/google-cloud-ces-v1beta/gapic_metadata.json index d3f9e64411df..09270bb1a53c 100644 --- a/google-cloud-ces-v1beta/gapic_metadata.json +++ b/google-cloud-ces-v1beta/gapic_metadata.json @@ -457,6 +457,21 @@ "methods": [ "export_evaluations" ] + }, + "ExportEvaluationRuns": { + "methods": [ + "export_evaluation_runs" + ] + }, + "ExportEvaluationResults": { + "methods": [ + "export_evaluation_results" + ] + }, + "RunEvaluationResultMetrics": { + "methods": [ + "run_evaluation_result_metrics" + ] } } } diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_card_pb.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_card_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_card_pb.rb rename to google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_card_pb.rb diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb index 6211cddc91a0..1577f20427a2 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n#google/cloud/ces/v1beta/agent.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/ces/v1beta/agent_transfers.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd0\x0f\n\x05\x41gent\x12\x41\n\tllm_agent\x18\x1a \x01(\x0b\x32\'.google.cloud.ces.v1beta.Agent.LlmAgentB\x03\xe0\x41\x01H\x00\x12\\\n\x17remote_dialogflow_agent\x18\x1b \x01(\x0b\x32\x34.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgentB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0emodel_settings\x18\x04 \x01(\x0b\x32&.google.cloud.ces.v1beta.ModelSettingsB\x03\xe0\x41\x01\x12\x18\n\x0binstruction\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12.\n\x05tools\x18\x07 \x03(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x36\n\x0c\x63hild_agents\x18\x08 \x03(\tB \xe0\x41\x01\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x46\n\x16\x62\x65\x66ore_agent_callbacks\x18\x12 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x61\x66ter_agent_callbacks\x18\x13 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x46\n\x16\x62\x65\x66ore_model_callbacks\x18\x14 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x61\x66ter_model_callbacks\x18\x15 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x62\x65\x66ore_tool_callbacks\x18\x16 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x44\n\x14\x61\x66ter_tool_callbacks\x18\x17 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\nguardrails\x18\x11 \x03(\tB$\xe0\x41\x01\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12\x0c\n\x04\x65tag\x18\x18 \x01(\t\x12\x42\n\x08toolsets\x18\x1c \x03(\x0b\x32+.google.cloud.ces.v1beta.Agent.AgentToolsetB\x03\xe0\x41\x01\x12\x1e\n\x11generated_summary\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x0etransfer_rules\x18\x1e \x03(\x0b\x32%.google.cloud.ces.v1beta.TransferRuleB\x03\xe0\x41\x01\x1a\n\n\x08LlmAgent\x1a\xa8\x04\n\x15RemoteDialogflowAgent\x12@\n\x05\x61gent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)dialogflow.googleapis.com/DialogflowAgent\x12\x14\n\x07\x66low_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65nvironment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12s\n\x16input_variable_mapping\x18\x04 \x03(\x0b\x32N.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgent.InputVariableMappingEntryB\x03\xe0\x41\x01\x12u\n\x17output_variable_mapping\x18\x05 \x03(\x0b\x32O.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgent.OutputVariableMappingEntryB\x03\xe0\x41\x01\x12\x33\n&respect_response_interruption_settings\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a;\n\x19InputVariableMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a<\n\x1aOutputVariableMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aZ\n\x0c\x41gentToolset\x12\x33\n\x07toolset\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x15\n\x08tool_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01:o\xea\x41l\n\x18\x63\x65s.googleapis.com/Agent\x12\x41projects/{project}/locations/{location}/apps/{app}/agents/{agent}*\x06\x61gents2\x05\x61gentB\x0c\n\nagent_typeB\xc0\x01\n\x1b\x63om.google.cloud.ces.v1betaB\nAgentProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41\x63\n)dialogflow.googleapis.com/DialogflowAgent\x12\x36projects/{project}/locations/{location}/agents/{agent}b\x06proto3" +descriptor_data = "\n#google/cloud/ces/v1beta/agent.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/ces/v1beta/agent_transfers.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\x10\n\x05\x41gent\x12\x41\n\tllm_agent\x18\x1a \x01(\x0b\x32\'.google.cloud.ces.v1beta.Agent.LlmAgentB\x03\xe0\x41\x01H\x00\x12\\\n\x17remote_dialogflow_agent\x18\x1b \x01(\x0b\x32\x34.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgentB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0emodel_settings\x18\x04 \x01(\x0b\x32&.google.cloud.ces.v1beta.ModelSettingsB\x03\xe0\x41\x01\x12\x18\n\x0binstruction\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12.\n\x05tools\x18\x07 \x03(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x36\n\x0c\x63hild_agents\x18\x08 \x03(\tB \xe0\x41\x01\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x46\n\x16\x62\x65\x66ore_agent_callbacks\x18\x12 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x61\x66ter_agent_callbacks\x18\x13 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x46\n\x16\x62\x65\x66ore_model_callbacks\x18\x14 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x61\x66ter_model_callbacks\x18\x15 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x62\x65\x66ore_tool_callbacks\x18\x16 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x44\n\x14\x61\x66ter_tool_callbacks\x18\x17 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\nguardrails\x18\x11 \x03(\tB$\xe0\x41\x01\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12\x0c\n\x04\x65tag\x18\x18 \x01(\t\x12\x42\n\x08toolsets\x18\x1c \x03(\x0b\x32+.google.cloud.ces.v1beta.Agent.AgentToolsetB\x03\xe0\x41\x01\x12\x1e\n\x11generated_summary\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x0etransfer_rules\x18\x1e \x03(\x0b\x32%.google.cloud.ces.v1beta.TransferRuleB\x03\xe0\x41\x01\x12\x1e\n\x11validation_errors\x18 \x03(\tB\x03\xe0\x41\x03\x1a\n\n\x08LlmAgent\x1a\xcd\x04\n\x15RemoteDialogflowAgent\x12@\n\x05\x61gent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)dialogflow.googleapis.com/DialogflowAgent\x12\x14\n\x07\x66low_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65nvironment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12s\n\x16input_variable_mapping\x18\x04 \x03(\x0b\x32N.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgent.InputVariableMappingEntryB\x03\xe0\x41\x01\x12u\n\x17output_variable_mapping\x18\x05 \x03(\x0b\x32O.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgent.OutputVariableMappingEntryB\x03\xe0\x41\x01\x12\x33\n&respect_response_interruption_settings\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16language_code_variable\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19InputVariableMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a<\n\x1aOutputVariableMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aZ\n\x0c\x41gentToolset\x12\x33\n\x07toolset\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x15\n\x08tool_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01:o\xea\x41l\n\x18\x63\x65s.googleapis.com/Agent\x12\x41projects/{project}/locations/{location}/apps/{app}/agents/{agent}*\x06\x61gents2\x05\x61gentB\x0c\n\nagent_typeB\xc0\x01\n\x1b\x63om.google.cloud.ces.v1betaB\nAgentProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41\x63\n)dialogflow.googleapis.com/DialogflowAgent\x12\x36projects/{project}/locations/{location}/agents/{agent}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb index 4b95054eb343..3e47dd6aa565 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb @@ -4764,7 +4764,7 @@ def restore_app_version request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload generate_app_resource(agent: nil, tool: nil, toolset: nil, parent: nil, refine_instructions: nil, tool_generation_config: nil, app_generation_config: nil, evaluation_generation_config: nil, evaluation_personas_generation_config: nil, quality_report_generation_config: nil, hill_climbing_fix_config: nil) + # @overload generate_app_resource(agent: nil, tool: nil, toolset: nil, app_version_context: nil, parent: nil, refine_instructions: nil, tool_generation_config: nil, app_generation_config: nil, evaluation_generation_config: nil, evaluation_personas_generation_config: nil, quality_report_generation_config: nil, hill_climbing_fix_config: nil) # Pass arguments to `generate_app_resource` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -4773,17 +4773,21 @@ def restore_app_version request, options = nil # The agent resource to be used by the LLM assistant, can be empty for # generating a new agent. # - # Note: The following parameters are mutually exclusive: `agent`, `tool`, `toolset`. 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. + # Note: The following parameters are mutually exclusive: `agent`, `tool`, `toolset`, `app_version_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 tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] # The tool resource to be used by the LLM assistant, can be empty for # generating a new tool. # - # Note: The following parameters are mutually exclusive: `tool`, `agent`, `toolset`. 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. + # Note: The following parameters are mutually exclusive: `tool`, `agent`, `toolset`, `app_version_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 toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] # The toolset resource to be used by the LLM assistant, can be empty for # generating a new toolset. # - # Note: The following parameters are mutually exclusive: `toolset`, `agent`, `tool`. 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. + # Note: The following parameters are mutually exclusive: `toolset`, `agent`, `tool`, `app_version_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 app_version_context [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppVersionContext, ::Hash] + # The app version context specifying the base snapshot and target agent. + # + # Note: The following parameters are mutually exclusive: `app_version_context`, `agent`, `tool`, `toolset`. 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 parent [::String] # Required. The resource name of the app to generate the resource for. # @param refine_instructions [::Array<::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::RefineInstructions, ::Hash>] diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb index 4c6b392cc263..34a69c01ab45 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb @@ -4422,7 +4422,7 @@ def restore_app_version request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload generate_app_resource(agent: nil, tool: nil, toolset: nil, parent: nil, refine_instructions: nil, tool_generation_config: nil, app_generation_config: nil, evaluation_generation_config: nil, evaluation_personas_generation_config: nil, quality_report_generation_config: nil, hill_climbing_fix_config: nil) + # @overload generate_app_resource(agent: nil, tool: nil, toolset: nil, app_version_context: nil, parent: nil, refine_instructions: nil, tool_generation_config: nil, app_generation_config: nil, evaluation_generation_config: nil, evaluation_personas_generation_config: nil, quality_report_generation_config: nil, hill_climbing_fix_config: nil) # Pass arguments to `generate_app_resource` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -4431,17 +4431,21 @@ def restore_app_version request, options = nil # The agent resource to be used by the LLM assistant, can be empty for # generating a new agent. # - # Note: The following parameters are mutually exclusive: `agent`, `tool`, `toolset`. 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. + # Note: The following parameters are mutually exclusive: `agent`, `tool`, `toolset`, `app_version_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 tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] # The tool resource to be used by the LLM assistant, can be empty for # generating a new tool. # - # Note: The following parameters are mutually exclusive: `tool`, `agent`, `toolset`. 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. + # Note: The following parameters are mutually exclusive: `tool`, `agent`, `toolset`, `app_version_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 toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] # The toolset resource to be used by the LLM assistant, can be empty for # generating a new toolset. # - # Note: The following parameters are mutually exclusive: `toolset`, `agent`, `tool`. 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. + # Note: The following parameters are mutually exclusive: `toolset`, `agent`, `tool`, `app_version_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 app_version_context [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppVersionContext, ::Hash] + # The app version context specifying the base snapshot and target agent. + # + # Note: The following parameters are mutually exclusive: `app_version_context`, `agent`, `tool`, `toolset`. 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 parent [::String] # Required. The resource name of the app to generate the resource for. # @param refine_instructions [::Array<::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::RefineInstructions, ::Hash>] diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb index bff16ac8ef5c..ac4a09622c00 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb @@ -28,7 +28,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n+google/cloud/ces/v1beta/agent_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/ces/v1beta/agent.proto\x1a!google/cloud/ces/v1beta/app.proto\x1a)google/cloud/ces/v1beta/app_version.proto\x1a\'google/cloud/ces/v1beta/changelog.proto\x1a*google/cloud/ces/v1beta/conversation.proto\x1a(google/cloud/ces/v1beta/deployment.proto\x1a(google/cloud/ces/v1beta/evaluation.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a*google/cloud/ces/v1beta/file_context.proto\x1a\'google/cloud/ces/v1beta/guardrail.proto\x1a/google/cloud/ces/v1beta/security_settings.proto\x1a\"google/cloud/ces/v1beta/tool.proto\x1a%google/cloud/ces/v1beta/toolset.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9e\x01\n\x0fListAppsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16\x63\x65s.googleapis.com/App\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\"q\n\x10ListAppsResponse\x12*\n\x04\x61pps\x18\x01 \x03(\x0b\x32\x1c.google.cloud.ces.v1beta.App\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"=\n\rGetAppRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\"\x87\x01\n\x10\x43reateAppRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16\x63\x65s.googleapis.com/App\x12\x13\n\x06\x61pp_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12.\n\x03\x61pp\x18\x03 \x01(\x0b\x32\x1c.google.cloud.ces.v1beta.AppB\x03\xe0\x41\x02\"x\n\x10UpdateAppRequest\x12.\n\x03\x61pp\x18\x01 \x01(\x0b\x32\x1c.google.cloud.ces.v1beta.AppB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"S\n\x10\x44\x65leteAppRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa9\x02\n\x10\x45xportAppRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12R\n\rexport_format\x18\x02 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.ExportAppRequest.ExportFormatB\x03\xe0\x41\x02\x12\x14\n\x07gcs_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12:\n\x0b\x61pp_version\x18\x04 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"A\n\x0c\x45xportFormat\x12\x1d\n\x19\x45XPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x08\n\x04YAML\x10\x02\"D\n\x11\x45xportAppResponse\x12\x15\n\x0b\x61pp_content\x18\x01 \x01(\x0cH\x00\x12\x11\n\x07\x61pp_uri\x18\x02 \x01(\tH\x00\x42\x05\n\x03\x61pp\"\x90\x04\n\x10ImportAppRequest\x12\x11\n\x07gcs_uri\x18\x04 \x01(\tH\x00\x12\x15\n\x0b\x61pp_content\x18\x05 \x01(\x0cH\x00\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16\x63\x65s.googleapis.com/App\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x61pp_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12T\n\x0eimport_options\x18\x06 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.ImportAppRequest.ImportOptionsB\x03\xe0\x41\x01\x12\x1c\n\x0fignore_app_lock\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xf6\x01\n\rImportOptions\x12}\n\x1c\x63onflict_resolution_strategy\x18\x01 \x01(\x0e\x32R.google.cloud.ces.v1beta.ImportAppRequest.ImportOptions.ConflictResolutionStrategyB\x03\xe0\x41\x01\"f\n\x1a\x43onflictResolutionStrategy\x12,\n(CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED\x10\x00\x12\x0b\n\x07REPLACE\x10\x01\x12\r\n\tOVERWRITE\x10\x02\x42\x05\n\x03\x61pp\"P\n\x11ImportAppResponse\x12)\n\x04name\x18\x01 \x01(\tB\x1b\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x10\n\x08warnings\x18\x02 \x03(\t\"\xa2\x01\n\x11ListAgentsRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x63\x65s.googleapis.com/Agent\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\"]\n\x12ListAgentsResponse\x12.\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x1e.google.cloud.ces.v1beta.Agent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"A\n\x0fGetAgentRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\"\x91\x01\n\x12\x43reateAgentRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x63\x65s.googleapis.com/Agent\x12\x15\n\x08\x61gent_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\x05\x61gent\x18\x03 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentB\x03\xe0\x41\x02\"~\n\x12UpdateAgentRequest\x12\x32\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"k\n\x12\x44\x65leteAgentRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xbe\x01\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\x1b\n\x0estatus_message\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\"\xa6\x01\n\x13ListExamplesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Example\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\"c\n\x14ListExamplesResponse\x12\x32\n\x08\x65xamples\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.Example\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x11GetExampleRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Example\"\x9b\x01\n\x14\x43reateExampleRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Example\x12\x17\n\nexample_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\x07\x65xample\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ExampleB\x03\xe0\x41\x02\"\x84\x01\n\x14UpdateExampleRequest\x12\x36\n\x07\x65xample\x18\x01 \x01(\x0b\x32 .google.cloud.ces.v1beta.ExampleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"[\n\x14\x44\x65leteExampleRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Example\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x10ListToolsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17\x63\x65s.googleapis.com/Tool\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\"Z\n\x11ListToolsResponse\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"?\n\x0eGetToolRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\"\x8c\x01\n\x11\x43reateToolRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17\x63\x65s.googleapis.com/Tool\x12\x14\n\x07tool_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x04tool\x18\x03 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolB\x03\xe0\x41\x02\"{\n\x11UpdateToolRequest\x12\x30\n\x04tool\x18\x01 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"i\n\x11\x44\x65leteToolRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x02\n\x18ListConversationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63\x65s.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\x12\x41\n\x06source\x18\x05 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x03\xe0\x41\x01\x12\x42\n\x07sources\x18\x06 \x03(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x03\xe0\x41\x01\"r\n\x19ListConversationsResponse\x12<\n\rconversations\x18\x01 \x03(\x0b\x32%.google.cloud.ces.v1beta.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x94\x01\n\x16GetConversationRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x43\n\x06source\x18\x02 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x05\x18\x01\xe0\x41\x01\"\x97\x01\n\x19\x44\x65leteConversationRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x43\n\x06source\x18\x02 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x05\x18\x01\xe0\x41\x01\"\x9a\x01\n\x1f\x42\x61tchDeleteConversationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63\x65s.googleapis.com/Conversation\x12>\n\rconversations\x18\x02 \x03(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\"|\n BatchDeleteConversationsResponse\x12\x1d\n\x15\x64\x65leted_conversations\x18\x01 \x03(\t\x12\x1c\n\x14\x66\x61iled_conversations\x18\x02 \x03(\t\x12\x1b\n\x0e\x65rror_messages\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x15ListGuardrailsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Guardrail\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\"i\n\x16ListGuardrailsResponse\x12\x36\n\nguardrails\x18\x01 \x03(\x0b\x32\".google.cloud.ces.v1beta.Guardrail\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"I\n\x13GetGuardrailRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\"\xa5\x01\n\x16\x43reateGuardrailRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Guardrail\x12\x19\n\x0cguardrail_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12:\n\tguardrail\x18\x03 \x01(\x0b\x32\".google.cloud.ces.v1beta.GuardrailB\x03\xe0\x41\x02\"\x8a\x01\n\x16UpdateGuardrailRequest\x12:\n\tguardrail\x18\x01 \x01(\x0b\x32\".google.cloud.ces.v1beta.GuardrailB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"s\n\x16\x44\x65leteGuardrailRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x16ListDeploymentsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Deployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\"l\n\x17ListDeploymentsResponse\x12\x38\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x14GetDeploymentRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\"\xaa\x01\n\x17\x43reateDeploymentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Deployment\x12\x1a\n\rdeployment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12<\n\ndeployment\x18\x02 \x01(\x0b\x32#.google.cloud.ces.v1beta.DeploymentB\x03\xe0\x41\x02\"\x8d\x01\n\x17UpdateDeploymentRequest\x12<\n\ndeployment\x18\x01 \x01(\x0b\x32#.google.cloud.ces.v1beta.DeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"a\n\x17\x44\x65leteDeploymentRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa6\x01\n\x13ListToolsetsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Toolset\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\"c\n\x14ListToolsetsResponse\x12\x32\n\x08toolsets\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.Toolset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x11GetToolsetRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\"\x9b\x01\n\x14\x43reateToolsetRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Toolset\x12\x17\n\ntoolset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\x07toolset\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetB\x03\xe0\x41\x02\"\x84\x01\n\x14UpdateToolsetRequest\x12\x36\n\x07toolset\x18\x01 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"o\n\x14\x44\x65leteToolsetRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n\x16ListAppVersionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/AppVersion\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\"m\n\x17ListAppVersionsResponse\x12\x39\n\x0c\x61pp_versions\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.AppVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x14GetAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"a\n\x17\x44\x65leteAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n\x17\x43reateAppVersionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/AppVersion\x12\x1b\n\x0e\x61pp_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12=\n\x0b\x61pp_version\x18\x03 \x01(\x0b\x32#.google.cloud.ces.v1beta.AppVersionB\x03\xe0\x41\x02\"O\n\x18RestoreAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"\x1b\n\x19RestoreAppVersionResponse\"\xfd\x12\n\x1aGenerateAppResourceRequest\x12/\n\x05\x61gent\x18\x02 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentH\x00\x12-\n\x04tool\x18\x04 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolH\x00\x12\x33\n\x07toolset\x18\x06 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetH\x00\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12h\n\x13refine_instructions\x18\x03 \x03(\x0b\x32\x46.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsB\x03\xe0\x41\x01\x12m\n\x16tool_generation_config\x18\x05 \x01(\x0b\x32H.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfigB\x03\xe0\x41\x01\x12k\n\x15\x61pp_generation_config\x18\x07 \x01(\x0b\x32G.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfigB\x03\xe0\x41\x01\x12y\n\x1c\x65valuation_generation_config\x18\x08 \x01(\x0b\x32N.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfigB\x03\xe0\x41\x01\x12\x8a\x01\n%evaluation_personas_generation_config\x18\t \x01(\x0b\x32V.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfigB\x03\xe0\x41\x01\x12\x80\x01\n quality_report_generation_config\x18\n \x01(\x0b\x32Q.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfigB\x03\xe0\x41\x01\x12p\n\x18hill_climbing_fix_config\x18\x0b \x01(\x0b\x32I.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfigB\x03\xe0\x41\x01\x1a\x96\x01\n\x12RefineInstructions\x12\x18\n\x0bstart_index\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x16\n\tend_index\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x33\n\nfield_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x19\n\x0cinstructions\x18\x04 \x01(\tB\x03\xe0\x41\x02\x1a\xea\x04\n\x14ToolGenerationConfig\x12\x14\n\x07\x63ontext\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12@\n\rfile_contexts\x18\x03 \x03(\x0b\x32$.google.cloud.ces.v1beta.FileContextB\x03\xe0\x41\x01\x12\x98\x01\n\"open_api_toolset_generation_config\x18\x02 \x01(\x0b\x32g.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfigB\x03\xe0\x41\x01\x1a\xde\x02\n\x1eOpenApiToolsetGenerationConfig\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\xad\x01\n\x1coperation_generation_configs\x18\x02 \x03(\x0b\x32\x81\x01.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfigB\x03\xe0\x41\x02\x1az\n\x19OperationGenerationConfig\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0crequest_json\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresponse_json\x18\x04 \x01(\tB\x03\xe0\x41\x02\x1a\xf5\x01\n\x13\x41ppGenerationConfig\x12\x14\n\x07\x63ontext\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12@\n\rfile_contexts\x18\x02 \x03(\x0b\x32$.google.cloud.ces.v1beta.FileContextB\x03\xe0\x41\x01\x12H\n\ndataset_id\x18\x03 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,contactcenterinsights.googleapis.com/Dataset\x12!\n\x14generate_evaluations\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cgcs_location\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x66\n\x1a\x45valuationGenerationConfig\x12H\n\ndataset_id\x18\x01 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,contactcenterinsights.googleapis.com/Dataset\x1a$\n\"EvaluationPersonasGenerationConfig\x1a\x61\n\x1dQualityReportGenerationConfig\x12@\n\x0e\x65valuation_run\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x1a\\\n\x15HillClimbingFixConfig\x12\x43\n\x0equality_report\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.QualityReportB\x03\xe0\x41\x02\x42\n\n\x08resource\"\xb4\x07\n\x1bGenerateAppResourceResponse\x12/\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentH\x00\x12\x33\n\x07toolset\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetH\x00\x12<\n\x0c\x61pp_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.ces.v1beta.AppSnapshotH\x00\x12K\n\x05tools\x18\x05 \x01(\x0b\x32:.google.cloud.ces.v1beta.GenerateAppResourceResponse.ToolsH\x00\x12W\n\x0b\x65valuations\x18\x06 \x01(\x0b\x32@.google.cloud.ces.v1beta.GenerateAppResourceResponse.EvaluationsH\x00\x12Z\n\rapp_resources\x18\x07 \x01(\x0b\x32\x41.google.cloud.ces.v1beta.GenerateAppResourceResponse.AppResourcesH\x00\x12@\n\x0equality_report\x18\x08 \x01(\x0b\x32&.google.cloud.ces.v1beta.QualityReportH\x00\x12\x65\n\x14generate_result_info\x18\x02 \x01(\x0b\x32G.google.cloud.ces.v1beta.GenerateAppResourceResponse.GenerateResultInfo\x1aG\n\x0b\x45valuations\x12\x38\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x1a\x35\n\x05Tools\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool\x1a\x84\x01\n\x0c\x41ppResources\x12:\n\x0c\x61pp_snapshot\x18\x01 \x01(\x0b\x32$.google.cloud.ces.v1beta.AppSnapshot\x12\x38\n\x0b\x65valuations\x18\x02 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x1a)\n\x12GenerateResultInfo\x12\x13\n\x0b\x65xplanation\x18\x01 \x01(\tB\x14\n\x12generated_resource\"\x89\x03\n\rQualityReport\x12G\n\x06issues\x18\x01 \x03(\x0b\x32\x32.google.cloud.ces.v1beta.QualityReport.AgentIssuesB\x03\xe0\x41\x01\x12\x1c\n\x0f\x65valuation_runs\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12I\n\x0egeneral_issues\x18\x03 \x03(\x0b\x32,.google.cloud.ces.v1beta.QualityReport.IssueB\x03\xe0\x41\x01\x1a`\n\x05Issue\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10occurrence_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1e\n\x11proposed_solution\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x64\n\x0b\x41gentIssues\x12\x12\n\x05\x61gent\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x06issues\x18\x02 \x03(\x0b\x32,.google.cloud.ces.v1beta.QualityReport.IssueB\x03\xe0\x41\x01\"\xeb\x04\n$GenerateAppResourceOperationMetadata\x12j\n\x0fgeneration_type\x18\x01 \x01(\x0e\x32L.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationTypeB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12/\n\x0epartial_errors\x18\x06 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\"\x91\x02\n\x0eGenerationType\x12\x1f\n\x1bGENERATION_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41GENT_RESTRUCTURE\x10\x01\x12\x10\n\x0c\x41GENT_REFINE\x10\x02\x12\x10\n\x0c\x41GENT_CREATE\x10\x03\x12\x0f\n\x0bTOOL_CREATE\x10\x04\x12\x13\n\x0fSCENARIO_CREATE\x10\x05\x12$\n SCENARIO_CREATE_FROM_TRANSCRIPTS\x10\x07\x12\x1d\n\x19\x45VALUATION_PERSONA_CREATE\x10\x06\x12\x19\n\x15QUALITY_REPORT_CREATE\x10\x08\x12\x1d\n\x19INSTRUCTION_FOLLOWING_FIX\x10\t\"\xaa\x01\n\x15ListChangelogsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Changelog\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\"i\n\x16ListChangelogsResponse\x12\x36\n\nchangelogs\x18\x01 \x03(\x0b\x32\".google.cloud.ces.v1beta.Changelog\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"I\n\x13GetChangelogRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\"W\n\x1aGetSecuritySettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/SecuritySettings\"\xa0\x01\n\x1dUpdateSecuritySettingsRequest\x12I\n\x11security_settings\x18\x01 \x01(\x0b\x32).google.cloud.ces.v1beta.SecuritySettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\xd6M\n\x0c\x41gentService\x12\x9e\x01\n\x08ListApps\x12(.google.cloud.ces.v1beta.ListAppsRequest\x1a).google.cloud.ces.v1beta.ListAppsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1beta/{parent=projects/*/locations/*}/apps\x12\x8b\x01\n\x06GetApp\x12&.google.cloud.ces.v1beta.GetAppRequest\x1a\x1c.google.cloud.ces.v1beta.App\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1beta/{name=projects/*/locations/*/apps/*}\x12\xcc\x01\n\tCreateApp\x12).google.cloud.ces.v1beta.CreateAppRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x18\n\x03\x41pp\x12\x11OperationMetadata\xda\x41\x11parent,app,app_id\xda\x41\nparent,app\x82\xd3\xe4\x93\x02\x33\",/v1beta/{parent=projects/*/locations/*}/apps:\x03\x61pp\x12\xa5\x01\n\tUpdateApp\x12).google.cloud.ces.v1beta.UpdateAppRequest\x1a\x1c.google.cloud.ces.v1beta.App\"O\xda\x41\x0f\x61pp,update_mask\x82\xd3\xe4\x93\x02\x37\x32\x30/v1beta/{app.name=projects/*/locations/*/apps/*}:\x03\x61pp\x12\xbf\x01\n\tDeleteApp\x12).google.cloud.ces.v1beta.DeleteAppRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1beta/{name=projects/*/locations/*/apps/*}\x12\xc8\x01\n\tExportApp\x12).google.cloud.ces.v1beta.ExportAppRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41&\n\x11\x45xportAppResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta/{name=projects/*/locations/*/apps/*}:exportApp:\x01*\x12\xdf\x01\n\tImportApp\x12).google.cloud.ces.v1beta.ImportAppRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41&\n\x11ImportAppResponse\x12\x11OperationMetadata\xda\x41\x1aparent,display_name,app_id\x82\xd3\xe4\x93\x02;\"6/v1beta/{parent=projects/*/locations/*}/apps:importApp:\x01*\x12\xbc\x01\n\x13GetSecuritySettings\x12\x33.google.cloud.ces.v1beta.GetSecuritySettingsRequest\x1a).google.cloud.ces.v1beta.SecuritySettings\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta/{name=projects/*/locations/*/securitySettings}\x12\x81\x02\n\x16UpdateSecuritySettings\x12\x36.google.cloud.ces.v1beta.UpdateSecuritySettingsRequest\x1a).google.cloud.ces.v1beta.SecuritySettings\"\x83\x01\xda\x41\x1dsecurity_settings,update_mask\x82\xd3\xe4\x93\x02]2H/v1beta/{security_settings.name=projects/*/locations/*/securitySettings}:\x11security_settings\x12\xad\x01\n\nListAgents\x12*.google.cloud.ces.v1beta.ListAgentsRequest\x1a+.google.cloud.ces.v1beta.ListAgentsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*/apps/*}/agents\x12\x9a\x01\n\x08GetAgent\x12(.google.cloud.ces.v1beta.GetAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/apps/*/agents/*}\x12\xc7\x01\n\x0b\x43reateAgent\x12+.google.cloud.ces.v1beta.CreateAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"k\xda\x41\x15parent,agent,agent_id\xda\x41\x0cparent,agent\x82\xd3\xe4\x93\x02>\"5/v1beta/{parent=projects/*/locations/*/apps/*}/agents:\x05\x61gent\x12\xba\x01\n\x0bUpdateAgent\x12+.google.cloud.ces.v1beta.UpdateAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"^\xda\x41\x11\x61gent,update_mask\x82\xd3\xe4\x93\x02\x44\x32;/v1beta/{agent.name=projects/*/locations/*/apps/*/agents/*}:\x05\x61gent\x12\x98\x01\n\x0b\x44\x65leteAgent\x12+.google.cloud.ces.v1beta.DeleteAgentRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta/{name=projects/*/locations/*/apps/*/agents/*}\x12\xb5\x01\n\x0cListExamples\x12,.google.cloud.ces.v1beta.ListExamplesRequest\x1a-.google.cloud.ces.v1beta.ListExamplesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1beta/{parent=projects/*/locations/*/apps/*}/examples\x12\xa2\x01\n\nGetExample\x12*.google.cloud.ces.v1beta.GetExampleRequest\x1a .google.cloud.ces.v1beta.Example\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1beta/{name=projects/*/locations/*/apps/*/examples/*}\x12\xd7\x01\n\rCreateExample\x12-.google.cloud.ces.v1beta.CreateExampleRequest\x1a .google.cloud.ces.v1beta.Example\"u\xda\x41\x19parent,example,example_id\xda\x41\x0eparent,example\x82\xd3\xe4\x93\x02\x42\"7/v1beta/{parent=projects/*/locations/*/apps/*}/examples:\x07\x65xample\x12\xc8\x01\n\rUpdateExample\x12-.google.cloud.ces.v1beta.UpdateExampleRequest\x1a .google.cloud.ces.v1beta.Example\"f\xda\x41\x13\x65xample,update_mask\x82\xd3\xe4\x93\x02J2?/v1beta/{example.name=projects/*/locations/*/apps/*/examples/*}:\x07\x65xample\x12\x9e\x01\n\rDeleteExample\x12-.google.cloud.ces.v1beta.DeleteExampleRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1beta/{name=projects/*/locations/*/apps/*/examples/*}\x12\xa9\x01\n\tListTools\x12).google.cloud.ces.v1beta.ListToolsRequest\x1a*.google.cloud.ces.v1beta.ListToolsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1beta/{parent=projects/*/locations/*/apps/*}/tools\x12\x96\x01\n\x07GetTool\x12\'.google.cloud.ces.v1beta.GetToolRequest\x1a\x1d.google.cloud.ces.v1beta.Tool\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1beta/{name=projects/*/locations/*/apps/*/tools/*}\x12\xc9\x01\n\x11ListConversations\x12\x31.google.cloud.ces.v1beta.ListConversationsRequest\x1a\x32.google.cloud.ces.v1beta.ListConversationsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12*\n\rconversations\x18\x02 \x03(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\"|\n BatchDeleteConversationsResponse\x12\x1d\n\x15\x64\x65leted_conversations\x18\x01 \x03(\t\x12\x1c\n\x14\x66\x61iled_conversations\x18\x02 \x03(\t\x12\x1b\n\x0e\x65rror_messages\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x15ListGuardrailsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Guardrail\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\"i\n\x16ListGuardrailsResponse\x12\x36\n\nguardrails\x18\x01 \x03(\x0b\x32\".google.cloud.ces.v1beta.Guardrail\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"I\n\x13GetGuardrailRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\"\xa5\x01\n\x16\x43reateGuardrailRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Guardrail\x12\x19\n\x0cguardrail_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12:\n\tguardrail\x18\x03 \x01(\x0b\x32\".google.cloud.ces.v1beta.GuardrailB\x03\xe0\x41\x02\"\x8a\x01\n\x16UpdateGuardrailRequest\x12:\n\tguardrail\x18\x01 \x01(\x0b\x32\".google.cloud.ces.v1beta.GuardrailB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"s\n\x16\x44\x65leteGuardrailRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x16ListDeploymentsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Deployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\"l\n\x17ListDeploymentsResponse\x12\x38\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x14GetDeploymentRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\"\xaa\x01\n\x17\x43reateDeploymentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Deployment\x12\x1a\n\rdeployment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12<\n\ndeployment\x18\x02 \x01(\x0b\x32#.google.cloud.ces.v1beta.DeploymentB\x03\xe0\x41\x02\"\x8d\x01\n\x17UpdateDeploymentRequest\x12<\n\ndeployment\x18\x01 \x01(\x0b\x32#.google.cloud.ces.v1beta.DeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"a\n\x17\x44\x65leteDeploymentRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa6\x01\n\x13ListToolsetsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Toolset\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\"c\n\x14ListToolsetsResponse\x12\x32\n\x08toolsets\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.Toolset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x11GetToolsetRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\"\x9b\x01\n\x14\x43reateToolsetRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Toolset\x12\x17\n\ntoolset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\x07toolset\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetB\x03\xe0\x41\x02\"\x84\x01\n\x14UpdateToolsetRequest\x12\x36\n\x07toolset\x18\x01 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"o\n\x14\x44\x65leteToolsetRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n\x16ListAppVersionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/AppVersion\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\"m\n\x17ListAppVersionsResponse\x12\x39\n\x0c\x61pp_versions\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.AppVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x14GetAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"a\n\x17\x44\x65leteAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n\x17\x43reateAppVersionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/AppVersion\x12\x1b\n\x0e\x61pp_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12=\n\x0b\x61pp_version\x18\x03 \x01(\x0b\x32#.google.cloud.ces.v1beta.AppVersionB\x03\xe0\x41\x02\"O\n\x18RestoreAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"\x1b\n\x19RestoreAppVersionResponse\"\xee\x14\n\x1aGenerateAppResourceRequest\x12/\n\x05\x61gent\x18\x02 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentH\x00\x12-\n\x04tool\x18\x04 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolH\x00\x12\x33\n\x07toolset\x18\x06 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetH\x00\x12\x64\n\x13\x61pp_version_context\x18\x0c \x01(\x0b\x32\x45.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppVersionContextH\x00\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12h\n\x13refine_instructions\x18\x03 \x03(\x0b\x32\x46.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsB\x03\xe0\x41\x01\x12m\n\x16tool_generation_config\x18\x05 \x01(\x0b\x32H.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfigB\x03\xe0\x41\x01\x12k\n\x15\x61pp_generation_config\x18\x07 \x01(\x0b\x32G.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfigB\x03\xe0\x41\x01\x12y\n\x1c\x65valuation_generation_config\x18\x08 \x01(\x0b\x32N.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfigB\x03\xe0\x41\x01\x12\x8a\x01\n%evaluation_personas_generation_config\x18\t \x01(\x0b\x32V.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfigB\x03\xe0\x41\x01\x12\x80\x01\n quality_report_generation_config\x18\n \x01(\x0b\x32Q.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfigB\x03\xe0\x41\x01\x12p\n\x18hill_climbing_fix_config\x18\x0b \x01(\x0b\x32I.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfigB\x03\xe0\x41\x01\x1a\x88\x01\n\x11\x41ppVersionContext\x12\x37\n\x0b\x61pp_version\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12:\n\x13\x61gent_resource_name\x18\x02 \x01(\tB\x1d\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x1a\x96\x01\n\x12RefineInstructions\x12\x18\n\x0bstart_index\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x16\n\tend_index\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x33\n\nfield_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x19\n\x0cinstructions\x18\x04 \x01(\tB\x03\xe0\x41\x02\x1a\xea\x04\n\x14ToolGenerationConfig\x12\x14\n\x07\x63ontext\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12@\n\rfile_contexts\x18\x03 \x03(\x0b\x32$.google.cloud.ces.v1beta.FileContextB\x03\xe0\x41\x01\x12\x98\x01\n\"open_api_toolset_generation_config\x18\x02 \x01(\x0b\x32g.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfigB\x03\xe0\x41\x01\x1a\xde\x02\n\x1eOpenApiToolsetGenerationConfig\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\xad\x01\n\x1coperation_generation_configs\x18\x02 \x03(\x0b\x32\x81\x01.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfigB\x03\xe0\x41\x02\x1az\n\x19OperationGenerationConfig\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0crequest_json\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresponse_json\x18\x04 \x01(\tB\x03\xe0\x41\x02\x1a\xf5\x01\n\x13\x41ppGenerationConfig\x12\x14\n\x07\x63ontext\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12@\n\rfile_contexts\x18\x02 \x03(\x0b\x32$.google.cloud.ces.v1beta.FileContextB\x03\xe0\x41\x01\x12H\n\ndataset_id\x18\x03 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,contactcenterinsights.googleapis.com/Dataset\x12!\n\x14generate_evaluations\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cgcs_location\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x66\n\x1a\x45valuationGenerationConfig\x12H\n\ndataset_id\x18\x01 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,contactcenterinsights.googleapis.com/Dataset\x1a$\n\"EvaluationPersonasGenerationConfig\x1a\x61\n\x1dQualityReportGenerationConfig\x12@\n\x0e\x65valuation_run\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x1a\\\n\x15HillClimbingFixConfig\x12\x43\n\x0equality_report\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.QualityReportB\x03\xe0\x41\x02\x42\n\n\x08resource\"\xb4\x07\n\x1bGenerateAppResourceResponse\x12/\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentH\x00\x12\x33\n\x07toolset\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetH\x00\x12<\n\x0c\x61pp_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.ces.v1beta.AppSnapshotH\x00\x12K\n\x05tools\x18\x05 \x01(\x0b\x32:.google.cloud.ces.v1beta.GenerateAppResourceResponse.ToolsH\x00\x12W\n\x0b\x65valuations\x18\x06 \x01(\x0b\x32@.google.cloud.ces.v1beta.GenerateAppResourceResponse.EvaluationsH\x00\x12Z\n\rapp_resources\x18\x07 \x01(\x0b\x32\x41.google.cloud.ces.v1beta.GenerateAppResourceResponse.AppResourcesH\x00\x12@\n\x0equality_report\x18\x08 \x01(\x0b\x32&.google.cloud.ces.v1beta.QualityReportH\x00\x12\x65\n\x14generate_result_info\x18\x02 \x01(\x0b\x32G.google.cloud.ces.v1beta.GenerateAppResourceResponse.GenerateResultInfo\x1aG\n\x0b\x45valuations\x12\x38\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x1a\x35\n\x05Tools\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool\x1a\x84\x01\n\x0c\x41ppResources\x12:\n\x0c\x61pp_snapshot\x18\x01 \x01(\x0b\x32$.google.cloud.ces.v1beta.AppSnapshot\x12\x38\n\x0b\x65valuations\x18\x02 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x1a)\n\x12GenerateResultInfo\x12\x13\n\x0b\x65xplanation\x18\x01 \x01(\tB\x14\n\x12generated_resource\"\x89\x03\n\rQualityReport\x12G\n\x06issues\x18\x01 \x03(\x0b\x32\x32.google.cloud.ces.v1beta.QualityReport.AgentIssuesB\x03\xe0\x41\x01\x12\x1c\n\x0f\x65valuation_runs\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12I\n\x0egeneral_issues\x18\x03 \x03(\x0b\x32,.google.cloud.ces.v1beta.QualityReport.IssueB\x03\xe0\x41\x01\x1a`\n\x05Issue\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10occurrence_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1e\n\x11proposed_solution\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x64\n\x0b\x41gentIssues\x12\x12\n\x05\x61gent\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x06issues\x18\x02 \x03(\x0b\x32,.google.cloud.ces.v1beta.QualityReport.IssueB\x03\xe0\x41\x01\"\xeb\x04\n$GenerateAppResourceOperationMetadata\x12j\n\x0fgeneration_type\x18\x01 \x01(\x0e\x32L.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationTypeB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12/\n\x0epartial_errors\x18\x06 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\"\x91\x02\n\x0eGenerationType\x12\x1f\n\x1bGENERATION_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41GENT_RESTRUCTURE\x10\x01\x12\x10\n\x0c\x41GENT_REFINE\x10\x02\x12\x10\n\x0c\x41GENT_CREATE\x10\x03\x12\x0f\n\x0bTOOL_CREATE\x10\x04\x12\x13\n\x0fSCENARIO_CREATE\x10\x05\x12$\n SCENARIO_CREATE_FROM_TRANSCRIPTS\x10\x07\x12\x1d\n\x19\x45VALUATION_PERSONA_CREATE\x10\x06\x12\x19\n\x15QUALITY_REPORT_CREATE\x10\x08\x12\x1d\n\x19INSTRUCTION_FOLLOWING_FIX\x10\t\"\xaa\x01\n\x15ListChangelogsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Changelog\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\"i\n\x16ListChangelogsResponse\x12\x36\n\nchangelogs\x18\x01 \x03(\x0b\x32\".google.cloud.ces.v1beta.Changelog\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"I\n\x13GetChangelogRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\"W\n\x1aGetSecuritySettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/SecuritySettings\"\xa0\x01\n\x1dUpdateSecuritySettingsRequest\x12I\n\x11security_settings\x18\x01 \x01(\x0b\x32).google.cloud.ces.v1beta.SecuritySettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\xd6M\n\x0c\x41gentService\x12\x9e\x01\n\x08ListApps\x12(.google.cloud.ces.v1beta.ListAppsRequest\x1a).google.cloud.ces.v1beta.ListAppsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1beta/{parent=projects/*/locations/*}/apps\x12\x8b\x01\n\x06GetApp\x12&.google.cloud.ces.v1beta.GetAppRequest\x1a\x1c.google.cloud.ces.v1beta.App\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1beta/{name=projects/*/locations/*/apps/*}\x12\xcc\x01\n\tCreateApp\x12).google.cloud.ces.v1beta.CreateAppRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x18\n\x03\x41pp\x12\x11OperationMetadata\xda\x41\x11parent,app,app_id\xda\x41\nparent,app\x82\xd3\xe4\x93\x02\x33\",/v1beta/{parent=projects/*/locations/*}/apps:\x03\x61pp\x12\xa5\x01\n\tUpdateApp\x12).google.cloud.ces.v1beta.UpdateAppRequest\x1a\x1c.google.cloud.ces.v1beta.App\"O\xda\x41\x0f\x61pp,update_mask\x82\xd3\xe4\x93\x02\x37\x32\x30/v1beta/{app.name=projects/*/locations/*/apps/*}:\x03\x61pp\x12\xbf\x01\n\tDeleteApp\x12).google.cloud.ces.v1beta.DeleteAppRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1beta/{name=projects/*/locations/*/apps/*}\x12\xc8\x01\n\tExportApp\x12).google.cloud.ces.v1beta.ExportAppRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41&\n\x11\x45xportAppResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta/{name=projects/*/locations/*/apps/*}:exportApp:\x01*\x12\xdf\x01\n\tImportApp\x12).google.cloud.ces.v1beta.ImportAppRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41&\n\x11ImportAppResponse\x12\x11OperationMetadata\xda\x41\x1aparent,display_name,app_id\x82\xd3\xe4\x93\x02;\"6/v1beta/{parent=projects/*/locations/*}/apps:importApp:\x01*\x12\xbc\x01\n\x13GetSecuritySettings\x12\x33.google.cloud.ces.v1beta.GetSecuritySettingsRequest\x1a).google.cloud.ces.v1beta.SecuritySettings\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta/{name=projects/*/locations/*/securitySettings}\x12\x81\x02\n\x16UpdateSecuritySettings\x12\x36.google.cloud.ces.v1beta.UpdateSecuritySettingsRequest\x1a).google.cloud.ces.v1beta.SecuritySettings\"\x83\x01\xda\x41\x1dsecurity_settings,update_mask\x82\xd3\xe4\x93\x02]2H/v1beta/{security_settings.name=projects/*/locations/*/securitySettings}:\x11security_settings\x12\xad\x01\n\nListAgents\x12*.google.cloud.ces.v1beta.ListAgentsRequest\x1a+.google.cloud.ces.v1beta.ListAgentsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*/apps/*}/agents\x12\x9a\x01\n\x08GetAgent\x12(.google.cloud.ces.v1beta.GetAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/apps/*/agents/*}\x12\xc7\x01\n\x0b\x43reateAgent\x12+.google.cloud.ces.v1beta.CreateAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"k\xda\x41\x15parent,agent,agent_id\xda\x41\x0cparent,agent\x82\xd3\xe4\x93\x02>\"5/v1beta/{parent=projects/*/locations/*/apps/*}/agents:\x05\x61gent\x12\xba\x01\n\x0bUpdateAgent\x12+.google.cloud.ces.v1beta.UpdateAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"^\xda\x41\x11\x61gent,update_mask\x82\xd3\xe4\x93\x02\x44\x32;/v1beta/{agent.name=projects/*/locations/*/apps/*/agents/*}:\x05\x61gent\x12\x98\x01\n\x0b\x44\x65leteAgent\x12+.google.cloud.ces.v1beta.DeleteAgentRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta/{name=projects/*/locations/*/apps/*/agents/*}\x12\xb5\x01\n\x0cListExamples\x12,.google.cloud.ces.v1beta.ListExamplesRequest\x1a-.google.cloud.ces.v1beta.ListExamplesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1beta/{parent=projects/*/locations/*/apps/*}/examples\x12\xa2\x01\n\nGetExample\x12*.google.cloud.ces.v1beta.GetExampleRequest\x1a .google.cloud.ces.v1beta.Example\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1beta/{name=projects/*/locations/*/apps/*/examples/*}\x12\xd7\x01\n\rCreateExample\x12-.google.cloud.ces.v1beta.CreateExampleRequest\x1a .google.cloud.ces.v1beta.Example\"u\xda\x41\x19parent,example,example_id\xda\x41\x0eparent,example\x82\xd3\xe4\x93\x02\x42\"7/v1beta/{parent=projects/*/locations/*/apps/*}/examples:\x07\x65xample\x12\xc8\x01\n\rUpdateExample\x12-.google.cloud.ces.v1beta.UpdateExampleRequest\x1a .google.cloud.ces.v1beta.Example\"f\xda\x41\x13\x65xample,update_mask\x82\xd3\xe4\x93\x02J2?/v1beta/{example.name=projects/*/locations/*/apps/*/examples/*}:\x07\x65xample\x12\x9e\x01\n\rDeleteExample\x12-.google.cloud.ces.v1beta.DeleteExampleRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1beta/{name=projects/*/locations/*/apps/*/examples/*}\x12\xa9\x01\n\tListTools\x12).google.cloud.ces.v1beta.ListToolsRequest\x1a*.google.cloud.ces.v1beta.ListToolsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1beta/{parent=projects/*/locations/*/apps/*}/tools\x12\x96\x01\n\x07GetTool\x12\'.google.cloud.ces.v1beta.GetToolRequest\x1a\x1d.google.cloud.ces.v1beta.Tool\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1beta/{name=projects/*/locations/*/apps/*/tools/*}\x12\xc9\x01\n\x11ListConversations\x12\x31.google.cloud.ces.v1beta.ListConversationsRequest\x1a\x32.google.cloud.ces.v1beta.ListConversationsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12*\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.ces.v1beta.SynthesizeSpeechConfig:\x02\x38\x01\"\xd9\x02\n\x12\x41mbientSoundConfig\x12i\n\x16prebuilt_ambient_noise\x18\x01 \x01(\x0e\x32@.google.cloud.ces.v1beta.AmbientSoundConfig.PrebuiltAmbientNoiseB\x05\x18\x01\xe0\x41\x01H\x00\x12\x16\n\x07gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12%\n\x16prebuilt_ambient_sound\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0evolume_gain_db\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01\"r\n\x14PrebuiltAmbientNoise\x12&\n\"PREBUILT_AMBIENT_NOISE_UNSPECIFIED\x10\x00\x12\x10\n\x0cRETAIL_STORE\x10\x01\x12\x13\n\x0f\x43ONVENTION_HALL\x10\x02\x12\x0b\n\x07OUTDOOR\x10\x03\x42\x08\n\x06source\"Q\n\rBargeInConfig\x12\x1f\n\x10\x64isable_barge_in\x18\x01 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x1f\n\x12\x62\x61rge_in_awareness\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"H\n\x16SynthesizeSpeechConfig\x12\x12\n\x05voice\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rspeaking_rate\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\"<\n\x16MetricAnalysisSettings\x12\"\n\x15llm_metrics_opted_out\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"\xf3\x04\n\x0fLoggingSettings\x12G\n\x10redaction_config\x18\x01 \x01(\x0b\x32(.google.cloud.ces.v1beta.RedactionConfigB\x03\xe0\x41\x01\x12R\n\x16\x61udio_recording_config\x18\x02 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12V\n\x18\x62igquery_export_settings\x18\x03 \x01(\x0b\x32/.google.cloud.ces.v1beta.BigQueryExportSettingsB\x03\xe0\x41\x01\x12R\n\x16\x63loud_logging_settings\x18\x04 \x01(\x0b\x32-.google.cloud.ces.v1beta.CloudLoggingSettingsB\x03\xe0\x41\x01\x12`\n\x1d\x63onversation_logging_settings\x18\x05 \x01(\x0b\x32\x34.google.cloud.ces.v1beta.ConversationLoggingSettingsB\x03\xe0\x41\x01\x12]\n!evaluation_audio_recording_config\x18\x06 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12V\n\x18metric_analysis_settings\x18\x07 \x01(\x0b\x32/.google.cloud.ces.v1beta.MetricAnalysisSettingsB\x03\xe0\x41\x01\"\x9d\x06\n\x15\x45rrorHandlingSettings\x12j\n\x17\x65rror_handling_strategy\x18\x01 \x01(\x0e\x32\x44.google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategyB\x03\xe0\x41\x01\x12l\n\x18\x66\x61llback_response_config\x18\x02 \x01(\x0b\x32\x45.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfigB\x03\xe0\x41\x01\x12`\n\x12\x65nd_session_config\x18\x03 \x01(\x0b\x32?.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfigB\x03\xe0\x41\x01\x1a\x86\x02\n\x16\x46\x61llbackResponseConfig\x12\x88\x01\n\x18\x63ustom_fallback_messages\x18\x01 \x03(\x0b\x32\x61.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.CustomFallbackMessagesEntryB\x03\xe0\x41\x01\x12\"\n\x15max_fallback_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a=\n\x1b\x43ustomFallbackMessagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aK\n\x10\x45ndSessionConfig\x12\"\n\x10\x65scalate_session\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x13\n\x11_escalate_session\"r\n\x15\x45rrorHandlingStrategy\x12\'\n#ERROR_HANDLING_STRATEGY_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x15\n\x11\x46\x41LLBACK_RESPONSE\x10\x02\x12\x0f\n\x0b\x45ND_SESSION\x10\x03\"\xa8\x10\n\x1b\x45valuationMetricsThresholds\x12\x89\x01\n$golden_evaluation_metrics_thresholds\x18\x01 \x01(\x0b\x32V.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholdsB\x03\xe0\x41\x01\x12~\n\x1dhallucination_metric_behavior\x18\x03 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x05\x18\x01\xe0\x41\x01\x12\x83\x01\n$golden_hallucination_metric_behavior\x18\x05 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x12\x85\x01\n&scenario_hallucination_metric_behavior\x18\x04 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x1a\x8b\t\n!GoldenEvaluationMetricsThresholds\x12\x9d\x01\n\x1dturn_level_metrics_thresholds\x18\x01 \x01(\x0b\x32q.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholdsB\x03\xe0\x41\x01\x12\xab\x01\n$expectation_level_metrics_thresholds\x18\x02 \x01(\x0b\x32x.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholdsB\x03\xe0\x41\x01\x12n\n\x16tool_matching_settings\x18\x03 \x01(\x0b\x32I.google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettingsB\x03\xe0\x41\x01\x1a\x8a\x04\n\x1aTurnLevelMetricsThresholds\x12\x37\n%semantic_similarity_success_threshold\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12?\n-overall_tool_invocation_correctness_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\xb6\x01\n\x1bsemantic_similarity_channel\x18\x03 \x01(\x0e\x32\x8b\x01.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholds.SemanticSimilarityChannelB\x03\xe0\x41\x01\"]\n\x19SemanticSimilarityChannel\x12+\n\'SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\x42(\n&_semantic_similarity_success_thresholdB0\n._overall_tool_invocation_correctness_threshold\x1a\x9a\x01\n!ExpectationLevelMetricsThresholds\x12\x41\n/tool_invocation_parameter_correctness_threshold\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x32\n0_tool_invocation_parameter_correctness_threshold\x1a\xf7\x01\n\x14ToolMatchingSettings\x12\x86\x01\n\x18\x65xtra_tool_call_behavior\x18\x01 \x01(\x0e\x32_.google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettings.ExtraToolCallBehaviorB\x03\xe0\x41\x01\"V\n\x15\x45xtraToolCallBehavior\x12(\n$EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46\x41IL\x10\x01\x12\t\n\x05\x41LLOW\x10\x02\"g\n\x1bHallucinationMetricBehavior\x12-\n)HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\"\x94\x04\n\x12\x45valuationSettings\x12w\n\x1fscenario_conversation_initiator\x18\x01 \x01(\x0e\x32I.google.cloud.ces.v1beta.EvaluationSettings.ScenarioConversationInitiatorB\x03\xe0\x41\x01\x12H\n\x11golden_run_method\x18\x04 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x01\x12h\n%golden_evaluation_tool_call_behaviour\x18\x02 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\x12j\n\'scenario_evaluation_tool_call_behaviour\x18\x03 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\"e\n\x1dScenarioConversationInitiator\x12/\n+SCENARIO_CONVERSATION_INITIATOR_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\t\n\x05\x41GENT\x10\x02\"\x9b\x01\n\x19\x43lientCertificateSettings\x12\x1c\n\x0ftls_certificate\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12G\n\x0bprivate_key\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x17\n\npassphrase\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x1b\x43onversationLoggingSettings\x12)\n\x1c\x64isable_conversation_logging\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x38\n\x10retention_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"9\n\x14\x43loudLoggingSettings\x12!\n\x14\x65nable_cloud_logging\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"M\n\x14\x41udioRecordingConfig\x12\x17\n\ngcs_bucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fgcs_path_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xc2\x01\n\x0fRedactionConfig\x12\x1d\n\x10\x65nable_redaction\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x10inspect_template\x18\x02 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12J\n\x13\x64\x65identify_template\x18\x03 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xbb\x02\n\x11\x44\x61taStoreSettings\x12G\n\x07\x65ngines\x18\x03 \x03(\x0b\x32\x31.google.cloud.ces.v1beta.DataStoreSettings.EngineB\x03\xe0\x41\x03\x1a\xdc\x01\n\x06\x45ngine\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%discoveryengine.googleapis.com/Engine\x12I\n\x04type\x18\x02 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.DataStoreSettings.Engine.TypeB\x03\xe0\x41\x03\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x45NGINE_TYPE_SEARCH\x10\x01\x12\x14\n\x10\x45NGINE_TYPE_CHAT\x10\x02\"\xf0\x03\n\x11\x45valuationPersona\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bpersonality\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12S\n\rspeech_config\x18\x05 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.EvaluationPersona.SpeechConfigB\x03\xe0\x41\x01\x1a\xa3\x02\n\x0cSpeechConfig\x12\x1a\n\rspeaking_rate\x18\x01 \x01(\x01\x42\x03\xe0\x41\x01\x12g\n\x0b\x65nvironment\x18\x02 \x01(\x0e\x32M.google.cloud.ces.v1beta.EvaluationPersona.SpeechConfig.BackgroundEnvironmentB\x03\xe0\x41\x01\x12\x15\n\x08voice_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x15\x42\x61\x63kgroundEnvironment\x12&\n\"BACKGROUND_ENVIRONMENT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43\x41LL_CENTER\x10\x03\x12\x0b\n\x07TRAFFIC\x10\x04\x12\x0e\n\nKIDS_NOISE\x10\x05\x12\x08\n\x04\x43\x41\x46\x45\x10\x06\x42\xfc\x04\n\x1b\x63om.google.cloud.ces.v1betaB\x08\x41ppProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41\xc8\x01\n\"dlp.googleapis.com/InspectTemplate\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\xea\x41\xd7\x01\n%dlp.googleapis.com/DeidentifyTemplate\x12[organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}\x12Qprojects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}\xea\x41z\n%discoveryengine.googleapis.com/Engine\x12Qprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}b\x06proto3" +descriptor_data = "\n!google/cloud/ces/v1beta/app.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/ces/v1beta/bigquery_export.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x37google/cloud/ces/v1beta/evaluation_metrics_config.proto\x1a#google/cloud/ces/v1beta/fakes.proto\x1a(google/cloud/ces/v1beta/golden_run.proto\x1a$google/cloud/ces/v1beta/schema.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x82\x11\n\x03\x41pp\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06pinned\x18\x1f \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\nroot_agent\x18\x04 \x01(\tB \xe0\x41\x01\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12I\n\x11language_settings\x18\x12 \x01(\x0b\x32).google.cloud.ces.v1beta.LanguageSettingsB\x03\xe0\x41\x01\x12J\n\x12time_zone_settings\x18\x1b \x01(\x0b\x32).google.cloud.ces.v1beta.TimeZoneSettingsB\x03\xe0\x41\x01\x12T\n\x17\x61udio_processing_config\x18\x07 \x01(\x0b\x32..google.cloud.ces.v1beta.AudioProcessingConfigB\x03\xe0\x41\x01\x12G\n\x10logging_settings\x18\x08 \x01(\x0b\x32(.google.cloud.ces.v1beta.LoggingSettingsB\x03\xe0\x41\x01\x12T\n\x17\x65rror_handling_settings\x18\" \x01(\x0b\x32..google.cloud.ces.v1beta.ErrorHandlingSettingsB\x03\xe0\x41\x01\x12\x43\n\x0emodel_settings\x18\r \x01(\x0b\x32&.google.cloud.ces.v1beta.ModelSettingsB\x03\xe0\x41\x01\x12P\n\x13tool_execution_mode\x18 \x01(\x0e\x32..google.cloud.ces.v1beta.App.ToolExecutionModeB\x03\xe0\x41\x01\x12`\n\x1d\x65valuation_metrics_thresholds\x18\x18 \x01(\x0b\x32\x34.google.cloud.ces.v1beta.EvaluationMetricsThresholdsB\x03\xe0\x41\x01\x12T\n\x15variable_declarations\x18\x0e \x03(\x0b\x32\x30.google.cloud.ces.v1beta.App.VariableDeclarationB\x03\xe0\x41\x01\x12_\n predefined_variable_declarations\x18\x1c \x03(\x0b\x32\x30.google.cloud.ces.v1beta.App.VariableDeclarationB\x03\xe0\x41\x03\x12\x1f\n\x12global_instruction\x18\x11 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\nguardrails\x18\n \x03(\tB$\xe0\x41\x01\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12L\n\x13\x64\x61ta_store_settings\x18\x0f \x01(\x0b\x32*.google.cloud.ces.v1beta.DataStoreSettingsB\x03\xe0\x41\x01\x12M\n\x17\x64\x65\x66\x61ult_channel_profile\x18\x16 \x01(\x0b\x32\'.google.cloud.ces.v1beta.ChannelProfileB\x03\xe0\x41\x01\x12\x41\n\x08metadata\x18\x0b \x03(\x0b\x32*.google.cloud.ces.v1beta.App.MetadataEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x64\x65ployment_count\x18\x17 \x01(\x05\x42\x03\xe0\x41\x03\x12\\\n\x1b\x63lient_certificate_settings\x18\x19 \x01(\x0b\x32\x32.google.cloud.ces.v1beta.ClientCertificateSettingsB\x03\xe0\x41\x01\x12\x44\n\x0fvpc_sc_settings\x18\x1a \x01(\x0b\x32&.google.cloud.ces.v1beta.VpcScSettingsB\x03\xe0\x41\x01\x12\x13\n\x06locked\x18\x1d \x01(\x08\x42\x03\xe0\x41\x01\x12L\n\x13\x65valuation_personas\x18\x1e \x03(\x0b\x32*.google.cloud.ces.v1beta.EvaluationPersonaB\x03\xe0\x41\x01\x12M\n\x13\x65valuation_settings\x18! \x01(\x0b\x32+.google.cloud.ces.v1beta.EvaluationSettingsB\x03\xe0\x41\x01\x12\x1e\n\x11validation_errors\x18\' \x03(\tB\x03\xe0\x41\x03\x1ax\n\x13VariableDeclaration\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x06schema\x18\x03 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x03\xe0\x41\x02\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"V\n\x11ToolExecutionMode\x12#\n\x1fTOOL_EXECUTION_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08PARALLEL\x10\x01\x12\x0e\n\nSEQUENTIAL\x10\x02:Z\xea\x41W\n\x16\x63\x65s.googleapis.com/App\x12\x32projects/{project}/locations/{location}/apps/{app}*\x04\x61pps2\x03\x61pp\"*\n\x10TimeZoneSettings\x12\x16\n\ttime_zone\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\xa7\x01\n\x10LanguageSettings\x12\"\n\x15\x64\x65\x66\x61ult_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18supported_language_codes\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12(\n\x1b\x65nable_multilingual_support\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x0f\x66\x61llback_action\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01\"\xcf\x03\n\x15\x41udioProcessingConfig\x12s\n\x19synthesize_speech_configs\x18\x01 \x03(\x0b\x32K.google.cloud.ces.v1beta.AudioProcessingConfig.SynthesizeSpeechConfigsEntryB\x03\xe0\x41\x01\x12\x44\n\x0f\x62\x61rge_in_config\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.BargeInConfigB\x03\xe0\x41\x01\x12:\n\x12inactivity_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12N\n\x14\x61mbient_sound_config\x18\x05 \x01(\x0b\x32+.google.cloud.ces.v1beta.AmbientSoundConfigB\x03\xe0\x41\x01\x1ao\n\x1cSynthesizeSpeechConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.ces.v1beta.SynthesizeSpeechConfig:\x02\x38\x01\"\xd9\x02\n\x12\x41mbientSoundConfig\x12i\n\x16prebuilt_ambient_noise\x18\x01 \x01(\x0e\x32@.google.cloud.ces.v1beta.AmbientSoundConfig.PrebuiltAmbientNoiseB\x05\x18\x01\xe0\x41\x01H\x00\x12\x16\n\x07gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12%\n\x16prebuilt_ambient_sound\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0evolume_gain_db\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01\"r\n\x14PrebuiltAmbientNoise\x12&\n\"PREBUILT_AMBIENT_NOISE_UNSPECIFIED\x10\x00\x12\x10\n\x0cRETAIL_STORE\x10\x01\x12\x13\n\x0f\x43ONVENTION_HALL\x10\x02\x12\x0b\n\x07OUTDOOR\x10\x03\x42\x08\n\x06source\"Q\n\rBargeInConfig\x12\x1f\n\x10\x64isable_barge_in\x18\x01 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x1f\n\x12\x62\x61rge_in_awareness\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"H\n\x16SynthesizeSpeechConfig\x12\x12\n\x05voice\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rspeaking_rate\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\"<\n\x16MetricAnalysisSettings\x12\"\n\x15llm_metrics_opted_out\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"\xd2\x05\n\x0fLoggingSettings\x12G\n\x10redaction_config\x18\x01 \x01(\x0b\x32(.google.cloud.ces.v1beta.RedactionConfigB\x03\xe0\x41\x01\x12R\n\x16\x61udio_recording_config\x18\x02 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12]\n!unredacted_audio_recording_config\x18\x08 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12V\n\x18\x62igquery_export_settings\x18\x03 \x01(\x0b\x32/.google.cloud.ces.v1beta.BigQueryExportSettingsB\x03\xe0\x41\x01\x12R\n\x16\x63loud_logging_settings\x18\x04 \x01(\x0b\x32-.google.cloud.ces.v1beta.CloudLoggingSettingsB\x03\xe0\x41\x01\x12`\n\x1d\x63onversation_logging_settings\x18\x05 \x01(\x0b\x32\x34.google.cloud.ces.v1beta.ConversationLoggingSettingsB\x03\xe0\x41\x01\x12]\n!evaluation_audio_recording_config\x18\x06 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12V\n\x18metric_analysis_settings\x18\x07 \x01(\x0b\x32/.google.cloud.ces.v1beta.MetricAnalysisSettingsB\x03\xe0\x41\x01\"\x9d\x06\n\x15\x45rrorHandlingSettings\x12j\n\x17\x65rror_handling_strategy\x18\x01 \x01(\x0e\x32\x44.google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategyB\x03\xe0\x41\x01\x12l\n\x18\x66\x61llback_response_config\x18\x02 \x01(\x0b\x32\x45.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfigB\x03\xe0\x41\x01\x12`\n\x12\x65nd_session_config\x18\x03 \x01(\x0b\x32?.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfigB\x03\xe0\x41\x01\x1a\x86\x02\n\x16\x46\x61llbackResponseConfig\x12\x88\x01\n\x18\x63ustom_fallback_messages\x18\x01 \x03(\x0b\x32\x61.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.CustomFallbackMessagesEntryB\x03\xe0\x41\x01\x12\"\n\x15max_fallback_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a=\n\x1b\x43ustomFallbackMessagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aK\n\x10\x45ndSessionConfig\x12\"\n\x10\x65scalate_session\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x13\n\x11_escalate_session\"r\n\x15\x45rrorHandlingStrategy\x12\'\n#ERROR_HANDLING_STRATEGY_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x15\n\x11\x46\x41LLBACK_RESPONSE\x10\x02\x12\x0f\n\x0b\x45ND_SESSION\x10\x03\"\xa8\x10\n\x1b\x45valuationMetricsThresholds\x12\x89\x01\n$golden_evaluation_metrics_thresholds\x18\x01 \x01(\x0b\x32V.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholdsB\x03\xe0\x41\x01\x12~\n\x1dhallucination_metric_behavior\x18\x03 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x05\x18\x01\xe0\x41\x01\x12\x83\x01\n$golden_hallucination_metric_behavior\x18\x05 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x12\x85\x01\n&scenario_hallucination_metric_behavior\x18\x04 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x1a\x8b\t\n!GoldenEvaluationMetricsThresholds\x12\x9d\x01\n\x1dturn_level_metrics_thresholds\x18\x01 \x01(\x0b\x32q.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholdsB\x03\xe0\x41\x01\x12\xab\x01\n$expectation_level_metrics_thresholds\x18\x02 \x01(\x0b\x32x.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholdsB\x03\xe0\x41\x01\x12n\n\x16tool_matching_settings\x18\x03 \x01(\x0b\x32I.google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettingsB\x03\xe0\x41\x01\x1a\x8a\x04\n\x1aTurnLevelMetricsThresholds\x12\x37\n%semantic_similarity_success_threshold\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12?\n-overall_tool_invocation_correctness_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\xb6\x01\n\x1bsemantic_similarity_channel\x18\x03 \x01(\x0e\x32\x8b\x01.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholds.SemanticSimilarityChannelB\x03\xe0\x41\x01\"]\n\x19SemanticSimilarityChannel\x12+\n\'SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\x42(\n&_semantic_similarity_success_thresholdB0\n._overall_tool_invocation_correctness_threshold\x1a\x9a\x01\n!ExpectationLevelMetricsThresholds\x12\x41\n/tool_invocation_parameter_correctness_threshold\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x32\n0_tool_invocation_parameter_correctness_threshold\x1a\xf7\x01\n\x14ToolMatchingSettings\x12\x86\x01\n\x18\x65xtra_tool_call_behavior\x18\x01 \x01(\x0e\x32_.google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettings.ExtraToolCallBehaviorB\x03\xe0\x41\x01\"V\n\x15\x45xtraToolCallBehavior\x12(\n$EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46\x41IL\x10\x01\x12\t\n\x05\x41LLOW\x10\x02\"g\n\x1bHallucinationMetricBehavior\x12-\n)HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\"\xba\x06\n\x12\x45valuationSettings\x12w\n\x1fscenario_conversation_initiator\x18\x01 \x01(\x0e\x32I.google.cloud.ces.v1beta.EvaluationSettings.ScenarioConversationInitiatorB\x03\xe0\x41\x01\x12H\n\x11golden_run_method\x18\x04 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x01\x12h\n%golden_evaluation_tool_call_behaviour\x18\x02 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\x12j\n\'scenario_evaluation_tool_call_behaviour\x18\x03 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\x12M\n\x0emetrics_config\x18\x05 \x01(\x0b\x32\x30.google.cloud.ces.v1beta.EvaluationMetricsConfigB\x03\xe0\x41\x01\x12g\n\x17scenario_execution_mode\x18\x06 \x01(\x0e\x32\x41.google.cloud.ces.v1beta.EvaluationSettings.ScenarioExecutionModeB\x03\xe0\x41\x01\"e\n\x1dScenarioConversationInitiator\x12/\n+SCENARIO_CONVERSATION_INITIATOR_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\t\n\x05\x41GENT\x10\x02\"l\n\x15ScenarioExecutionMode\x12\'\n#SCENARIO_EXECUTION_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11QUALITY_OPTIMIZED\x10\x01\x12\x13\n\x0fSPEED_OPTIMIZED\x10\x02\"\x9b\x01\n\x19\x43lientCertificateSettings\x12\x1c\n\x0ftls_certificate\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12G\n\x0bprivate_key\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x17\n\npassphrase\x18\x03 \x01(\tB\x03\xe0\x41\x01\"-\n\rVpcScSettings\x12\x1c\n\x0f\x61llowed_origins\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x82\x01\n\x1b\x43onversationLoggingSettings\x12)\n\x1c\x64isable_conversation_logging\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x38\n\x10retention_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"9\n\x14\x43loudLoggingSettings\x12!\n\x14\x65nable_cloud_logging\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"M\n\x14\x41udioRecordingConfig\x12\x17\n\ngcs_bucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fgcs_path_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xc2\x01\n\x0fRedactionConfig\x12\x1d\n\x10\x65nable_redaction\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x10inspect_template\x18\x02 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12J\n\x13\x64\x65identify_template\x18\x03 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xbb\x02\n\x11\x44\x61taStoreSettings\x12G\n\x07\x65ngines\x18\x03 \x03(\x0b\x32\x31.google.cloud.ces.v1beta.DataStoreSettings.EngineB\x03\xe0\x41\x03\x1a\xdc\x01\n\x06\x45ngine\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%discoveryengine.googleapis.com/Engine\x12I\n\x04type\x18\x02 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.DataStoreSettings.Engine.TypeB\x03\xe0\x41\x03\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x45NGINE_TYPE_SEARCH\x10\x01\x12\x14\n\x10\x45NGINE_TYPE_CHAT\x10\x02\"\xf0\x03\n\x11\x45valuationPersona\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bpersonality\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12S\n\rspeech_config\x18\x05 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.EvaluationPersona.SpeechConfigB\x03\xe0\x41\x01\x1a\xa3\x02\n\x0cSpeechConfig\x12\x1a\n\rspeaking_rate\x18\x01 \x01(\x01\x42\x03\xe0\x41\x01\x12g\n\x0b\x65nvironment\x18\x02 \x01(\x0e\x32M.google.cloud.ces.v1beta.EvaluationPersona.SpeechConfig.BackgroundEnvironmentB\x03\xe0\x41\x01\x12\x15\n\x08voice_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x15\x42\x61\x63kgroundEnvironment\x12&\n\"BACKGROUND_ENVIRONMENT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43\x41LL_CENTER\x10\x03\x12\x0b\n\x07TRAFFIC\x10\x04\x12\x0e\n\nKIDS_NOISE\x10\x05\x12\x08\n\x04\x43\x41\x46\x45\x10\x06\x42\xfc\x04\n\x1b\x63om.google.cloud.ces.v1betaB\x08\x41ppProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41\xc8\x01\n\"dlp.googleapis.com/InspectTemplate\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\xea\x41\xd7\x01\n%dlp.googleapis.com/DeidentifyTemplate\x12[organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}\x12Qprojects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}\xea\x41z\n%discoveryengine.googleapis.com/Engine\x12Qprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -50,7 +51,9 @@ module V1beta EvaluationMetricsThresholds::HallucinationMetricBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehavior").enummodule EvaluationSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationSettings").msgclass EvaluationSettings::ScenarioConversationInitiator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationSettings.ScenarioConversationInitiator").enummodule + EvaluationSettings::ScenarioExecutionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationSettings.ScenarioExecutionMode").enummodule ClientCertificateSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ClientCertificateSettings").msgclass + VpcScSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.VpcScSettings").msgclass ConversationLoggingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ConversationLoggingSettings").msgclass CloudLoggingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.CloudLoggingSettings").msgclass AudioRecordingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AudioRecordingConfig").msgclass diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb index 9555a7352887..9baba3305e94 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n*google/cloud/ces/v1beta/conversation.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xac\n\n\x0c\x43onversation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x05turns\x18\x06 \x03(\x0b\x32*.google.cloud.ces.v1beta.Conversation.TurnB\x03\xe0\x41\x02\x12\x17\n\nturn_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x0c\x63hannel_type\x18\x08 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.Conversation.ChannelTypeB\x02\x18\x01\x12\x41\n\x06source\x18\t \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x03\xe0\x41\x03\x12I\n\x0binput_types\x18\n \x03(\x0e\x32/.google.cloud.ces.v1beta.Conversation.InputTypeB\x03\xe0\x41\x03\x12\x35\n\x0b\x65ntry_agent\x18\x0b \x01(\tB \xe0\x41\x03\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x39\n\ndeployment\x18\x0c \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\x12:\n\x0b\x61pp_version\x18\r \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x1a\n\rlanguage_code\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x36\n\x08messages\x18\x02 \x03(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x02\x18\x01\x1av\n\x04Turn\x12\x37\n\x08messages\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01\x12\x35\n\troot_span\x18\x02 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\x03\xe0\x41\x01\"P\n\x0b\x43hannelType\x12\x1c\n\x18\x43HANNEL_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\x12\x0e\n\nMULTIMODAL\x10\x03\"S\n\x06Source\x12\x16\n\x12SOURCE_UNSPECIFIED\x10\x00\x12\x08\n\x04LIVE\x10\x01\x12\r\n\tSIMULATOR\x10\x02\x12\x08\n\x04\x45VAL\x10\x03\x12\x0e\n\nAGENT_TOOL\x10\x04\"\xb5\x01\n\tInputType\x12\x1a\n\x16INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fINPUT_TYPE_TEXT\x10\x01\x12\x14\n\x10INPUT_TYPE_AUDIO\x10\x02\x12\x14\n\x10INPUT_TYPE_IMAGE\x10\x03\x12\x13\n\x0fINPUT_TYPE_BLOB\x10\x04\x12\x1c\n\x18INPUT_TYPE_TOOL_RESPONSE\x10\x05\x12\x18\n\x14INPUT_TYPE_VARIABLES\x10\x06:\x93\x01\xea\x41\x8f\x01\n\x1f\x63\x65s.googleapis.com/Conversation\x12Oprojects/{project}/locations/{location}/apps/{app}/conversations/{conversation}*\rconversations2\x0c\x63onversationBa\n\x1b\x63om.google.cloud.ces.v1betaB\x11\x43onversationProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" +descriptor_data = "\n*google/cloud/ces/v1beta/conversation.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\n\n\x0c\x43onversation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x05turns\x18\x06 \x03(\x0b\x32*.google.cloud.ces.v1beta.Conversation.TurnB\x03\xe0\x41\x02\x12\x17\n\nturn_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x0c\x63hannel_type\x18\x08 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.Conversation.ChannelTypeB\x02\x18\x01\x12\x41\n\x06source\x18\t \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x03\xe0\x41\x03\x12I\n\x0binput_types\x18\n \x03(\x0e\x32/.google.cloud.ces.v1beta.Conversation.InputTypeB\x03\xe0\x41\x03\x12\x35\n\x0b\x65ntry_agent\x18\x0b \x01(\tB \xe0\x41\x03\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x39\n\ndeployment\x18\x0c \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\x12:\n\x0b\x61pp_version\x18\r \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x1a\n\rlanguage_code\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x36\n\x08messages\x18\x02 \x03(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x02\x18\x01\x1av\n\x04Turn\x12\x37\n\x08messages\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01\x12\x35\n\troot_span\x18\x02 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\x03\xe0\x41\x01\"P\n\x0b\x43hannelType\x12\x1c\n\x18\x43HANNEL_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\x12\x0e\n\nMULTIMODAL\x10\x03\"S\n\x06Source\x12\x16\n\x12SOURCE_UNSPECIFIED\x10\x00\x12\x08\n\x04LIVE\x10\x01\x12\r\n\tSIMULATOR\x10\x02\x12\x08\n\x04\x45VAL\x10\x03\x12\x0e\n\nAGENT_TOOL\x10\x04\"\xcb\x01\n\tInputType\x12\x1a\n\x16INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fINPUT_TYPE_TEXT\x10\x01\x12\x14\n\x10INPUT_TYPE_EVENT\x10\x07\x12\x14\n\x10INPUT_TYPE_AUDIO\x10\x02\x12\x14\n\x10INPUT_TYPE_IMAGE\x10\x03\x12\x13\n\x0fINPUT_TYPE_BLOB\x10\x04\x12\x1c\n\x18INPUT_TYPE_TOOL_RESPONSE\x10\x05\x12\x18\n\x14INPUT_TYPE_VARIABLES\x10\x06:\x93\x01\xea\x41\x8f\x01\n\x1f\x63\x65s.googleapis.com/Conversation\x12Oprojects/{project}/locations/{location}/apps/{app}/conversations/{conversation}*\rconversations2\x0c\x63onversationBa\n\x1b\x63om.google.cloud.ces.v1betaB\x11\x43onversationProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb index db361b72fdf5..f9361d4e170c 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n(google/cloud/ces/v1beta/deployment.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x03\n\nDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12:\n\x0b\x61pp_version\x18\x02 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x45\n\x0f\x63hannel_profile\x18\x03 \x01(\x0b\x32\'.google.cloud.ces.v1beta.ChannelProfileB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x03:\x89\x01\xea\x41\x85\x01\n\x1d\x63\x65s.googleapis.com/Deployment\x12Kprojects/{project}/locations/{location}/apps/{app}/deployments/{deployment}*\x0b\x64\x65ployments2\ndeploymentBc\n\x1b\x63om.google.cloud.ces.v1betaB\x13\x43hannelProfileProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" +descriptor_data = "\n(google/cloud/ces/v1beta/deployment.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x04\n\x10\x45xperimentConfig\x12V\n\x0fversion_release\x18\x01 \x01(\x0b\x32\x38.google.cloud.ces.v1beta.ExperimentConfig.VersionReleaseB\x03\xe0\x41\x01\x1a\xc7\x02\n\x0eVersionRelease\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32/.google.cloud.ces.v1beta.ExperimentConfig.StateB\x03\xe0\x41\x01\x12l\n\x13traffic_allocations\x18\x02 \x03(\x0b\x32J.google.cloud.ces.v1beta.ExperimentConfig.VersionRelease.TrafficAllocationB\x03\xe0\x41\x01\x1a\x81\x01\n\x11TrafficAllocation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12traffic_percentage\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12:\n\x0b\x61pp_version\x18\x03 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"O\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0b\n\x07\x45XPIRED\x10\x04\"\x93\x04\n\nDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12:\n\x0b\x61pp_version\x18\x02 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x45\n\x0f\x63hannel_profile\x18\x03 \x01(\x0b\x32\'.google.cloud.ces.v1beta.ChannelProfileB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12I\n\x11\x65xperiment_config\x18\t \x01(\x0b\x32).google.cloud.ces.v1beta.ExperimentConfigB\x03\xe0\x41\x01:\x89\x01\xea\x41\x85\x01\n\x1d\x63\x65s.googleapis.com/Deployment\x12Kprojects/{project}/locations/{location}/apps/{app}/deployments/{deployment}*\x0b\x64\x65ployments2\ndeploymentBc\n\x1b\x63om.google.cloud.ces.v1betaB\x13\x43hannelProfileProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -19,6 +19,10 @@ module Google module Cloud module Ces module V1beta + ExperimentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig").msgclass + ExperimentConfig::VersionRelease = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig.VersionRelease").msgclass + ExperimentConfig::VersionRelease::TrafficAllocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig.VersionRelease.TrafficAllocation").msgclass + ExperimentConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig.State").enummodule Deployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Deployment").msgclass end end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb rename to google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb index b403f1b51691..f8ffef53ac55 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb @@ -8,6 +8,7 @@ require 'google/api/resource_pb' require 'google/cloud/ces/v1beta/app_pb' require 'google/cloud/ces/v1beta/common_pb' +require 'google/cloud/ces/v1beta/evaluation_metrics_config_pb' require 'google/cloud/ces/v1beta/example_pb' require 'google/cloud/ces/v1beta/fakes_pb' require 'google/cloud/ces/v1beta/golden_run_pb' @@ -19,7 +20,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n(google/cloud/ces/v1beta/evaluation.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a!google/cloud/ces/v1beta/app.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a#google/cloud/ces/v1beta/fakes.proto\x1a(google/cloud/ces/v1beta/golden_run.proto\x1a-google/cloud/ces/v1beta/session_service.proto\x1a*google/cloud/ces/v1beta/toolset_tool.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xeb\r\n\x11\x41ggregatedMetrics\x12\x63\n\x16metrics_by_app_version\x18\x03 \x03(\x0b\x32>.google.cloud.ces.v1beta.AggregatedMetrics.MetricsByAppVersionB\x03\xe0\x41\x03\x1an\n\x0bToolMetrics\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x17\n\npass_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nfail_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x1aM\n\x12TurnLatencyMetrics\x12\x37\n\x0f\x61verage_latency\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x80\x01\n\x16ToolCallLatencyMetrics\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x37\n\x0f\x61verage_latency\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a/\n\x19SemanticSimilarityMetrics\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a*\n\x14HallucinationMetrics\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a\xb1\x05\n\x13MetricsByAppVersion\x12\x1b\n\x0e\x61pp_version_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12Q\n\x0ctool_metrics\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.AggregatedMetrics.ToolMetricsB\x03\xe0\x41\x03\x12n\n\x1bsemantic_similarity_metrics\x18\x03 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.AggregatedMetrics.SemanticSimilarityMetricsB\x03\xe0\x41\x03\x12\x63\n\x15hallucination_metrics\x18\x05 \x03(\x0b\x32?.google.cloud.ces.v1beta.AggregatedMetrics.HallucinationMetricsB\x03\xe0\x41\x03\x12i\n\x19tool_call_latency_metrics\x18\x06 \x03(\x0b\x32\x41.google.cloud.ces.v1beta.AggregatedMetrics.ToolCallLatencyMetricsB\x03\xe0\x41\x03\x12`\n\x14turn_latency_metrics\x18\x07 \x03(\x0b\x32=.google.cloud.ces.v1beta.AggregatedMetrics.TurnLatencyMetricsB\x03\xe0\x41\x03\x12\x17\n\npass_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nfail_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12V\n\x0fmetrics_by_turn\x18\x04 \x03(\x0b\x32\x38.google.cloud.ces.v1beta.AggregatedMetrics.MetricsByTurnB\x03\xe0\x41\x03\x1a\x9d\x04\n\rMetricsByTurn\x12\x17\n\nturn_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12Q\n\x0ctool_metrics\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.AggregatedMetrics.ToolMetricsB\x03\xe0\x41\x03\x12n\n\x1bsemantic_similarity_metrics\x18\x03 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.AggregatedMetrics.SemanticSimilarityMetricsB\x03\xe0\x41\x03\x12\x63\n\x15hallucination_metrics\x18\x04 \x03(\x0b\x32?.google.cloud.ces.v1beta.AggregatedMetrics.HallucinationMetricsB\x03\xe0\x41\x03\x12i\n\x19tool_call_latency_metrics\x18\x05 \x03(\x0b\x32\x41.google.cloud.ces.v1beta.AggregatedMetrics.ToolCallLatencyMetricsB\x03\xe0\x41\x03\x12`\n\x14turn_latency_metrics\x18\x06 \x03(\x0b\x32=.google.cloud.ces.v1beta.AggregatedMetrics.TurnLatencyMetricsB\x03\xe0\x41\x03\"\x85\x19\n\nEvaluation\x12\x41\n\x06golden\x18\x0b \x01(\x0b\x32*.google.cloud.ces.v1beta.Evaluation.GoldenB\x03\xe0\x41\x01H\x00\x12\x45\n\x08scenario\x18\x0c \x01(\x0b\x32,.google.cloud.ces.v1beta.Evaluation.ScenarioB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12I\n\x13\x65valuation_datasets\x18\x05 \x03(\tB,\xe0\x41\x03\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x0f\x65valuation_runs\x18\x0f \x03(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x03\x12K\n\x12\x61ggregated_metrics\x18\x10 \x01(\x0b\x32*.google.cloud.ces.v1beta.AggregatedMetricsB\x03\xe0\x41\x03\x12M\n\x15last_completed_result\x18\x11 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationResultB\x03\xe0\x41\x03\x12\x14\n\x07invalid\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12H\n\x10last_ten_results\x18\x13 \x03(\x0b\x32).google.cloud.ces.v1beta.EvaluationResultB\x03\xe0\x41\x03\x1a\xc2\x03\n\x11GoldenExpectation\x12;\n\ttool_call\x18\x02 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x01H\x00\x12\x43\n\rtool_response\x18\x03 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x01H\x00\x12?\n\x0e\x61gent_response\x18\x04 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01H\x00\x12\x45\n\x0e\x61gent_transfer\x18\x05 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x01H\x00\x12\x39\n\x11updated_variables\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x00\x12H\n\x12mock_tool_response\x18\x07 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x01H\x00\x12\x11\n\x04note\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\tcondition\x1a\xea\x01\n\x04Step\x12@\n\nuser_input\x18\x01 \x01(\x0b\x32%.google.cloud.ces.v1beta.SessionInputB\x03\xe0\x41\x01H\x00\x12\x45\n\x0e\x61gent_transfer\x18\x02 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x01H\x00\x12Q\n\x0b\x65xpectation\x18\x03 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.GoldenExpectationB\x03\xe0\x41\x01H\x00\x42\x06\n\x04step\x1a\x81\x01\n\nGoldenTurn\x12<\n\x05steps\x18\x01 \x03(\x0b\x32(.google.cloud.ces.v1beta.Evaluation.StepB\x03\xe0\x41\x02\x12\x35\n\troot_span\x18\x02 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\x03\xe0\x41\x01\x1a\x9f\x01\n\x06Golden\x12\x42\n\x05turns\x18\x02 \x03(\x0b\x32..google.cloud.ces.v1beta.Evaluation.GoldenTurnB\x03\xe0\x41\x02\x12Q\n\x17\x65valuation_expectations\x18\x03 \x03(\tB0\xe0\x41\x01\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x1a\xef\x02\n\x13ScenarioExpectation\x12h\n\x10tool_expectation\x18\x01 \x01(\x0b\x32G.google.cloud.ces.v1beta.Evaluation.ScenarioExpectation.ToolExpectationB\x03\xe0\x41\x01H\x00\x12?\n\x0e\x61gent_response\x18\x02 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01H\x00\x1a\x9d\x01\n\x0fToolExpectation\x12\x42\n\x12\x65xpected_tool_call\x18\x01 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x02\x12\x46\n\x12mock_tool_response\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x02\x42\r\n\x0b\x65xpectation\x1a\xf1\x06\n\x08Scenario\x12\x11\n\x04task\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\nuser_facts\x18\x04 \x03(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.Scenario.UserFactB\x03\xe0\x41\x01\x12\x16\n\tmax_turns\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07rubrics\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12[\n\x15scenario_expectations\x18\x03 \x03(\x0b\x32\x37.google.cloud.ces.v1beta.Evaluation.ScenarioExpectationB\x03\xe0\x41\x02\x12\x38\n\x12variable_overrides\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12l\n\x18task_completion_behavior\x18\x07 \x01(\x0e\x32\x43.google.cloud.ces.v1beta.Evaluation.Scenario.TaskCompletionBehaviorB\x05\x18\x01\xe0\x41\x01\x12^\n\x12user_goal_behavior\x18\x08 \x01(\x0e\x32=.google.cloud.ces.v1beta.Evaluation.Scenario.UserGoalBehaviorB\x03\xe0\x41\x01\x12Q\n\x17\x65valuation_expectations\x18\n \x03(\tB0\xe0\x41\x01\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x1a\x31\n\x08UserFact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x16TaskCompletionBehavior\x12(\n$TASK_COMPLETION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x12\n\x0eTASK_SATISFIED\x10\x01\x12\x11\n\rTASK_REJECTED\x10\x02\"~\n\x10UserGoalBehavior\x12\"\n\x1eUSER_GOAL_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x17\n\x13USER_GOAL_SATISFIED\x10\x01\x12\x16\n\x12USER_GOAL_REJECTED\x10\x02\x12\x15\n\x11USER_GOAL_IGNORED\x10\x03:\x89\x01\xea\x41\x85\x01\n\x1d\x63\x65s.googleapis.com/Evaluation\x12Kprojects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}*\x0b\x65valuations2\nevaluationB\x08\n\x06inputs\"\xb0\x04\n\x11\x45valuationDataset\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12:\n\x0b\x65valuations\x18\x03 \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12K\n\x12\x61ggregated_metrics\x18\t \x01(\x0b\x32*.google.cloud.ces.v1beta.AggregatedMetricsB\x03\xe0\x41\x03:\xad\x01\xea\x41\xa9\x01\n$ces.googleapis.com/EvaluationDataset\x12Zprojects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluation_dataset}*\x12\x65valuationDatasets2\x11\x65valuationDataset\"\xc0\x37\n\x10\x45valuationResult\x12T\n\rgolden_result\x18\x07 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.EvaluationResult.GoldenResultB\x03\xe0\x41\x03H\x00\x12X\n\x0fscenario_result\x18\x08 \x01(\x0b\x32\x38.google.cloud.ces.v1beta.EvaluationResult.ScenarioResultB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x11\x65valuation_status\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12@\n\x0e\x65valuation_run\x18\x06 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12@\n\x07persona\x18\x11 \x01(\x0b\x32*.google.cloud.ces.v1beta.EvaluationPersonaB\x03\xe0\x41\x03\x12\x45\n\nerror_info\x18\x0f \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12(\n\x05\x65rror\x18\x0e \x01(\x0b\x32\x12.google.rpc.StatusB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cinitiated_by\x18\t \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x61pp_version\x18\n \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12%\n\x18\x61pp_version_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x37\n\tchangelog\x18\x15 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\x12>\n\x15\x63hangelog_create_time\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x0f\x65xecution_state\x18\x0b \x01(\x0e\x32\x38.google.cloud.ces.v1beta.EvaluationResult.ExecutionStateB\x03\xe0\x41\x03\x12`\n\x1d\x65valuation_metrics_thresholds\x18\x0c \x01(\x0b\x32\x34.google.cloud.ces.v1beta.EvaluationMetricsThresholdsB\x03\xe0\x41\x03\x12>\n\x06\x63onfig\x18\x12 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x03\x12H\n\x11golden_run_method\x18\x13 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x03\x1a\xa4\x07\n\x18GoldenExpectationOutcome\x12\x44\n\x12observed_tool_call\x18\x02 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x03H\x00\x12L\n\x16observed_tool_response\x18\x03 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x03H\x00\x12H\n\x17observed_agent_response\x18\x04 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x03H\x00\x12N\n\x17observed_agent_transfer\x18\x05 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x03H\x00\x12O\n\x0b\x65xpectation\x18\x01 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.GoldenExpectationB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x06 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12m\n\x1asemantic_similarity_result\x18\x07 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResultB\x05\x18\x01\xe0\x41\x03\x12|\n\x16tool_invocation_result\x18\x08 \x01(\x0b\x32W.google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcome.ToolInvocationResultB\x03\xe0\x41\x03\x1a\xc8\x01\n\x14ToolInvocationResult\x12-\n\x1bparameter_correctness_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12G\n\x07outcome\x18\x02 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x1e\n\x1c_parameter_correctness_scoreB\x08\n\x06result\x1a\xe7\x01\n\x1b\x45valuationExpectationResult\x12P\n\x16\x65valuation_expectation\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x03 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\x91\t\n\x0cGoldenResult\x12i\n\x13turn_replay_results\x18\x01 \x03(\x0b\x32G.google.cloud.ces.v1beta.EvaluationResult.GoldenResult.TurnReplayResultB\x03\xe0\x41\x03\x12r\n\x1e\x65valuation_expectation_results\x18\x02 \x03(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.EvaluationExpectationResultB\x03\xe0\x41\x03\x1a\xa1\x07\n\x10TurnReplayResult\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x64\n\x13\x65xpectation_outcome\x18\x02 \x03(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcomeB\x03\xe0\x41\x03\x12`\n\x14hallucination_result\x18\x03 \x01(\x0b\x32=.google.cloud.ces.v1beta.EvaluationResult.HallucinationResultB\x03\xe0\x41\x03\x12$\n\x15tool_invocation_score\x18\x04 \x01(\x02\x42\x05\x18\x01\xe0\x41\x03\x12/\n\x1dtool_ordered_invocation_score\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x34\n\x0cturn_latency\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12[\n\x13tool_call_latencies\x18\x07 \x03(\x0b\x32\x39.google.cloud.ces.v1beta.EvaluationResult.ToolCallLatencyB\x03\xe0\x41\x03\x12k\n\x1asemantic_similarity_result\x18\x08 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResultB\x03\xe0\x41\x03\x12r\n\x1eoverall_tool_invocation_result\x18\t \x01(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.OverallToolInvocationResultB\x03\xe0\x41\x03\x12\x45\n\nerror_info\x18\n \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12R\n\x0espan_latencies\x18\x0b \x03(\x0b\x32\x35.google.cloud.ces.v1beta.EvaluationResult.SpanLatencyB\x03\xe0\x41\x03\x42 \n\x1e_tool_ordered_invocation_score\x1ao\n\x15ScenarioRubricOutcome\x12\x13\n\x06rubric\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\x05score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x11score_explanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\x99\x04\n\x1aScenarioExpectationOutcome\x12x\n\x12observed_tool_call\x18\x02 \x01(\x0b\x32U.google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcome.ObservedToolCallB\x03\xe0\x41\x03H\x00\x12H\n\x17observed_agent_response\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x03H\x00\x12Q\n\x0b\x65xpectation\x18\x01 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.Evaluation.ScenarioExpectationB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x1a\x90\x01\n\x10ObservedToolCall\x12\x39\n\ttool_call\x18\x01 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x03\x12\x41\n\rtool_response\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x03\x42\x08\n\x06result\x1a\xdc\x08\n\x0eScenarioResult\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x11\n\x04task\x18\n \x01(\tB\x03\xe0\x41\x03\x12N\n\nuser_facts\x18\x0b \x03(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.Scenario.UserFactB\x03\xe0\x41\x03\x12g\n\x14\x65xpectation_outcomes\x18\x02 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcomeB\x03\xe0\x41\x03\x12]\n\x0frubric_outcomes\x18\x03 \x03(\x0b\x32?.google.cloud.ces.v1beta.EvaluationResult.ScenarioRubricOutcomeB\x03\xe0\x41\x03\x12`\n\x14hallucination_result\x18\x04 \x03(\x0b\x32=.google.cloud.ces.v1beta.EvaluationResult.HallucinationResultB\x03\xe0\x41\x03\x12\x65\n\x16task_completion_result\x18\x05 \x01(\x0b\x32>.google.cloud.ces.v1beta.EvaluationResult.TaskCompletionResultB\x05\x18\x01\xe0\x41\x03\x12[\n\x13tool_call_latencies\x18\x06 \x03(\x0b\x32\x39.google.cloud.ces.v1beta.EvaluationResult.ToolCallLatencyB\x03\xe0\x41\x03\x12p\n\x1duser_goal_satisfaction_result\x18\x07 \x01(\x0b\x32\x44.google.cloud.ces.v1beta.EvaluationResult.UserGoalSatisfactionResultB\x03\xe0\x41\x03\x12,\n\x1a\x61ll_expectations_satisfied\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12 \n\x0etask_completed\x18\t \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12R\n\x0espan_latencies\x18\x0c \x03(\x0b\x32\x35.google.cloud.ces.v1beta.EvaluationResult.SpanLatencyB\x03\xe0\x41\x03\x12r\n\x1e\x65valuation_expectation_results\x18\r \x03(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.EvaluationExpectationResultB\x03\xe0\x41\x03\x42\x1d\n\x1b_all_expectations_satisfiedB\x11\n\x0f_task_completed\x1a\x81\x04\n\x0bSpanLatency\x12\x17\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12<\n\x07toolset\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x03H\x00\x12\x14\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x17\n\x08\x63\x61llback\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x12M\n\x04type\x18\x01 \x01(\x0e\x32:.google.cloud.ces.v1beta.EvaluationResult.SpanLatency.TypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x11\x65xecution_latency\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\"Q\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TOOL\x10\x01\x12\x11\n\rUSER_CALLBACK\x10\x02\x12\r\n\tGUARDRAIL\x10\x03\x12\x07\n\x03LLM\x10\x04\x42\x0c\n\nidentifier\x1a\xfe\x01\n\x0fToolCallLatency\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x11\x65xecution_latency\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x66\n\x13HallucinationResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1am\n\x1aUserGoalSatisfactionResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\xb4\x01\n\x18SemanticSimilarityResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\xa4\x01\n\x1bOverallToolInvocationResult\x12\"\n\x15tool_invocation_score\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12G\n\x07outcome\x18\x02 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x42\x18\n\x16_tool_invocation_score\x1ag\n\x14TaskCompletionResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\"C\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x08\n\x04PASS\x10\x01\x12\x08\n\x04\x46\x41IL\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"X\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03:\xb7\x01\xea\x41\xb3\x01\n#ces.googleapis.com/EvaluationResult\x12gprojects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result}*\x11\x65valuationResults2\x10\x65valuationResultB\x08\n\x06result\"\xa9\x11\n\rEvaluationRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12G\n\x12\x65valuation_results\x18\x03 \x03(\tB+\xe0\x41\x03\xfa\x41%\n#ces.googleapis.com/EvaluationResult\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0cinitiated_by\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x61pp_version\x18\x06 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12%\n\x18\x61pp_version_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x37\n\tchangelog\x18\x16 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\x12>\n\x15\x63hangelog_create_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12:\n\x0b\x65valuations\x18\x07 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12H\n\x12\x65valuation_dataset\x18\x08 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12S\n\x0f\x65valuation_type\x18\t \x01(\x0e\x32\x35.google.cloud.ces.v1beta.EvaluationRun.EvaluationTypeB\x03\xe0\x41\x03\x12M\n\x05state\x18\n \x01(\x0e\x32\x39.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunStateB\x03\xe0\x41\x03\x12\x46\n\x08progress\x18\x0b \x01(\x0b\x32/.google.cloud.ces.v1beta.EvaluationRun.ProgressB\x03\xe0\x41\x03\x12>\n\x06\x63onfig\x18\x0c \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x03\x12(\n\x05\x65rror\x18\x0e \x01(\x0b\x32\x12.google.rpc.StatusB\x05\x18\x01\xe0\x41\x03\x12\x45\n\nerror_info\x18\x11 \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12i\n\x18\x65valuation_run_summaries\x18\x0f \x03(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunSummariesEntryB\x03\xe0\x41\x03\x12\x43\n\x0elatency_report\x18\x19 \x01(\x0b\x32&.google.cloud.ces.v1beta.LatencyReportB\x03\xe0\x41\x03\x12\x16\n\trun_count\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x13persona_run_configs\x18\x12 \x03(\x0b\x32).google.cloud.ces.v1beta.PersonaRunConfigB\x03\xe0\x41\x03\x12M\n\x13optimization_config\x18\x13 \x01(\x0b\x32+.google.cloud.ces.v1beta.OptimizationConfigB\x03\xe0\x41\x01\x12S\n\x18scheduled_evaluation_run\x18\x14 \x01(\tB1\xe0\x41\x03\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12H\n\x11golden_run_method\x18\x15 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x03\x1a\x92\x01\n\x08Progress\x12\x18\n\x0btotal_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65rror_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63ompleted_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cpassed_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x1a\x66\n\x14\x45valuationRunSummary\x12\x19\n\x0cpassed_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65rror_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x1az\n\x1b\x45valuationRunSummariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunSummary:\x02\x38\x01\"V\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOLDEN\x10\x01\x12\x0c\n\x08SCENARIO\x10\x02\x12\t\n\x05MIXED\x10\x03\"a\n\x12\x45valuationRunState\x12$\n EVALUATION_RUN_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03:\x99\x01\xea\x41\x95\x01\n ces.googleapis.com/EvaluationRun\x12Rprojects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}*\x0e\x65valuationRuns2\revaluationRun\"\xaa\n\n\rLatencyReport\x12R\n\x0etool_latencies\x18\x01 \x03(\x0b\x32\x32.google.cloud.ces.v1beta.LatencyReport.ToolLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12Z\n\x12\x63\x61llback_latencies\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.LatencyReport.CallbackLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12\\\n\x13guardrail_latencies\x18\x03 \x03(\x0b\x32\x37.google.cloud.ces.v1beta.LatencyReport.GuardrailLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12Y\n\x12llm_call_latencies\x18\x04 \x03(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LlmCallLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12\x1a\n\rsession_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x1a\xc8\x01\n\x0eLatencyMetrics\x12\x33\n\x0bp50_latency\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x33\n\x0bp90_latency\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x33\n\x0bp99_latency\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x17\n\ncall_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x1a\x89\x02\n\x0bToolLatency\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x03H\x00\x12\x1e\n\x11tool_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x04 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x42\x11\n\x0ftool_identifier\x1az\n\x0f\x43\x61llbackLatency\x12\x12\n\x05stage\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x02 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x1a\xc5\x01\n\x10GuardrailLatency\x12\x37\n\tguardrail\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12#\n\x16guardrail_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x03 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x1ay\n\x0eLlmCallLatency\x12\x12\n\x05model\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x02 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\"\xa4\x04\n\x15\x45valuationExpectation\x12W\n\x0cllm_criteria\x18\x03 \x01(\x0b\x32:.google.cloud.ces.v1beta.EvaluationExpectation.LlmCriteriaB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04tags\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x1a\"\n\x0bLlmCriteria\x12\x13\n\x06prompt\x18\x01 \x01(\tB\x03\xe0\x41\x02:\xc1\x01\xea\x41\xbd\x01\n(ces.googleapis.com/EvaluationExpectation\x12\x62projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}*\x16\x65valuationExpectations2\x15\x65valuationExpectationB\n\n\x08\x63riteria\"\xb4\x03\n\x10\x45valuationConfig\x12L\n\x12input_audio_config\x18\x01 \x01(\x0b\x32).google.cloud.ces.v1beta.InputAudioConfigB\x05\x18\x01\xe0\x41\x01\x12N\n\x13output_audio_config\x18\x02 \x01(\x0b\x32*.google.cloud.ces.v1beta.OutputAudioConfigB\x05\x18\x01\xe0\x41\x01\x12\\\n\x12\x65valuation_channel\x18\x03 \x01(\x0e\x32;.google.cloud.ces.v1beta.EvaluationConfig.EvaluationChannelB\x03\xe0\x41\x01\x12V\n\x13tool_call_behaviour\x18\x04 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\"L\n\x11\x45valuationChannel\x12\"\n\x1e\x45VALUATION_CHANNEL_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\"\xef\x02\n\x13\x45valuationErrorInfo\x12O\n\nerror_type\x18\x01 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.EvaluationErrorInfo.ErrorTypeB\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsession_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\tErrorType\x12\x1a\n\x16\x45RROR_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fRUNTIME_FAILURE\x10\x01\x12\"\n\x1e\x43ONVERSATION_RETRIEVAL_FAILURE\x10\x02\x12\x1e\n\x1aMETRIC_CALCULATION_FAILURE\x10\x03\x12\x1d\n\x19\x45VALUATION_UPDATE_FAILURE\x10\x04\x12\x13\n\x0fQUOTA_EXHAUSTED\x10\x05\x12\x1b\n\x17USER_SIMULATION_FAILURE\x10\x06\"\xec\x05\n\x14RunEvaluationRequest\x12+\n\x03\x61pp\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12:\n\x0b\x65valuations\x18\x02 \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12H\n\x12\x65valuation_dataset\x18\x03 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12:\n\x0b\x61pp_version\x18\x06 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12>\n\x06\x63onfig\x18\x08 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x01\x12\x1b\n\trun_count\x18\t \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12K\n\x13persona_run_configs\x18\n \x03(\x0b\x32).google.cloud.ces.v1beta.PersonaRunConfigB\x03\xe0\x41\x01\x12M\n\x13optimization_config\x18\x0b \x01(\x0b\x32+.google.cloud.ces.v1beta.OptimizationConfigB\x03\xe0\x41\x01\x12S\n\x18scheduled_evaluation_run\x18\x0c \x01(\tB1\xe0\x41\x01\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12H\n\x11golden_run_method\x18\r \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x01\x12$\n\x17generate_latency_report\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x42\x0c\n\n_run_count\"\xe9\x08\n\x16ScheduledEvaluationRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07request\x18\x03 \x01(\x0b\x32-.google.cloud.ces.v1beta.RunEvaluationRequestB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12`\n\x11scheduling_config\x18\x05 \x01(\x0b\x32@.google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfigB\x03\xe0\x41\x02\x12\x13\n\x06\x61\x63tive\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x12last_completed_run\x18\x07 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x1d\n\x10total_executions\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x46\n\x1dnext_scheduled_execution_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0e \x01(\tB\x03\xe0\x41\x03\x1a\x9d\x02\n\x10SchedulingConfig\x12\x62\n\tfrequency\x18\x01 \x01(\x0e\x32J.google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfig.FrequencyB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x19\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x05\x42\x03\xe0\x41\x01\"U\n\tFrequency\x12\x19\n\x15\x46REQUENCY_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0c\n\x08\x42IWEEKLY\x10\x04:\xc7\x01\xea\x41\xc3\x01\n)ces.googleapis.com/ScheduledEvaluationRun\x12\x65projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}*\x17scheduledEvaluationRuns2\x16scheduledEvaluationRun\"A\n\x10PersonaRunConfig\x12\x14\n\x07persona\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ntask_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"\x9b\x03\n\x12OptimizationConfig\x12!\n\x14generate_loss_report\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11\x61ssistant_session\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0ereport_summary\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12should_suggest_fix\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12S\n\x06status\x18\x04 \x01(\x0e\x32>.google.cloud.ces.v1beta.OptimizationConfig.OptimizationStatusB\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x31\n\x0bloss_report\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\"`\n\x12OptimizationStatus\x12#\n\x1fOPTIMIZATION_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42_\n\x1b\x63om.google.cloud.ces.v1betaB\x0f\x45valuationProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" +descriptor_data = "\n(google/cloud/ces/v1beta/evaluation.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a!google/cloud/ces/v1beta/app.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x37google/cloud/ces/v1beta/evaluation_metrics_config.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a#google/cloud/ces/v1beta/fakes.proto\x1a(google/cloud/ces/v1beta/golden_run.proto\x1a-google/cloud/ces/v1beta/session_service.proto\x1a*google/cloud/ces/v1beta/toolset_tool.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xeb\r\n\x11\x41ggregatedMetrics\x12\x63\n\x16metrics_by_app_version\x18\x03 \x03(\x0b\x32>.google.cloud.ces.v1beta.AggregatedMetrics.MetricsByAppVersionB\x03\xe0\x41\x03\x1an\n\x0bToolMetrics\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x17\n\npass_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nfail_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x1aM\n\x12TurnLatencyMetrics\x12\x37\n\x0f\x61verage_latency\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x80\x01\n\x16ToolCallLatencyMetrics\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x37\n\x0f\x61verage_latency\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a/\n\x19SemanticSimilarityMetrics\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a*\n\x14HallucinationMetrics\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a\xb1\x05\n\x13MetricsByAppVersion\x12\x1b\n\x0e\x61pp_version_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12Q\n\x0ctool_metrics\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.AggregatedMetrics.ToolMetricsB\x03\xe0\x41\x03\x12n\n\x1bsemantic_similarity_metrics\x18\x03 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.AggregatedMetrics.SemanticSimilarityMetricsB\x03\xe0\x41\x03\x12\x63\n\x15hallucination_metrics\x18\x05 \x03(\x0b\x32?.google.cloud.ces.v1beta.AggregatedMetrics.HallucinationMetricsB\x03\xe0\x41\x03\x12i\n\x19tool_call_latency_metrics\x18\x06 \x03(\x0b\x32\x41.google.cloud.ces.v1beta.AggregatedMetrics.ToolCallLatencyMetricsB\x03\xe0\x41\x03\x12`\n\x14turn_latency_metrics\x18\x07 \x03(\x0b\x32=.google.cloud.ces.v1beta.AggregatedMetrics.TurnLatencyMetricsB\x03\xe0\x41\x03\x12\x17\n\npass_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nfail_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12V\n\x0fmetrics_by_turn\x18\x04 \x03(\x0b\x32\x38.google.cloud.ces.v1beta.AggregatedMetrics.MetricsByTurnB\x03\xe0\x41\x03\x1a\x9d\x04\n\rMetricsByTurn\x12\x17\n\nturn_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12Q\n\x0ctool_metrics\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.AggregatedMetrics.ToolMetricsB\x03\xe0\x41\x03\x12n\n\x1bsemantic_similarity_metrics\x18\x03 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.AggregatedMetrics.SemanticSimilarityMetricsB\x03\xe0\x41\x03\x12\x63\n\x15hallucination_metrics\x18\x04 \x03(\x0b\x32?.google.cloud.ces.v1beta.AggregatedMetrics.HallucinationMetricsB\x03\xe0\x41\x03\x12i\n\x19tool_call_latency_metrics\x18\x05 \x03(\x0b\x32\x41.google.cloud.ces.v1beta.AggregatedMetrics.ToolCallLatencyMetricsB\x03\xe0\x41\x03\x12`\n\x14turn_latency_metrics\x18\x06 \x03(\x0b\x32=.google.cloud.ces.v1beta.AggregatedMetrics.TurnLatencyMetricsB\x03\xe0\x41\x03\"\xeb\"\n\nEvaluation\x12\x41\n\x06golden\x18\x0b \x01(\x0b\x32*.google.cloud.ces.v1beta.Evaluation.GoldenB\x03\xe0\x41\x01H\x00\x12\x45\n\x08scenario\x18\x0c \x01(\x0b\x32,.google.cloud.ces.v1beta.Evaluation.ScenarioB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12I\n\x13\x65valuation_datasets\x18\x05 \x03(\tB,\xe0\x41\x03\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x0f\x65valuation_runs\x18\x0f \x03(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x03\x12K\n\x12\x61ggregated_metrics\x18\x10 \x01(\x0b\x32*.google.cloud.ces.v1beta.AggregatedMetricsB\x03\xe0\x41\x03\x12M\n\x15last_completed_result\x18\x11 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationResultB\x03\xe0\x41\x03\x12\x14\n\x07invalid\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12H\n\x10last_ten_results\x18\x13 \x03(\x0b\x32).google.cloud.ces.v1beta.EvaluationResultB\x03\xe0\x41\x03\x12h\n%evaluation_metrics_threshold_override\x18\x14 \x01(\x0b\x32\x34.google.cloud.ces.v1beta.EvaluationMetricsThresholdsB\x03\xe0\x41\x01\x12\x61\n\"evaluation_metrics_config_override\x18\x15 \x01(\x0b\x32\x30.google.cloud.ces.v1beta.EvaluationMetricsConfigB\x03\xe0\x41\x01\x1a\xc1\x08\n\x11GoldenExpectation\x12;\n\ttool_call\x18\x02 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x01H\x00\x12\x43\n\rtool_response\x18\x03 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x01H\x00\x12?\n\x0e\x61gent_response\x18\x04 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01H\x00\x12\x45\n\x0e\x61gent_transfer\x18\x05 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x01H\x00\x12\x39\n\x11updated_variables\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x00\x12H\n\x12mock_tool_response\x18\x07 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x01H\x00\x12\x1c\n\rno_tool_calls\x18\r \x01(\x08\x42\x03\xe0\x41\x01H\x00\x12\x11\n\x04note\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fskip_evaluation\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\xb4\x01\n-expectation_level_metrics_thresholds_override\x18\t \x01(\x0b\x32x.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholdsB\x03\xe0\x41\x01\x12\x99\x01\n:agent_response_semantic_similarity_metrics_config_override\x18\n \x01(\x0b\x32P.google.cloud.ces.v1beta.EvaluationMetricsConfig.SemanticSimilarityMetricsConfigB\x03\xe0\x41\x01\x12\x8e\x01\n4agent_response_hallucination_metrics_config_override\x18\x0b \x01(\x0b\x32K.google.cloud.ces.v1beta.EvaluationMetricsConfig.HallucinationMetricsConfigB\x03\xe0\x41\x01\x12]\n\x0f\x63omparison_type\x18\x0c \x01(\x0e\x32?.google.cloud.ces.v1beta.EvaluationMetricsConfig.ComparisonTypeB\x03\xe0\x41\x01\x42\x0b\n\tcondition\x1a\xea\x01\n\x04Step\x12@\n\nuser_input\x18\x01 \x01(\x0b\x32%.google.cloud.ces.v1beta.SessionInputB\x03\xe0\x41\x01H\x00\x12\x45\n\x0e\x61gent_transfer\x18\x02 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x01H\x00\x12Q\n\x0b\x65xpectation\x18\x03 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.GoldenExpectationB\x03\xe0\x41\x01H\x00\x42\x06\n\x04step\x1a\xb2\x03\n\nGoldenTurn\x12<\n\x05steps\x18\x01 \x03(\x0b\x32(.google.cloud.ces.v1beta.Evaluation.StepB\x03\xe0\x41\x02\x12\x35\n\troot_span\x18\x02 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\x03\xe0\x41\x01\x12\xa6\x01\n&turn_level_metrics_thresholds_override\x18\x03 \x01(\x0b\x32q.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholdsB\x03\xe0\x41\x01\x12\x85\x01\n&hallucination_metric_behavior_override\x18\x04 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x1a\x9f\x01\n\x06Golden\x12\x42\n\x05turns\x18\x02 \x03(\x0b\x32..google.cloud.ces.v1beta.Evaluation.GoldenTurnB\x03\xe0\x41\x02\x12Q\n\x17\x65valuation_expectations\x18\x03 \x03(\tB0\xe0\x41\x01\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x1a\xef\x02\n\x13ScenarioExpectation\x12h\n\x10tool_expectation\x18\x01 \x01(\x0b\x32G.google.cloud.ces.v1beta.Evaluation.ScenarioExpectation.ToolExpectationB\x03\xe0\x41\x01H\x00\x12?\n\x0e\x61gent_response\x18\x02 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01H\x00\x1a\x9d\x01\n\x0fToolExpectation\x12\x42\n\x12\x65xpected_tool_call\x18\x01 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x02\x12\x46\n\x12mock_tool_response\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x02\x42\r\n\x0b\x65xpectation\x1a\xda\x07\n\x08Scenario\x12\x11\n\x04task\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\nuser_facts\x18\x04 \x03(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.Scenario.UserFactB\x03\xe0\x41\x01\x12\x16\n\tmax_turns\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07rubrics\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12[\n\x15scenario_expectations\x18\x03 \x03(\x0b\x32\x37.google.cloud.ces.v1beta.Evaluation.ScenarioExpectationB\x03\xe0\x41\x02\x12\x38\n\x12variable_overrides\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12l\n\x18task_completion_behavior\x18\x07 \x01(\x0e\x32\x43.google.cloud.ces.v1beta.Evaluation.Scenario.TaskCompletionBehaviorB\x05\x18\x01\xe0\x41\x01\x12^\n\x12user_goal_behavior\x18\x08 \x01(\x0e\x32=.google.cloud.ces.v1beta.Evaluation.Scenario.UserGoalBehaviorB\x03\xe0\x41\x01\x12Q\n\x17\x65valuation_expectations\x18\n \x03(\tB0\xe0\x41\x01\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12g\n\x17scenario_execution_mode\x18\x0c \x01(\x0e\x32\x41.google.cloud.ces.v1beta.EvaluationSettings.ScenarioExecutionModeB\x03\xe0\x41\x01\x1a\x31\n\x08UserFact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x16TaskCompletionBehavior\x12(\n$TASK_COMPLETION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x12\n\x0eTASK_SATISFIED\x10\x01\x12\x11\n\rTASK_REJECTED\x10\x02\"~\n\x10UserGoalBehavior\x12\"\n\x1eUSER_GOAL_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x17\n\x13USER_GOAL_SATISFIED\x10\x01\x12\x16\n\x12USER_GOAL_REJECTED\x10\x02\x12\x15\n\x11USER_GOAL_IGNORED\x10\x03:\x89\x01\xea\x41\x85\x01\n\x1d\x63\x65s.googleapis.com/Evaluation\x12Kprojects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}*\x0b\x65valuations2\nevaluationB\x08\n\x06inputs\"\xb0\x04\n\x11\x45valuationDataset\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12:\n\x0b\x65valuations\x18\x03 \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12K\n\x12\x61ggregated_metrics\x18\t \x01(\x0b\x32*.google.cloud.ces.v1beta.AggregatedMetricsB\x03\xe0\x41\x03:\xad\x01\xea\x41\xa9\x01\n$ces.googleapis.com/EvaluationDataset\x12Zprojects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluation_dataset}*\x12\x65valuationDatasets2\x11\x65valuationDataset\"\x95\x38\n\x10\x45valuationResult\x12T\n\rgolden_result\x18\x07 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.EvaluationResult.GoldenResultB\x03\xe0\x41\x03H\x00\x12X\n\x0fscenario_result\x18\x08 \x01(\x0b\x32\x38.google.cloud.ces.v1beta.EvaluationResult.ScenarioResultB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x11\x65valuation_status\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12@\n\x0e\x65valuation_run\x18\x06 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12@\n\x07persona\x18\x11 \x01(\x0b\x32*.google.cloud.ces.v1beta.EvaluationPersonaB\x03\xe0\x41\x03\x12\x45\n\nerror_info\x18\x0f \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12(\n\x05\x65rror\x18\x0e \x01(\x0b\x32\x12.google.rpc.StatusB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cinitiated_by\x18\t \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x61pp_version\x18\n \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12%\n\x18\x61pp_version_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x37\n\tchangelog\x18\x15 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\x12>\n\x15\x63hangelog_create_time\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x0f\x65xecution_state\x18\x0b \x01(\x0e\x32\x38.google.cloud.ces.v1beta.EvaluationResult.ExecutionStateB\x03\xe0\x41\x03\x12`\n\x1d\x65valuation_metrics_thresholds\x18\x0c \x01(\x0b\x32\x34.google.cloud.ces.v1beta.EvaluationMetricsThresholdsB\x03\xe0\x41\x03\x12>\n\x06\x63onfig\x18\x12 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x03\x12H\n\x11golden_run_method\x18\x13 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x03\x1a\xde\x07\n\x18GoldenExpectationOutcome\x12\x44\n\x12observed_tool_call\x18\x02 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x03H\x00\x12L\n\x16observed_tool_response\x18\x03 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x03H\x00\x12H\n\x17observed_agent_response\x18\x04 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x03H\x00\x12N\n\x17observed_agent_transfer\x18\x05 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x03H\x00\x12\x38\n\x10observed_payload\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03H\x00\x12O\n\x0b\x65xpectation\x18\x01 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.GoldenExpectationB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x06 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12m\n\x1asemantic_similarity_result\x18\x07 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResultB\x05\x18\x01\xe0\x41\x03\x12|\n\x16tool_invocation_result\x18\x08 \x01(\x0b\x32W.google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcome.ToolInvocationResultB\x03\xe0\x41\x03\x1a\xc8\x01\n\x14ToolInvocationResult\x12-\n\x1bparameter_correctness_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12G\n\x07outcome\x18\x02 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x1e\n\x1c_parameter_correctness_scoreB\x08\n\x06result\x1a\xe7\x01\n\x1b\x45valuationExpectationResult\x12P\n\x16\x65valuation_expectation\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x03 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\x91\t\n\x0cGoldenResult\x12i\n\x13turn_replay_results\x18\x01 \x03(\x0b\x32G.google.cloud.ces.v1beta.EvaluationResult.GoldenResult.TurnReplayResultB\x03\xe0\x41\x03\x12r\n\x1e\x65valuation_expectation_results\x18\x02 \x03(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.EvaluationExpectationResultB\x03\xe0\x41\x03\x1a\xa1\x07\n\x10TurnReplayResult\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x64\n\x13\x65xpectation_outcome\x18\x02 \x03(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcomeB\x03\xe0\x41\x03\x12`\n\x14hallucination_result\x18\x03 \x01(\x0b\x32=.google.cloud.ces.v1beta.EvaluationResult.HallucinationResultB\x03\xe0\x41\x03\x12$\n\x15tool_invocation_score\x18\x04 \x01(\x02\x42\x05\x18\x01\xe0\x41\x03\x12/\n\x1dtool_ordered_invocation_score\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x34\n\x0cturn_latency\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12[\n\x13tool_call_latencies\x18\x07 \x03(\x0b\x32\x39.google.cloud.ces.v1beta.EvaluationResult.ToolCallLatencyB\x03\xe0\x41\x03\x12k\n\x1asemantic_similarity_result\x18\x08 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResultB\x03\xe0\x41\x03\x12r\n\x1eoverall_tool_invocation_result\x18\t \x01(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.OverallToolInvocationResultB\x03\xe0\x41\x03\x12\x45\n\nerror_info\x18\n \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12R\n\x0espan_latencies\x18\x0b \x03(\x0b\x32\x35.google.cloud.ces.v1beta.EvaluationResult.SpanLatencyB\x03\xe0\x41\x03\x42 \n\x1e_tool_ordered_invocation_score\x1ao\n\x15ScenarioRubricOutcome\x12\x13\n\x06rubric\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\x05score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x11score_explanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\x99\x04\n\x1aScenarioExpectationOutcome\x12x\n\x12observed_tool_call\x18\x02 \x01(\x0b\x32U.google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcome.ObservedToolCallB\x03\xe0\x41\x03H\x00\x12H\n\x17observed_agent_response\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x03H\x00\x12Q\n\x0b\x65xpectation\x18\x01 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.Evaluation.ScenarioExpectationB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x1a\x90\x01\n\x10ObservedToolCall\x12\x39\n\ttool_call\x18\x01 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x03\x12\x41\n\rtool_response\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x03\x42\x08\n\x06result\x1a\xdc\x08\n\x0eScenarioResult\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x11\n\x04task\x18\n \x01(\tB\x03\xe0\x41\x03\x12N\n\nuser_facts\x18\x0b \x03(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.Scenario.UserFactB\x03\xe0\x41\x03\x12g\n\x14\x65xpectation_outcomes\x18\x02 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcomeB\x03\xe0\x41\x03\x12]\n\x0frubric_outcomes\x18\x03 \x03(\x0b\x32?.google.cloud.ces.v1beta.EvaluationResult.ScenarioRubricOutcomeB\x03\xe0\x41\x03\x12`\n\x14hallucination_result\x18\x04 \x03(\x0b\x32=.google.cloud.ces.v1beta.EvaluationResult.HallucinationResultB\x03\xe0\x41\x03\x12\x65\n\x16task_completion_result\x18\x05 \x01(\x0b\x32>.google.cloud.ces.v1beta.EvaluationResult.TaskCompletionResultB\x05\x18\x01\xe0\x41\x03\x12[\n\x13tool_call_latencies\x18\x06 \x03(\x0b\x32\x39.google.cloud.ces.v1beta.EvaluationResult.ToolCallLatencyB\x03\xe0\x41\x03\x12p\n\x1duser_goal_satisfaction_result\x18\x07 \x01(\x0b\x32\x44.google.cloud.ces.v1beta.EvaluationResult.UserGoalSatisfactionResultB\x03\xe0\x41\x03\x12,\n\x1a\x61ll_expectations_satisfied\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12 \n\x0etask_completed\x18\t \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12R\n\x0espan_latencies\x18\x0c \x03(\x0b\x32\x35.google.cloud.ces.v1beta.EvaluationResult.SpanLatencyB\x03\xe0\x41\x03\x12r\n\x1e\x65valuation_expectation_results\x18\r \x03(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.EvaluationExpectationResultB\x03\xe0\x41\x03\x42\x1d\n\x1b_all_expectations_satisfiedB\x11\n\x0f_task_completed\x1a\x81\x04\n\x0bSpanLatency\x12\x17\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12<\n\x07toolset\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x03H\x00\x12\x14\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x17\n\x08\x63\x61llback\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x12M\n\x04type\x18\x01 \x01(\x0e\x32:.google.cloud.ces.v1beta.EvaluationResult.SpanLatency.TypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x11\x65xecution_latency\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\"Q\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TOOL\x10\x01\x12\x11\n\rUSER_CALLBACK\x10\x02\x12\r\n\tGUARDRAIL\x10\x03\x12\x07\n\x03LLM\x10\x04\x42\x0c\n\nidentifier\x1a\xfe\x01\n\x0fToolCallLatency\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x11\x65xecution_latency\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x66\n\x13HallucinationResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1am\n\x1aUserGoalSatisfactionResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\xb4\x01\n\x18SemanticSimilarityResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\xa4\x01\n\x1bOverallToolInvocationResult\x12\"\n\x15tool_invocation_score\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12G\n\x07outcome\x18\x02 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x42\x18\n\x16_tool_invocation_score\x1ag\n\x14TaskCompletionResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\"C\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x08\n\x04PASS\x10\x01\x12\x08\n\x04\x46\x41IL\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"s\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x05\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\r\n\tCANCELLED\x10\x04:\xb7\x01\xea\x41\xb3\x01\n#ces.googleapis.com/EvaluationResult\x12gprojects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result}*\x11\x65valuationResults2\x10\x65valuationResultB\x08\n\x06result\"\xfa\x11\n\rEvaluationRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12G\n\x12\x65valuation_results\x18\x03 \x03(\tB+\xe0\x41\x03\xfa\x41%\n#ces.googleapis.com/EvaluationResult\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0cinitiated_by\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x61pp_version\x18\x06 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12%\n\x18\x61pp_version_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x37\n\tchangelog\x18\x16 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\x12>\n\x15\x63hangelog_create_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12:\n\x0b\x65valuations\x18\x07 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12H\n\x12\x65valuation_dataset\x18\x08 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12S\n\x0f\x65valuation_type\x18\t \x01(\x0e\x32\x35.google.cloud.ces.v1beta.EvaluationRun.EvaluationTypeB\x03\xe0\x41\x03\x12M\n\x05state\x18\n \x01(\x0e\x32\x39.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunStateB\x03\xe0\x41\x03\x12\x46\n\x08progress\x18\x0b \x01(\x0b\x32/.google.cloud.ces.v1beta.EvaluationRun.ProgressB\x03\xe0\x41\x03\x12>\n\x06\x63onfig\x18\x0c \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x03\x12(\n\x05\x65rror\x18\x0e \x01(\x0b\x32\x12.google.rpc.StatusB\x05\x18\x01\xe0\x41\x03\x12\x45\n\nerror_info\x18\x11 \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12i\n\x18\x65valuation_run_summaries\x18\x0f \x03(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunSummariesEntryB\x03\xe0\x41\x03\x12\x43\n\x0elatency_report\x18\x19 \x01(\x0b\x32&.google.cloud.ces.v1beta.LatencyReportB\x03\xe0\x41\x03\x12\x16\n\trun_count\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x13persona_run_configs\x18\x12 \x03(\x0b\x32).google.cloud.ces.v1beta.PersonaRunConfigB\x03\xe0\x41\x03\x12M\n\x13optimization_config\x18\x13 \x01(\x0b\x32+.google.cloud.ces.v1beta.OptimizationConfigB\x03\xe0\x41\x01\x12S\n\x18scheduled_evaluation_run\x18\x14 \x01(\tB1\xe0\x41\x03\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12H\n\x11golden_run_method\x18\x15 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x03\x12\x16\n\toperation\x18\x1a \x01(\tB\x03\xe0\x41\x03\x1a\xb0\x01\n\x08Progress\x12\x18\n\x0btotal_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65rror_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63ompleted_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cpassed_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63\x61ncelled_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x1a\x66\n\x14\x45valuationRunSummary\x12\x19\n\x0cpassed_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65rror_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x1az\n\x1b\x45valuationRunSummariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunSummary:\x02\x38\x01\"V\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOLDEN\x10\x01\x12\x0c\n\x08SCENARIO\x10\x02\x12\t\n\x05MIXED\x10\x03\"|\n\x12\x45valuationRunState\x12$\n EVALUATION_RUN_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x05\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\r\n\tCANCELLED\x10\x04:\x99\x01\xea\x41\x95\x01\n ces.googleapis.com/EvaluationRun\x12Rprojects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}*\x0e\x65valuationRuns2\revaluationRun\"\xaa\n\n\rLatencyReport\x12R\n\x0etool_latencies\x18\x01 \x03(\x0b\x32\x32.google.cloud.ces.v1beta.LatencyReport.ToolLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12Z\n\x12\x63\x61llback_latencies\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.LatencyReport.CallbackLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12\\\n\x13guardrail_latencies\x18\x03 \x03(\x0b\x32\x37.google.cloud.ces.v1beta.LatencyReport.GuardrailLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12Y\n\x12llm_call_latencies\x18\x04 \x03(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LlmCallLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12\x1a\n\rsession_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x1a\xc8\x01\n\x0eLatencyMetrics\x12\x33\n\x0bp50_latency\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x33\n\x0bp90_latency\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x33\n\x0bp99_latency\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x17\n\ncall_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x1a\x89\x02\n\x0bToolLatency\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x03H\x00\x12\x1e\n\x11tool_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x04 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x42\x11\n\x0ftool_identifier\x1az\n\x0f\x43\x61llbackLatency\x12\x12\n\x05stage\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x02 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x1a\xc5\x01\n\x10GuardrailLatency\x12\x37\n\tguardrail\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12#\n\x16guardrail_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x03 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x1ay\n\x0eLlmCallLatency\x12\x12\n\x05model\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x02 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\"\xa4\x04\n\x15\x45valuationExpectation\x12W\n\x0cllm_criteria\x18\x03 \x01(\x0b\x32:.google.cloud.ces.v1beta.EvaluationExpectation.LlmCriteriaB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04tags\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x1a\"\n\x0bLlmCriteria\x12\x13\n\x06prompt\x18\x01 \x01(\tB\x03\xe0\x41\x02:\xc1\x01\xea\x41\xbd\x01\n(ces.googleapis.com/EvaluationExpectation\x12\x62projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}*\x16\x65valuationExpectations2\x15\x65valuationExpectationB\n\n\x08\x63riteria\"\xb4\x03\n\x10\x45valuationConfig\x12L\n\x12input_audio_config\x18\x01 \x01(\x0b\x32).google.cloud.ces.v1beta.InputAudioConfigB\x05\x18\x01\xe0\x41\x01\x12N\n\x13output_audio_config\x18\x02 \x01(\x0b\x32*.google.cloud.ces.v1beta.OutputAudioConfigB\x05\x18\x01\xe0\x41\x01\x12\\\n\x12\x65valuation_channel\x18\x03 \x01(\x0e\x32;.google.cloud.ces.v1beta.EvaluationConfig.EvaluationChannelB\x03\xe0\x41\x01\x12V\n\x13tool_call_behaviour\x18\x04 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\"L\n\x11\x45valuationChannel\x12\"\n\x1e\x45VALUATION_CHANNEL_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\"\x97\x03\n\x13\x45valuationErrorInfo\x12O\n\nerror_type\x18\x01 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.EvaluationErrorInfo.ErrorTypeB\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsession_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19user_facing_error_message\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\tErrorType\x12\x1a\n\x16\x45RROR_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fRUNTIME_FAILURE\x10\x01\x12\"\n\x1e\x43ONVERSATION_RETRIEVAL_FAILURE\x10\x02\x12\x1e\n\x1aMETRIC_CALCULATION_FAILURE\x10\x03\x12\x1d\n\x19\x45VALUATION_UPDATE_FAILURE\x10\x04\x12\x13\n\x0fQUOTA_EXHAUSTED\x10\x05\x12\x1b\n\x17USER_SIMULATION_FAILURE\x10\x06\"\xec\x05\n\x14RunEvaluationRequest\x12+\n\x03\x61pp\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12:\n\x0b\x65valuations\x18\x02 \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12H\n\x12\x65valuation_dataset\x18\x03 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12:\n\x0b\x61pp_version\x18\x06 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12>\n\x06\x63onfig\x18\x08 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x01\x12\x1b\n\trun_count\x18\t \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12K\n\x13persona_run_configs\x18\n \x03(\x0b\x32).google.cloud.ces.v1beta.PersonaRunConfigB\x03\xe0\x41\x01\x12M\n\x13optimization_config\x18\x0b \x01(\x0b\x32+.google.cloud.ces.v1beta.OptimizationConfigB\x03\xe0\x41\x01\x12S\n\x18scheduled_evaluation_run\x18\x0c \x01(\tB1\xe0\x41\x01\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12H\n\x11golden_run_method\x18\r \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x01\x12$\n\x17generate_latency_report\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x42\x0c\n\n_run_count\"\xe9\x08\n\x16ScheduledEvaluationRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07request\x18\x03 \x01(\x0b\x32-.google.cloud.ces.v1beta.RunEvaluationRequestB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12`\n\x11scheduling_config\x18\x05 \x01(\x0b\x32@.google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfigB\x03\xe0\x41\x02\x12\x13\n\x06\x61\x63tive\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x12last_completed_run\x18\x07 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x1d\n\x10total_executions\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x46\n\x1dnext_scheduled_execution_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0e \x01(\tB\x03\xe0\x41\x03\x1a\x9d\x02\n\x10SchedulingConfig\x12\x62\n\tfrequency\x18\x01 \x01(\x0e\x32J.google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfig.FrequencyB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x19\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x05\x42\x03\xe0\x41\x01\"U\n\tFrequency\x12\x19\n\x15\x46REQUENCY_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0c\n\x08\x42IWEEKLY\x10\x04:\xc7\x01\xea\x41\xc3\x01\n)ces.googleapis.com/ScheduledEvaluationRun\x12\x65projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}*\x17scheduledEvaluationRuns2\x16scheduledEvaluationRun\"A\n\x10PersonaRunConfig\x12\x14\n\x07persona\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ntask_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"\x9b\x03\n\x12OptimizationConfig\x12!\n\x14generate_loss_report\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11\x61ssistant_session\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0ereport_summary\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12should_suggest_fix\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12S\n\x06status\x18\x04 \x01(\x0e\x32>.google.cloud.ces.v1beta.OptimizationConfig.OptimizationStatusB\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x31\n\x0bloss_report\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\"`\n\x12OptimizationStatus\x12#\n\x1fOPTIMIZATION_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42_\n\x1b\x63om.google.cloud.ces.v1betaB\x0f\x45valuationProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb index 953c15ad3acb..e11d4a03ed5d 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb @@ -3309,6 +3309,301 @@ def export_evaluations request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Exports evaluations runs. + # + # @overload export_evaluation_runs(request, options = nil) + # Pass arguments to `export_evaluation_runs` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_evaluation_runs(parent: nil, names: nil, export_options: nil) + # Pass arguments to `export_evaluation_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to export evaluation runs from. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @param names [::Array<::String>] + # Required. The resource names of the evaluation runs to export. + # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] + # Optional. The export options for the evaluation runs. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new + # + # # Call the export_evaluation_runs method. + # result = client.export_evaluation_runs request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluation_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_evaluation_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_evaluation_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_evaluation_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :export_evaluation_runs, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports evaluations results. + # + # @overload export_evaluation_results(request, options = nil) + # Pass arguments to `export_evaluation_results` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_evaluation_results(parent: nil, names: nil, export_options: nil) + # Pass arguments to `export_evaluation_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the evaluation to export evaluation results + # from. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @param names [::Array<::String>] + # Required. The resource names of the evaluation results to export. + # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] + # Optional. The export options for the evaluation results. + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new + # + # # Call the export_evaluation_results method. + # result = client.export_evaluation_results request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluation_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_evaluation_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_evaluation_results.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_evaluation_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :export_evaluation_results, 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 + + ## + # Runs metrics on an existing evaluation result. + # + # @overload run_evaluation_result_metrics(request, options = nil) + # Pass arguments to `run_evaluation_result_metrics` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_evaluation_result_metrics(evaluation_result_id: nil) + # Pass arguments to `run_evaluation_result_metrics` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param evaluation_result_id [::String] + # Required. The evaluation result to run metrics for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}` + # + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new + # + # # Call the run_evaluation_result_metrics method. + # result = client.run_evaluation_result_metrics 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 run_evaluation_result_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_evaluation_result_metrics.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.evaluation_result_id + header_params["evaluation_result_id"] = request.evaluation_result_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_evaluation_result_metrics.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_evaluation_result_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.call_rpc :run_evaluation_result_metrics, 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 EvaluationService API. # @@ -3652,6 +3947,21 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :export_evaluations + ## + # RPC-specific configuration for `export_evaluation_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluation_runs + ## + # RPC-specific configuration for `export_evaluation_results` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluation_results + ## + # RPC-specific configuration for `run_evaluation_result_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :run_evaluation_result_metrics # @private def initialize parent_rpcs = nil @@ -3719,6 +4029,12 @@ def initialize parent_rpcs = nil @test_persona_voice = ::Gapic::Config::Method.new test_persona_voice_config export_evaluations_config = parent_rpcs.export_evaluations if parent_rpcs.respond_to? :export_evaluations @export_evaluations = ::Gapic::Config::Method.new export_evaluations_config + export_evaluation_runs_config = parent_rpcs.export_evaluation_runs if parent_rpcs.respond_to? :export_evaluation_runs + @export_evaluation_runs = ::Gapic::Config::Method.new export_evaluation_runs_config + export_evaluation_results_config = parent_rpcs.export_evaluation_results if parent_rpcs.respond_to? :export_evaluation_results + @export_evaluation_results = ::Gapic::Config::Method.new export_evaluation_results_config + run_evaluation_result_metrics_config = parent_rpcs.run_evaluation_result_metrics if parent_rpcs.respond_to? :run_evaluation_result_metrics + @run_evaluation_result_metrics = ::Gapic::Config::Method.new run_evaluation_result_metrics_config yield self if block_given? end diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb index f08f9fecb680..55a5efdb1de4 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb @@ -3079,6 +3079,280 @@ def export_evaluations request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Exports evaluations runs. + # + # @overload export_evaluation_runs(request, options = nil) + # Pass arguments to `export_evaluation_runs` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_evaluation_runs(parent: nil, names: nil, export_options: nil) + # Pass arguments to `export_evaluation_runs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the app to export evaluation runs from. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @param names [::Array<::String>] + # Required. The resource names of the evaluation runs to export. + # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] + # Optional. The export options for the evaluation runs. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new + # + # # Call the export_evaluation_runs method. + # result = client.export_evaluation_runs request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluation_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_evaluation_runs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_evaluation_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_evaluation_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.export_evaluation_runs request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports evaluations results. + # + # @overload export_evaluation_results(request, options = nil) + # Pass arguments to `export_evaluation_results` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_evaluation_results(parent: nil, names: nil, export_options: nil) + # Pass arguments to `export_evaluation_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the evaluation to export evaluation results + # from. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @param names [::Array<::String>] + # Required. The resource names of the evaluation results to export. + # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] + # Optional. The export options for the evaluation results. + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new + # + # # Call the export_evaluation_results method. + # result = client.export_evaluation_results request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_evaluation_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_evaluation_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.export_evaluation_results.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_evaluation_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.export_evaluation_results 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 + + ## + # Runs metrics on an existing evaluation result. + # + # @overload run_evaluation_result_metrics(request, options = nil) + # Pass arguments to `run_evaluation_result_metrics` via a request object, either of type + # {::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_evaluation_result_metrics(evaluation_result_id: nil) + # Pass arguments to `run_evaluation_result_metrics` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param evaluation_result_id [::String] + # Required. The evaluation result to run metrics for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}` + # @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/ces/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new + # + # # Call the run_evaluation_result_metrics method. + # result = client.run_evaluation_result_metrics 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 run_evaluation_result_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_evaluation_result_metrics.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Ces::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.run_evaluation_result_metrics.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_evaluation_result_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @evaluation_service_stub.run_evaluation_result_metrics request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the EvaluationService REST API. # @@ -3392,6 +3666,21 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :export_evaluations + ## + # RPC-specific configuration for `export_evaluation_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluation_runs + ## + # RPC-specific configuration for `export_evaluation_results` + # @return [::Gapic::Config::Method] + # + attr_reader :export_evaluation_results + ## + # RPC-specific configuration for `run_evaluation_result_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :run_evaluation_result_metrics # @private def initialize parent_rpcs = nil @@ -3459,6 +3748,12 @@ def initialize parent_rpcs = nil @test_persona_voice = ::Gapic::Config::Method.new test_persona_voice_config export_evaluations_config = parent_rpcs.export_evaluations if parent_rpcs.respond_to? :export_evaluations @export_evaluations = ::Gapic::Config::Method.new export_evaluations_config + export_evaluation_runs_config = parent_rpcs.export_evaluation_runs if parent_rpcs.respond_to? :export_evaluation_runs + @export_evaluation_runs = ::Gapic::Config::Method.new export_evaluation_runs_config + export_evaluation_results_config = parent_rpcs.export_evaluation_results if parent_rpcs.respond_to? :export_evaluation_results + @export_evaluation_results = ::Gapic::Config::Method.new export_evaluation_results_config + run_evaluation_result_metrics_config = parent_rpcs.run_evaluation_result_metrics if parent_rpcs.respond_to? :run_evaluation_result_metrics + @run_evaluation_result_metrics = ::Gapic::Config::Method.new run_evaluation_result_metrics_config yield self if block_given? end diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb index 935c22584dff..b0a19ecc1815 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb @@ -1353,6 +1353,126 @@ def export_evaluations request_pb, options = nil end end + ## + # Baseline implementation for the export_evaluation_runs REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_evaluation_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluation_runs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_evaluation_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_evaluation_results REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_evaluation_results request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluation_results_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_evaluation_results", + 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 run_evaluation_result_metrics REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 run_evaluation_result_metrics request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_evaluation_result_metrics_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_evaluation_result_metrics", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -2038,6 +2158,72 @@ def self.transcode_export_evaluations_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the export_evaluation_runs REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_evaluation_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/evaluationRuns:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_evaluation_results REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_evaluation_results_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/results:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_evaluation_result_metrics REST call + # + # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_evaluation_result_metrics_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{evaluation_result_id}:runEvaluationResultMetrics", + body: "*", + matches: [ + ["evaluation_result_id", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/results/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb index 4b3be822cb73..de69e9e840e7 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb @@ -18,7 +18,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n0google/cloud/ces/v1beta/evaluation_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/ces/v1beta/agent_service.proto\x1a*google/cloud/ces/v1beta/conversation.proto\x1a(google/cloud/ces/v1beta/evaluation.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"V\n\x15RunEvaluationResponse\x12=\n\x0e\x65valuation_run\x18\x01 \x01(\tB%\xfa\x41\"\n ces.googleapis.com/EvaluationRun\"\xb9\x02\n\x1eRunEvaluationOperationMetadata\x12:\n\x0b\x65valuations\x18\x01 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12@\n\x0e\x65valuation_run\x18\x02 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\"%\n#GenerateEvaluationOperationMetadata\"&\n$DeleteEvaluationRunOperationMetadata\"\xa3\x01\n\x17\x43reateEvaluationRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x1a\n\revaluation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12<\n\nevaluation\x18\x03 \x01(\x0b\x32#.google.cloud.ces.v1beta.EvaluationB\x03\xe0\x41\x02\"\x9f\x01\n\x19GenerateEvaluationRequest\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x43\n\x06source\x18\x02 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x05\x18\x01\xe0\x41\x01\"\xfb\x04\n\x18ImportEvaluationsRequest\x12_\n\x11\x63onversation_list\x18\x02 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.ImportEvaluationsRequest.ConversationListH\x00\x12\x11\n\x07gcs_uri\x18\x03 \x01(\tH\x00\x12\x15\n\x0b\x63sv_content\x18\x04 \x01(\x0cH\x00\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\\\n\x0eimport_options\x18\x05 \x01(\x0b\x32?.google.cloud.ces.v1beta.ImportEvaluationsRequest.ImportOptionsB\x03\xe0\x41\x01\x1a.\n\x10\x43onversationList\x12\x1a\n\rconversations\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\x8b\x02\n\rImportOptions\x12\x85\x01\n\x1c\x63onflict_resolution_strategy\x18\x01 \x01(\x0e\x32Z.google.cloud.ces.v1beta.ImportEvaluationsRequest.ImportOptions.ConflictResolutionStrategyB\x03\xe0\x41\x01\"r\n\x1a\x43onflictResolutionStrategy\x12,\n(CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED\x10\x00\x12\r\n\tOVERWRITE\x10\x01\x12\x08\n\x04SKIP\x10\x02\x12\r\n\tDUPLICATE\x10\x03\x42\x08\n\x06source\"\xf5\x02\n\x19ImportEvaluationsResponse\x12\x38\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x12\x45\n\x12\x65valuation_results\x18\x04 \x03(\x0b\x32).google.cloud.ces.v1beta.EvaluationResult\x12?\n\x0f\x65valuation_runs\x18\x05 \x03(\x0b\x32&.google.cloud.ces.v1beta.EvaluationRun\x12\x1b\n\x0e\x65rror_messages\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x14import_failure_count\x18\x03 \x01(\x05\x12.\n&evaluation_result_import_failure_count\x18\x06 \x01(\x05\x12+\n#evaluation_run_import_failure_count\x18\x07 \x01(\x05\"\xaa\x01\n\"ImportEvaluationsOperationMetadata\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\x1b\n\x0estatus_message\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc1\x01\n\x1e\x43reateEvaluationDatasetRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\"\n\x15\x65valuation_dataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\x12\x65valuation_dataset\x18\x03 \x01(\x0b\x32*.google.cloud.ces.v1beta.EvaluationDatasetB\x03\xe0\x41\x02\"\x8d\x01\n\x17UpdateEvaluationRequest\x12<\n\nevaluation\x18\x01 \x01(\x0b\x32#.google.cloud.ces.v1beta.EvaluationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xa3\x01\n\x1eUpdateEvaluationDatasetRequest\x12K\n\x12\x65valuation_dataset\x18\x01 \x01(\x0b\x32*.google.cloud.ces.v1beta.EvaluationDatasetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"u\n\x17\x44\x65leteEvaluationRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Z\n\x1d\x44\x65leteEvaluationResultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\"o\n\x1e\x44\x65leteEvaluationDatasetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x1a\x44\x65leteEvaluationRunRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\"K\n\x14GetEvaluationRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\"W\n\x1aGetEvaluationResultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\"Y\n\x1bGetEvaluationDatasetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\"Q\n\x17GetEvaluationRunRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\"\x91\x02\n\x16ListEvaluationsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Evaluation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x06\x66ilter\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01\x12\x1e\n\x11\x65valuation_filter\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15\x65valuation_run_filter\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10last_ten_results\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x01\n\x1cListEvaluationResultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#ces.googleapis.com/EvaluationResult\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\"\xba\x01\n\x1dListEvaluationDatasetsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$ces.googleapis.com/EvaluationDataset\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\"\xb2\x01\n\x19ListEvaluationRunsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 ces.googleapis.com/EvaluationRun\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\"l\n\x17ListEvaluationsResponse\x12\x38\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x7f\n\x1dListEvaluationResultsResponse\x12\x45\n\x12\x65valuation_results\x18\x01 \x03(\x0b\x32).google.cloud.ces.v1beta.EvaluationResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x01\n\x1eListEvaluationDatasetsResponse\x12G\n\x13\x65valuation_datasets\x18\x01 \x03(\x0b\x32*.google.cloud.ces.v1beta.EvaluationDataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"v\n\x1aListEvaluationRunsResponse\x12?\n\x0f\x65valuation_runs\x18\x01 \x03(\x0b\x32&.google.cloud.ces.v1beta.EvaluationRun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd7\x01\n#CreateScheduledEvaluationRunRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12(\n\x1bscheduled_evaluation_run_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12V\n\x18scheduled_evaluation_run\x18\x03 \x01(\x0b\x32/.google.cloud.ces.v1beta.ScheduledEvaluationRunB\x03\xe0\x41\x02\"c\n GetScheduledEvaluationRunRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\"\xc4\x01\n\"ListScheduledEvaluationRunsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)ces.googleapis.com/ScheduledEvaluationRun\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\"\x92\x01\n#ListScheduledEvaluationRunsResponse\x12R\n\x19scheduled_evaluation_runs\x18\x01 \x03(\x0b\x32/.google.cloud.ces.v1beta.ScheduledEvaluationRun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb3\x01\n#UpdateScheduledEvaluationRunRequest\x12V\n\x18scheduled_evaluation_run\x18\x01 \x01(\x0b\x32/.google.cloud.ces.v1beta.ScheduledEvaluationRunB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"y\n#DeleteScheduledEvaluationRunRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n\x17TestPersonaVoiceRequest\x12+\n\x03\x61pp\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x17\n\npersona_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04text\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1cUploadEvaluationAudioRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x1a\n\raudio_content\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12#\n\x16previous_audio_gcs_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x1dUploadEvaluationAudioResponse\x12\x15\n\raudio_gcs_uri\x18\x01 \x01(\t\x12\x12\n\ntranscript\x18\x02 \x01(\t\x12+\n\x08\x64uration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\")\n\x18TestPersonaVoiceResponse\x12\r\n\x05\x61udio\x18\x01 \x01(\x0c\"\xd1\x01\n\"CreateEvaluationExpectationRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12&\n\x19\x65valuation_expectation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12S\n\x16\x65valuation_expectation\x18\x03 \x01(\x0b\x32..google.cloud.ces.v1beta.EvaluationExpectationB\x03\xe0\x41\x02\"\xaf\x01\n\"UpdateEvaluationExpectationRequest\x12S\n\x16\x65valuation_expectation\x18\x01 \x01(\x0b\x32..google.cloud.ces.v1beta.EvaluationExpectationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"w\n\"DeleteEvaluationExpectationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"a\n\x1fGetEvaluationExpectationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\"\xc2\x01\n!ListEvaluationExpectationsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(ces.googleapis.com/EvaluationExpectation\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\"\x8e\x01\n\"ListEvaluationExpectationsResponse\x12O\n\x17\x65valuation_expectations\x18\x01 \x03(\x0b\x32..google.cloud.ces.v1beta.EvaluationExpectation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb9\x01\n\rExportOptions\x12O\n\rexport_format\x18\x01 \x01(\x0e\x32\x33.google.cloud.ces.v1beta.ExportOptions.ExportFormatB\x03\xe0\x41\x01\x12\x14\n\x07gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\"A\n\x0c\x45xportFormat\x12\x1d\n\x19\x45XPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x08\n\x04YAML\x10\x02\"\x90\x02\n\x18\x45xportEvaluationsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x34\n\x05names\x18\x02 \x03(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x43\n\x0e\x65xport_options\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ExportOptionsB\x03\xe0\x41\x01\x12\'\n\x1ainclude_evaluation_results\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13include_evaluations\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x02\n\x19\x45xportEvaluationsResponse\x12\x1d\n\x13\x65valuations_content\x18\x01 \x01(\x0cH\x00\x12\x19\n\x0f\x65valuations_uri\x18\x02 \x01(\tH\x00\x12j\n\x12\x66\x61iled_evaluations\x18\x03 \x03(\x0b\x32I.google.cloud.ces.v1beta.ExportEvaluationsResponse.FailedEvaluationsEntryB\x03\xe0\x41\x03\x1a\x38\n\x16\x46\x61iledEvaluationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x65valuations\"\x7f\n\x1f\x45xportEvaluationResultsResponse\x12$\n\x1a\x65valuation_results_content\x18\x01 \x01(\x0cH\x00\x12 \n\x16\x65valuation_results_uri\x18\x02 \x01(\tH\x00\x42\x14\n\x12\x65valuation_results\"s\n\x1c\x45xportEvaluationRunsResponse\x12!\n\x17\x65valuation_runs_content\x18\x01 \x01(\x0cH\x00\x12\x1d\n\x13\x65valuation_runs_uri\x18\x02 \x01(\tH\x00\x42\x11\n\x0f\x65valuation_runs2\x96<\n\x11\x45valuationService\x12\xe4\x01\n\rRunEvaluation\x12-.google.cloud.ces.v1beta.RunEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\x37\n\x15RunEvaluationResponse\x12\x1eRunEvaluationOperationMetadata\xda\x41\x03\x61pp\x82\xd3\xe4\x93\x02>\"9/v1beta/{app=projects/*/locations/*/apps/*}:runEvaluation:\x01*\x12\xf8\x01\n\x15UploadEvaluationAudio\x12\x35.google.cloud.ces.v1beta.UploadEvaluationAudioRequest\x1a\x36.google.cloud.ces.v1beta.UploadEvaluationAudioResponse\"p\xda\x41\x12name,audio_content\x82\xd3\xe4\x93\x02U\"P/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}:uploadEvaluationAudio:\x01*\x12\xf0\x01\n\x10\x43reateEvaluation\x12\x30.google.cloud.ces.v1beta.CreateEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"\x84\x01\xda\x41\x1fparent,evaluation,evaluation_id\xda\x41\x11parent,evaluation\x82\xd3\xe4\x93\x02H\":/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations:\nevaluation\x12\x8f\x02\n\x12GenerateEvaluation\x12\x32.google.cloud.ces.v1beta.GenerateEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41\x31\n\nEvaluation\x12#GenerateEvaluationOperationMetadata\xda\x41\x0c\x63onversation\x82\xd3\xe4\x93\x02\\\"W/v1beta/{conversation=projects/*/locations/*/apps/*/conversations/*}:generateEvaluation:\x01*\x12\xfe\x01\n\x11ImportEvaluations\x12\x31.google.cloud.ces.v1beta.ImportEvaluationsRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41?\n\x19ImportEvaluationsResponse\x12\"ImportEvaluationsOperationMetadata\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\"@/v1beta/{parent=projects/*/locations/*/apps/*}:importEvaluations:\x01*\x12\xac\x02\n\x17\x43reateEvaluationDataset\x12\x37.google.cloud.ces.v1beta.CreateEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"\xab\x01\xda\x41/parent,evaluation_dataset,evaluation_dataset_id\xda\x41\x19parent,evaluation_dataset\x82\xd3\xe4\x93\x02W\"A/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationDatasets:\x12\x65valuation_dataset\x12\xdd\x01\n\x10UpdateEvaluation\x12\x30.google.cloud.ces.v1beta.UpdateEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"r\xda\x41\x16\x65valuation,update_mask\x82\xd3\xe4\x93\x02S2E/v1beta/{evaluation.name=projects/*/locations/*/apps/*/evaluations/*}:\nevaluation\x12\x92\x02\n\x17UpdateEvaluationDataset\x12\x37.google.cloud.ces.v1beta.UpdateEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"\x91\x01\xda\x41\x1e\x65valuation_dataset,update_mask\x82\xd3\xe4\x93\x02j2T/v1beta/{evaluation_dataset.name=projects/*/locations/*/apps/*/evaluationDatasets/*}:\x12\x65valuation_dataset\x12\xa7\x01\n\x10\x44\x65leteEvaluation\x12\x30.google.cloud.ces.v1beta.DeleteEvaluationRequest\x1a\x16.google.protobuf.Empty\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}\x12\xbd\x01\n\x16\x44\x65leteEvaluationResult\x12\x36.google.cloud.ces.v1beta.DeleteEvaluationResultRequest\x1a\x16.google.protobuf.Empty\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*/results/*}\x12\xbc\x01\n\x17\x44\x65leteEvaluationDataset\x12\x37.google.cloud.ces.v1beta.DeleteEvaluationDatasetRequest\x1a\x16.google.protobuf.Empty\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43*A/v1beta/{name=projects/*/locations/*/apps/*/evaluationDatasets/*}\x12\xf8\x01\n\x13\x44\x65leteEvaluationRun\x12\x33.google.cloud.ces.v1beta.DeleteEvaluationRunRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41=\n\x15google.protobuf.Empty\x12$DeleteEvaluationRunOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1beta/{name=projects/*/locations/*/apps/*/evaluationRuns/*}\x12\xae\x01\n\rGetEvaluation\x12-.google.cloud.ces.v1beta.GetEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}\x12\xca\x01\n\x13GetEvaluationResult\x12\x33.google.cloud.ces.v1beta.GetEvaluationResultRequest\x1a).google.cloud.ces.v1beta.EvaluationResult\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*/results/*}\x12\xca\x01\n\x14GetEvaluationDataset\x12\x34.google.cloud.ces.v1beta.GetEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta/{name=projects/*/locations/*/apps/*/evaluationDatasets/*}\x12\xba\x01\n\x10GetEvaluationRun\x12\x30.google.cloud.ces.v1beta.GetEvaluationRunRequest\x1a&.google.cloud.ces.v1beta.EvaluationRun\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1beta/{name=projects/*/locations/*/apps/*/evaluationRuns/*}\x12\xc1\x01\n\x0fListEvaluations\x12/.google.cloud.ces.v1beta.ListEvaluationsRequest\x1a\x30.google.cloud.ces.v1beta.ListEvaluationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations\x12\xdd\x01\n\x15ListEvaluationResults\x12\x35.google.cloud.ces.v1beta.ListEvaluationResultsRequest\x1a\x36.google.cloud.ces.v1beta.ListEvaluationResultsResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1beta/{parent=projects/*/locations/*/apps/*/evaluations/*}/results\x12\xdd\x01\n\x16ListEvaluationDatasets\x12\x36.google.cloud.ces.v1beta.ListEvaluationDatasetsRequest\x1a\x37.google.cloud.ces.v1beta.ListEvaluationDatasetsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationDatasets\x12\xcd\x01\n\x12ListEvaluationRuns\x12\x32.google.cloud.ces.v1beta.ListEvaluationRunsRequest\x1a\x33.google.cloud.ces.v1beta.ListEvaluationRunsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationRuns\x12\xed\x01\n\x1aListEvaluationExpectations\x12:.google.cloud.ces.v1beta.ListEvaluationExpectationsRequest\x1a;.google.cloud.ces.v1beta.ListEvaluationExpectationsResponse\"V\xda\x41\x06parent\x82\xd3\xe4\x93\x02G\x12\x45/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationExpectations\x12\xda\x01\n\x18GetEvaluationExpectation\x12\x38.google.cloud.ces.v1beta.GetEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1beta/{name=projects/*/locations/*/apps/*/evaluationExpectations/*}\x12\xcc\x02\n\x1b\x43reateEvaluationExpectation\x12;.google.cloud.ces.v1beta.CreateEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"\xbf\x01\xda\x41\x37parent,evaluation_expectation,evaluation_expectation_id\xda\x41\x1dparent,evaluation_expectation\x82\xd3\xe4\x93\x02_\"E/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationExpectations:\x16\x65valuation_expectation\x12\xae\x02\n\x1bUpdateEvaluationExpectation\x12;.google.cloud.ces.v1beta.UpdateEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"\xa1\x01\xda\x41\"evaluation_expectation,update_mask\x82\xd3\xe4\x93\x02v2\\/v1beta/{evaluation_expectation.name=projects/*/locations/*/apps/*/evaluationExpectations/*}:\x16\x65valuation_expectation\x12\xc8\x01\n\x1b\x44\x65leteEvaluationExpectation\x12;.google.cloud.ces.v1beta.DeleteEvaluationExpectationRequest\x1a\x16.google.protobuf.Empty\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G*E/v1beta/{name=projects/*/locations/*/apps/*/evaluationExpectations/*}\x12\xd8\x02\n\x1c\x43reateScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.CreateScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"\xc8\x01\xda\x41;parent,scheduled_evaluation_run,scheduled_evaluation_run_id\xda\x41\x1fparent,scheduled_evaluation_run\x82\xd3\xe4\x93\x02\x62\"F/v1beta/{parent=projects/*/locations/*/apps/*}/scheduledEvaluationRuns:\x18scheduled_evaluation_run\x12\xde\x01\n\x19GetScheduledEvaluationRun\x12\x39.google.cloud.ces.v1beta.GetScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1beta/{name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}\x12\xf1\x01\n\x1bListScheduledEvaluationRuns\x12;.google.cloud.ces.v1beta.ListScheduledEvaluationRunsRequest\x1a<.google.cloud.ces.v1beta.ListScheduledEvaluationRunsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1beta/{parent=projects/*/locations/*/apps/*}/scheduledEvaluationRuns\x12\xb8\x02\n\x1cUpdateScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.UpdateScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"\xa8\x01\xda\x41$scheduled_evaluation_run,update_mask\x82\xd3\xe4\x93\x02{2_/v1beta/{scheduled_evaluation_run.name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}:\x18scheduled_evaluation_run\x12\xcb\x01\n\x1c\x44\x65leteScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.DeleteScheduledEvaluationRunRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1beta/{name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}\x12\xc6\x01\n\x10TestPersonaVoice\x12\x30.google.cloud.ces.v1beta.TestPersonaVoiceRequest\x1a\x31.google.cloud.ces.v1beta.TestPersonaVoiceResponse\"M\xda\x41\x03\x61pp\x82\xd3\xe4\x93\x02\x41\"\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"a\n\x1fGetEvaluationExpectationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\"\xc2\x01\n!ListEvaluationExpectationsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(ces.googleapis.com/EvaluationExpectation\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\"\x8e\x01\n\"ListEvaluationExpectationsResponse\x12O\n\x17\x65valuation_expectations\x18\x01 \x03(\x0b\x32..google.cloud.ces.v1beta.EvaluationExpectation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb9\x01\n\rExportOptions\x12O\n\rexport_format\x18\x01 \x01(\x0e\x32\x33.google.cloud.ces.v1beta.ExportOptions.ExportFormatB\x03\xe0\x41\x01\x12\x14\n\x07gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\"A\n\x0c\x45xportFormat\x12\x1d\n\x19\x45XPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x08\n\x04YAML\x10\x02\"\x90\x02\n\x18\x45xportEvaluationsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x34\n\x05names\x18\x02 \x03(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x43\n\x0e\x65xport_options\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ExportOptionsB\x03\xe0\x41\x01\x12\'\n\x1ainclude_evaluation_results\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13include_evaluations\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x02\n\x19\x45xportEvaluationsResponse\x12\x1d\n\x13\x65valuations_content\x18\x01 \x01(\x0cH\x00\x12\x19\n\x0f\x65valuations_uri\x18\x02 \x01(\tH\x00\x12j\n\x12\x66\x61iled_evaluations\x18\x03 \x03(\x0b\x32I.google.cloud.ces.v1beta.ExportEvaluationsResponse.FailedEvaluationsEntryB\x03\xe0\x41\x03\x1a\x38\n\x16\x46\x61iledEvaluationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x65valuations\"\xd8\x01\n\x1e\x45xportEvaluationResultsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12:\n\x05names\x18\x02 \x03(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\x12\x43\n\x0e\x65xport_options\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ExportOptionsB\x03\xe0\x41\x01\"\x7f\n\x1f\x45xportEvaluationResultsResponse\x12$\n\x1a\x65valuation_results_content\x18\x01 \x01(\x0cH\x00\x12 \n\x16\x65valuation_results_uri\x18\x02 \x01(\tH\x00\x42\x14\n\x12\x65valuation_results\"\xcb\x01\n\x1b\x45xportEvaluationRunsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x37\n\x05names\x18\x02 \x03(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x43\n\x0e\x65xport_options\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ExportOptionsB\x03\xe0\x41\x01\"s\n\x1c\x45xportEvaluationRunsResponse\x12!\n\x17\x65valuation_runs_content\x18\x01 \x01(\x0cH\x00\x12\x1d\n\x13\x65valuation_runs_uri\x18\x02 \x01(\tH\x00\x42\x11\n\x0f\x65valuation_runs\"\'\n%ExportEvaluationRunsOperationMetadata\"*\n(ExportEvaluationResultsOperationMetadata\"-\n+RunEvaluationResultMetricsOperationMetadata2\xb9\x43\n\x11\x45valuationService\x12\xe4\x01\n\rRunEvaluation\x12-.google.cloud.ces.v1beta.RunEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\x37\n\x15RunEvaluationResponse\x12\x1eRunEvaluationOperationMetadata\xda\x41\x03\x61pp\x82\xd3\xe4\x93\x02>\"9/v1beta/{app=projects/*/locations/*/apps/*}:runEvaluation:\x01*\x12\xf8\x01\n\x15UploadEvaluationAudio\x12\x35.google.cloud.ces.v1beta.UploadEvaluationAudioRequest\x1a\x36.google.cloud.ces.v1beta.UploadEvaluationAudioResponse\"p\xda\x41\x12name,audio_content\x82\xd3\xe4\x93\x02U\"P/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}:uploadEvaluationAudio:\x01*\x12\xf0\x01\n\x10\x43reateEvaluation\x12\x30.google.cloud.ces.v1beta.CreateEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"\x84\x01\xda\x41\x1fparent,evaluation,evaluation_id\xda\x41\x11parent,evaluation\x82\xd3\xe4\x93\x02H\":/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations:\nevaluation\x12\x8f\x02\n\x12GenerateEvaluation\x12\x32.google.cloud.ces.v1beta.GenerateEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41\x31\n\nEvaluation\x12#GenerateEvaluationOperationMetadata\xda\x41\x0c\x63onversation\x82\xd3\xe4\x93\x02\\\"W/v1beta/{conversation=projects/*/locations/*/apps/*/conversations/*}:generateEvaluation:\x01*\x12\xfe\x01\n\x11ImportEvaluations\x12\x31.google.cloud.ces.v1beta.ImportEvaluationsRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41?\n\x19ImportEvaluationsResponse\x12\"ImportEvaluationsOperationMetadata\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\"@/v1beta/{parent=projects/*/locations/*/apps/*}:importEvaluations:\x01*\x12\xac\x02\n\x17\x43reateEvaluationDataset\x12\x37.google.cloud.ces.v1beta.CreateEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"\xab\x01\xda\x41/parent,evaluation_dataset,evaluation_dataset_id\xda\x41\x19parent,evaluation_dataset\x82\xd3\xe4\x93\x02W\"A/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationDatasets:\x12\x65valuation_dataset\x12\xdd\x01\n\x10UpdateEvaluation\x12\x30.google.cloud.ces.v1beta.UpdateEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"r\xda\x41\x16\x65valuation,update_mask\x82\xd3\xe4\x93\x02S2E/v1beta/{evaluation.name=projects/*/locations/*/apps/*/evaluations/*}:\nevaluation\x12\x92\x02\n\x17UpdateEvaluationDataset\x12\x37.google.cloud.ces.v1beta.UpdateEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"\x91\x01\xda\x41\x1e\x65valuation_dataset,update_mask\x82\xd3\xe4\x93\x02j2T/v1beta/{evaluation_dataset.name=projects/*/locations/*/apps/*/evaluationDatasets/*}:\x12\x65valuation_dataset\x12\xa7\x01\n\x10\x44\x65leteEvaluation\x12\x30.google.cloud.ces.v1beta.DeleteEvaluationRequest\x1a\x16.google.protobuf.Empty\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}\x12\xbd\x01\n\x16\x44\x65leteEvaluationResult\x12\x36.google.cloud.ces.v1beta.DeleteEvaluationResultRequest\x1a\x16.google.protobuf.Empty\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*/results/*}\x12\xbc\x01\n\x17\x44\x65leteEvaluationDataset\x12\x37.google.cloud.ces.v1beta.DeleteEvaluationDatasetRequest\x1a\x16.google.protobuf.Empty\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43*A/v1beta/{name=projects/*/locations/*/apps/*/evaluationDatasets/*}\x12\xf8\x01\n\x13\x44\x65leteEvaluationRun\x12\x33.google.cloud.ces.v1beta.DeleteEvaluationRunRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41=\n\x15google.protobuf.Empty\x12$DeleteEvaluationRunOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1beta/{name=projects/*/locations/*/apps/*/evaluationRuns/*}\x12\xae\x01\n\rGetEvaluation\x12-.google.cloud.ces.v1beta.GetEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}\x12\xca\x01\n\x13GetEvaluationResult\x12\x33.google.cloud.ces.v1beta.GetEvaluationResultRequest\x1a).google.cloud.ces.v1beta.EvaluationResult\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*/results/*}\x12\xca\x01\n\x14GetEvaluationDataset\x12\x34.google.cloud.ces.v1beta.GetEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta/{name=projects/*/locations/*/apps/*/evaluationDatasets/*}\x12\xba\x01\n\x10GetEvaluationRun\x12\x30.google.cloud.ces.v1beta.GetEvaluationRunRequest\x1a&.google.cloud.ces.v1beta.EvaluationRun\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1beta/{name=projects/*/locations/*/apps/*/evaluationRuns/*}\x12\xc1\x01\n\x0fListEvaluations\x12/.google.cloud.ces.v1beta.ListEvaluationsRequest\x1a\x30.google.cloud.ces.v1beta.ListEvaluationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations\x12\xdd\x01\n\x15ListEvaluationResults\x12\x35.google.cloud.ces.v1beta.ListEvaluationResultsRequest\x1a\x36.google.cloud.ces.v1beta.ListEvaluationResultsResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1beta/{parent=projects/*/locations/*/apps/*/evaluations/*}/results\x12\xdd\x01\n\x16ListEvaluationDatasets\x12\x36.google.cloud.ces.v1beta.ListEvaluationDatasetsRequest\x1a\x37.google.cloud.ces.v1beta.ListEvaluationDatasetsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationDatasets\x12\xcd\x01\n\x12ListEvaluationRuns\x12\x32.google.cloud.ces.v1beta.ListEvaluationRunsRequest\x1a\x33.google.cloud.ces.v1beta.ListEvaluationRunsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationRuns\x12\xed\x01\n\x1aListEvaluationExpectations\x12:.google.cloud.ces.v1beta.ListEvaluationExpectationsRequest\x1a;.google.cloud.ces.v1beta.ListEvaluationExpectationsResponse\"V\xda\x41\x06parent\x82\xd3\xe4\x93\x02G\x12\x45/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationExpectations\x12\xda\x01\n\x18GetEvaluationExpectation\x12\x38.google.cloud.ces.v1beta.GetEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1beta/{name=projects/*/locations/*/apps/*/evaluationExpectations/*}\x12\xcc\x02\n\x1b\x43reateEvaluationExpectation\x12;.google.cloud.ces.v1beta.CreateEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"\xbf\x01\xda\x41\x37parent,evaluation_expectation,evaluation_expectation_id\xda\x41\x1dparent,evaluation_expectation\x82\xd3\xe4\x93\x02_\"E/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationExpectations:\x16\x65valuation_expectation\x12\xae\x02\n\x1bUpdateEvaluationExpectation\x12;.google.cloud.ces.v1beta.UpdateEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"\xa1\x01\xda\x41\"evaluation_expectation,update_mask\x82\xd3\xe4\x93\x02v2\\/v1beta/{evaluation_expectation.name=projects/*/locations/*/apps/*/evaluationExpectations/*}:\x16\x65valuation_expectation\x12\xc8\x01\n\x1b\x44\x65leteEvaluationExpectation\x12;.google.cloud.ces.v1beta.DeleteEvaluationExpectationRequest\x1a\x16.google.protobuf.Empty\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G*E/v1beta/{name=projects/*/locations/*/apps/*/evaluationExpectations/*}\x12\xd8\x02\n\x1c\x43reateScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.CreateScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"\xc8\x01\xda\x41;parent,scheduled_evaluation_run,scheduled_evaluation_run_id\xda\x41\x1fparent,scheduled_evaluation_run\x82\xd3\xe4\x93\x02\x62\"F/v1beta/{parent=projects/*/locations/*/apps/*}/scheduledEvaluationRuns:\x18scheduled_evaluation_run\x12\xde\x01\n\x19GetScheduledEvaluationRun\x12\x39.google.cloud.ces.v1beta.GetScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1beta/{name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}\x12\xf1\x01\n\x1bListScheduledEvaluationRuns\x12;.google.cloud.ces.v1beta.ListScheduledEvaluationRunsRequest\x1a<.google.cloud.ces.v1beta.ListScheduledEvaluationRunsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1beta/{parent=projects/*/locations/*/apps/*}/scheduledEvaluationRuns\x12\xb8\x02\n\x1cUpdateScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.UpdateScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"\xa8\x01\xda\x41$scheduled_evaluation_run,update_mask\x82\xd3\xe4\x93\x02{2_/v1beta/{scheduled_evaluation_run.name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}:\x18scheduled_evaluation_run\x12\xcb\x01\n\x1c\x44\x65leteScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.DeleteScheduledEvaluationRunRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1beta/{name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}\x12\xc6\x01\n\x10TestPersonaVoice\x12\x30.google.cloud.ces.v1beta.TestPersonaVoiceRequest\x1a\x31.google.cloud.ces.v1beta.TestPersonaVoiceResponse\"M\xda\x41\x03\x61pp\x82\xd3\xe4\x93\x02\x41\"] # Optional. The identifiers of the tools to retrieve from the toolset. # If empty, all tools in the toolset will be returned. + # @param bypass_persistence_config [::Boolean] + # Optional. If true, the returned tools will contain raw descriptions and + # schemas directly from the server, bypassing any stored persistence + # configurations (overrides/snapshots). # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb index 144506d5272f..5b1c53902719 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb @@ -410,7 +410,7 @@ def retrieve_tool_schema request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload retrieve_tools(toolset: nil, tool_ids: nil) + # @overload retrieve_tools(toolset: nil, tool_ids: nil, bypass_persistence_config: nil) # Pass arguments to `retrieve_tools` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -422,6 +422,10 @@ def retrieve_tool_schema request, options = nil # @param tool_ids [::Array<::String>] # Optional. The identifiers of the tools to retrieve from the toolset. # If empty, all tools in the toolset will be returned. + # @param bypass_persistence_config [::Boolean] + # Optional. If true, the returned tools will contain raw descriptions and + # schemas directly from the server, bypassing any stored persistence + # configurations (overrides/snapshots). # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb index 408594d32e6a..58e685734750 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb @@ -9,13 +9,14 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/cloud/ces/v1beta/schema_pb' +require 'google/cloud/ces/v1beta/search_suggestions_pb' require 'google/cloud/ces/v1beta/session_service_pb' require 'google/cloud/ces/v1beta/tool_pb' require 'google/cloud/ces/v1beta/toolset_tool_pb' require 'google/protobuf/struct_pb' -descriptor_data = "\n*google/cloud/ces/v1beta/tool_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/schema.proto\x1a-google/cloud/ces/v1beta/session_service.proto\x1a\"google/cloud/ces/v1beta/tool.proto\x1a*google/cloud/ces/v1beta/toolset_tool.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xb4\x03\n\x12\x45xecuteToolRequest\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x01H\x00\x12\x31\n\tvariables\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x01\x12/\n\x07\x63ontext\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x01\x12.\n\x06parent\x18\x04 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12=\n\x0bmock_config\x18\x07 \x01(\x0b\x32#.google.cloud.ces.v1beta.MockConfigB\x03\xe0\x41\x01\x42\x11\n\x0ftool_identifierB\x18\n\x16tool_execution_context\"\xeb\x01\n\x13\x45xecuteToolResponse\x12,\n\x04tool\x18\x01 \x01(\tB\x1c\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12<\n\x0ctoolset_tool\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolH\x00\x12)\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12*\n\tvariables\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x11\n\x0ftool_identifier\"\xd2\x01\n\x19RetrieveToolSchemaRequest\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x01H\x00\x12.\n\x06parent\x18\x03 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/AppB\x11\n\x0ftool_identifier\"\x8a\x02\n\x1aRetrieveToolSchemaResponse\x12,\n\x04tool\x18\x01 \x01(\tB\x1c\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12<\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolH\x00\x12\x35\n\x0cinput_schema\x18\x03 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.Schema\x12\x36\n\routput_schema\x18\x04 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x11\n\x0ftool_identifier\"b\n\x14RetrieveToolsRequest\x12\x33\n\x07toolset\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x15\n\x08tool_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\"E\n\x15RetrieveToolsResponse\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool2\xbf\x05\n\x0bToolService\x12\xaf\x01\n\x0b\x45xecuteTool\x12+.google.cloud.ces.v1beta.ExecuteToolRequest\x1a,.google.cloud.ces.v1beta.ExecuteToolResponse\"E\x82\xd3\xe4\x93\x02?\":/v1beta/{parent=projects/*/locations/*/apps/*}:executeTool:\x01*\x12\xcb\x01\n\x12RetrieveToolSchema\x12\x32.google.cloud.ces.v1beta.RetrieveToolSchemaRequest\x1a\x33.google.cloud.ces.v1beta.RetrieveToolSchemaResponse\"L\x82\xd3\xe4\x93\x02\x46\"A/v1beta/{parent=projects/*/locations/*/apps/*}:retrieveToolSchema:\x01*\x12\xc3\x01\n\rRetrieveTools\x12-.google.cloud.ces.v1beta.RetrieveToolsRequest\x1a..google.cloud.ces.v1beta.RetrieveToolsResponse\"S\x82\xd3\xe4\x93\x02M\"H/v1beta/{toolset=projects/*/locations/*/apps/*/toolsets/*}:retrieveTools:\x01*\x1aj\xca\x41\x12\x63\x65s.googleapis.com\xd2\x41Rhttps://www.googleapis.com/auth/ces,https://www.googleapis.com/auth/cloud-platformB`\n\x1b\x63om.google.cloud.ces.v1betaB\x10ToolServiceProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" +descriptor_data = "\n*google/cloud/ces/v1beta/tool_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/schema.proto\x1a\x30google/cloud/ces/v1beta/search_suggestions.proto\x1a-google/cloud/ces/v1beta/session_service.proto\x1a\"google/cloud/ces/v1beta/tool.proto\x1a*google/cloud/ces/v1beta/toolset_tool.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xb4\x03\n\x12\x45xecuteToolRequest\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x01H\x00\x12\x31\n\tvariables\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x01\x12/\n\x07\x63ontext\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x01\x12.\n\x06parent\x18\x04 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12=\n\x0bmock_config\x18\x07 \x01(\x0b\x32#.google.cloud.ces.v1beta.MockConfigB\x03\xe0\x41\x01\x42\x11\n\x0ftool_identifierB\x18\n\x16tool_execution_context\"\xf7\x02\n\x13\x45xecuteToolResponse\x12,\n\x04tool\x18\x01 \x01(\tB\x1c\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12<\n\x0ctoolset_tool\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolH\x00\x12)\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12*\n\tvariables\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x35\n\tcitations\x18\x05 \x01(\x0b\x32\".google.cloud.ces.v1beta.Citations\x12S\n\x19google_search_suggestions\x18\x06 \x01(\x0b\x32\x30.google.cloud.ces.v1beta.GoogleSearchSuggestionsB\x11\n\x0ftool_identifier\"\xd2\x01\n\x19RetrieveToolSchemaRequest\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x01H\x00\x12.\n\x06parent\x18\x03 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/AppB\x11\n\x0ftool_identifier\"\x8a\x02\n\x1aRetrieveToolSchemaResponse\x12,\n\x04tool\x18\x01 \x01(\tB\x1c\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12<\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolH\x00\x12\x35\n\x0cinput_schema\x18\x03 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.Schema\x12\x36\n\routput_schema\x18\x04 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x11\n\x0ftool_identifier\"\x8a\x01\n\x14RetrieveToolsRequest\x12\x33\n\x07toolset\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x15\n\x08tool_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12&\n\x19\x62ypass_persistence_config\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"E\n\x15RetrieveToolsResponse\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool2\xbf\x05\n\x0bToolService\x12\xaf\x01\n\x0b\x45xecuteTool\x12+.google.cloud.ces.v1beta.ExecuteToolRequest\x1a,.google.cloud.ces.v1beta.ExecuteToolResponse\"E\x82\xd3\xe4\x93\x02?\":/v1beta/{parent=projects/*/locations/*/apps/*}:executeTool:\x01*\x12\xcb\x01\n\x12RetrieveToolSchema\x12\x32.google.cloud.ces.v1beta.RetrieveToolSchemaRequest\x1a\x33.google.cloud.ces.v1beta.RetrieveToolSchemaResponse\"L\x82\xd3\xe4\x93\x02\x46\"A/v1beta/{parent=projects/*/locations/*/apps/*}:retrieveToolSchema:\x01*\x12\xc3\x01\n\rRetrieveTools\x12-.google.cloud.ces.v1beta.RetrieveToolsRequest\x1a..google.cloud.ces.v1beta.RetrieveToolsResponse\"S\x82\xd3\xe4\x93\x02M\"H/v1beta/{toolset=projects/*/locations/*/apps/*/toolsets/*}:retrieveTools:\x01*\x1aj\xca\x41\x12\x63\x65s.googleapis.com\xd2\x41Rhttps://www.googleapis.com/auth/ces,https://www.googleapis.com/auth/cloud-platformB`\n\x1b\x63om.google.cloud.ces.v1betaB\x10ToolServiceProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb index c1d65db3da9f..42cf420a2cce 100644 --- a/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb +++ b/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/struct_pb' -descriptor_data = "\n)google/cloud/ces/v1beta/widget_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a-google/cloud/ces/v1beta/python_function.proto\x1a$google/cloud/ces/v1beta/schema.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xa9\x08\n\nWidgetTool\x12:\n\nparameters\x18\x04 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12H\n\x0bwidget_type\x18\x03 \x01(\x0e\x32..google.cloud.ces.v1beta.WidgetTool.WidgetTypeB\x03\xe0\x41\x01\x12/\n\tui_config\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12J\n\x0c\x64\x61ta_mapping\x18\x06 \x01(\x0b\x32/.google.cloud.ces.v1beta.WidgetTool.DataMappingB\x03\xe0\x41\x01\x1a\xb2\x03\n\x0b\x44\x61taMapping\x12\x1d\n\x10source_tool_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12_\n\x0e\x66ield_mappings\x18\x02 \x03(\x0b\x32\x42.google.cloud.ces.v1beta.WidgetTool.DataMapping.FieldMappingsEntryB\x03\xe0\x41\x01\x12\x45\n\x0fpython_function\x18\x05 \x01(\x0b\x32\'.google.cloud.ces.v1beta.PythonFunctionB\x03\xe0\x41\x01\x12G\n\x04mode\x18\x04 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.WidgetTool.DataMapping.ModeB\x03\xe0\x41\x01\x12\x19\n\rpython_script\x18\x03 \x01(\tB\x02\x18\x01\x1a\x34\n\x12\x46ieldMappingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"B\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x11\n\rFIELD_MAPPING\x10\x01\x12\x11\n\rPYTHON_SCRIPT\x10\x02\"\xac\x02\n\nWidgetType\x12\x1b\n\x17WIDGET_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43USTOM\x10\x01\x12\x14\n\x10PRODUCT_CAROUSEL\x10\x02\x12\x13\n\x0fPRODUCT_DETAILS\x10\x03\x12\x11\n\rQUICK_ACTIONS\x10\x04\x12\x16\n\x12PRODUCT_COMPARISON\x10\x05\x12\x1c\n\x18\x41\x44VANCED_PRODUCT_DETAILS\x10\x06\x12\x0e\n\nSHORT_FORM\x10\x07\x12\x18\n\x14OVERALL_SATISFACTION\x10\x08\x12\x11\n\rORDER_SUMMARY\x10\t\x12\x17\n\x13\x41PPOINTMENT_DETAILS\x10\n\x12\x19\n\x15\x41PPOINTMENT_SCHEDULER\x10\x0b\x12\x10\n\x0c\x43ONTACT_FORM\x10\x0c\x42\x07\n\x05inputB_\n\x1b\x63om.google.cloud.ces.v1betaB\x0fWidgetToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" +descriptor_data = "\n)google/cloud/ces/v1beta/widget_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a-google/cloud/ces/v1beta/python_function.proto\x1a$google/cloud/ces/v1beta/schema.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xf4\n\n\nWidgetTool\x12:\n\nparameters\x18\x04 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12H\n\x0bwidget_type\x18\x03 \x01(\x0e\x32..google.cloud.ces.v1beta.WidgetTool.WidgetTypeB\x03\xe0\x41\x01\x12/\n\tui_config\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12J\n\x0c\x64\x61ta_mapping\x18\x06 \x01(\x0b\x32/.google.cloud.ces.v1beta.WidgetTool.DataMappingB\x03\xe0\x41\x01\x12Y\n\x14text_response_config\x18\x07 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.WidgetTool.TextResponseConfigB\x03\xe0\x41\x01\x1a\xed\x01\n\x12TextResponseConfig\x12N\n\x04type\x18\x01 \x01(\x0e\x32;.google.cloud.ces.v1beta.WidgetTool.TextResponseConfig.TypeB\x03\xe0\x41\x01\x12\x18\n\x0bstatic_text\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19text_response_instruction\x18\x03 \x01(\tB\x03\xe0\x41\x01\"E\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x11\n\rLLM_GENERATED\x10\x02\x12\n\n\x06STATIC\x10\x03\x1a\xb2\x03\n\x0b\x44\x61taMapping\x12\x1d\n\x10source_tool_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12_\n\x0e\x66ield_mappings\x18\x02 \x03(\x0b\x32\x42.google.cloud.ces.v1beta.WidgetTool.DataMapping.FieldMappingsEntryB\x03\xe0\x41\x01\x12\x45\n\x0fpython_function\x18\x05 \x01(\x0b\x32\'.google.cloud.ces.v1beta.PythonFunctionB\x03\xe0\x41\x01\x12G\n\x04mode\x18\x04 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.WidgetTool.DataMapping.ModeB\x03\xe0\x41\x01\x12\x19\n\rpython_script\x18\x03 \x01(\tB\x02\x18\x01\x1a\x34\n\x12\x46ieldMappingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"B\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x11\n\rFIELD_MAPPING\x10\x01\x12\x11\n\rPYTHON_SCRIPT\x10\x02\"\xac\x02\n\nWidgetType\x12\x1b\n\x17WIDGET_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43USTOM\x10\x01\x12\x14\n\x10PRODUCT_CAROUSEL\x10\x02\x12\x13\n\x0fPRODUCT_DETAILS\x10\x03\x12\x11\n\rQUICK_ACTIONS\x10\x04\x12\x16\n\x12PRODUCT_COMPARISON\x10\x05\x12\x1c\n\x18\x41\x44VANCED_PRODUCT_DETAILS\x10\x06\x12\x0e\n\nSHORT_FORM\x10\x07\x12\x18\n\x14OVERALL_SATISFACTION\x10\x08\x12\x11\n\rORDER_SUMMARY\x10\t\x12\x17\n\x13\x41PPOINTMENT_DETAILS\x10\n\x12\x19\n\x15\x41PPOINTMENT_SCHEDULER\x10\x0b\x12\x10\n\x0c\x43ONTACT_FORM\x10\x0c\x42\x07\n\x05inputB_\n\x1b\x63om.google.cloud.ces.v1betaB\x0fWidgetToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -20,6 +20,8 @@ module Cloud module Ces module V1beta WidgetTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool").msgclass + WidgetTool::TextResponseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.TextResponseConfig").msgclass + WidgetTool::TextResponseConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.TextResponseConfig.Type").enummodule WidgetTool::DataMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.DataMapping").msgclass WidgetTool::DataMapping::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode").enummodule WidgetTool::WidgetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.WidgetType").enummodule diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb index eb3052d88e25..a3e7ea2bfa89 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb @@ -131,6 +131,10 @@ module V1beta # @return [::Array<::Google::Cloud::Ces::V1beta::TransferRule>] # Optional. Agent transfer rules. # If multiple rules match, the first one in the list will be used. + # @!attribute [r] validation_errors + # @return [::Array<::String>] + # Output only. Misconfigurations or errors in the agent that may affect agent + # quality. class Agent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -181,6 +185,11 @@ class LlmAgent # [`allow_playback_interruption`](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#text) # set to true will be interruptable, all other messages follow the # app-level barge-in settings. + # @!attribute [rw] language_code_variable + # @return [::String] + # Optional. The name of the variable that contains the language code to be + # used for the Dialogflow session. If unspecified, the default language + # code of the Dialogflow agent will be used. class RemoteDialogflowAgent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_card.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_card.rb similarity index 100% rename from owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_card.rb rename to google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_card.rb diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb index 3c91c3421ffa..9290691ca595 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb @@ -1185,19 +1185,24 @@ class RestoreAppVersionResponse # The agent resource to be used by the LLM assistant, can be empty for # generating a new agent. # - # Note: The following fields are mutually exclusive: `agent`, `tool`, `toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `agent`, `tool`, `toolset`, `app_version_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] tool # @return [::Google::Cloud::Ces::V1beta::Tool] # The tool resource to be used by the LLM assistant, can be empty for # generating a new tool. # - # Note: The following fields are mutually exclusive: `tool`, `agent`, `toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `tool`, `agent`, `toolset`, `app_version_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] toolset # @return [::Google::Cloud::Ces::V1beta::Toolset] # The toolset resource to be used by the LLM assistant, can be empty for # generating a new toolset. # - # Note: The following fields are mutually exclusive: `toolset`, `agent`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `toolset`, `agent`, `tool`, `app_version_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] app_version_context + # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppVersionContext] + # The app version context specifying the base snapshot and target agent. + # + # Note: The following fields are mutually exclusive: `app_version_context`, `agent`, `tool`, `toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] parent # @return [::String] # Required. The resource name of the app to generate the resource for. @@ -1226,6 +1231,22 @@ class GenerateAppResourceRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + # The app version context specifying the base snapshot and target agent. + # @!attribute [rw] app_version + # @return [::String] + # The resource name of the app version to be used by the LLM assistant. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + # @!attribute [rw] agent_resource_name + # @return [::String] + # The resource name of the target agent to be used by the LLM assistant. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + class AppVersionContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The instructions to be used to refine a part of the resource. The part of # the resource can be specified with a start index, end index and a field # mask. For example, if you want to refine a part of the agent instructions diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb index 0c2e26b175b4..bc4fbb0dcbdc 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb @@ -112,6 +112,9 @@ module V1beta # @!attribute [rw] client_certificate_settings # @return [::Google::Cloud::Ces::V1beta::ClientCertificateSettings] # Optional. The default client certificate settings for the app. + # @!attribute [rw] vpc_sc_settings + # @return [::Google::Cloud::Ces::V1beta::VpcScSettings] + # Optional. VPC-SC settings for the app. # @!attribute [rw] locked # @return [::Boolean] # Optional. Indicates whether the app is locked for changes. If the app is @@ -124,6 +127,9 @@ module V1beta # @!attribute [rw] evaluation_settings # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings] # Optional. The evaluation settings for the app. + # @!attribute [r] validation_errors + # @return [::Array<::String>] + # Output only. Misconfigurations or warnings in the app. class App include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -384,11 +390,20 @@ class MetricAnalysisSettings # Optional. Configuration for how sensitive data should be redacted. # @!attribute [rw] audio_recording_config # @return [::Google::Cloud::Ces::V1beta::AudioRecordingConfig] - # Optional. Configuration for how audio interactions should be recorded. + # Optional. Configuration for how audio interactions should be recorded. The + # audio is subject to redaction as configured in + # {::Google::Cloud::Ces::V1beta::LoggingSettings#redaction_config RedactionConfig}. + # @!attribute [rw] unredacted_audio_recording_config + # @return [::Google::Cloud::Ces::V1beta::AudioRecordingConfig] + # Optional. Configures an additional recording of unredacted audio. This can + # be used to maintain a raw audio copy when audio redaction is + # {::Google::Cloud::Ces::V1beta::RedactionConfig#enable_redaction enabled}, + # typically for auditing or monitoring purposes. # @!attribute [rw] bigquery_export_settings # @return [::Google::Cloud::Ces::V1beta::BigQueryExportSettings] - # Optional. Settings to describe the BigQuery export behaviors for the app. - # The conversation data will be exported to BigQuery tables if it is enabled. + # Optional. Configures the BigQuery export behaviors for the app. The + # conversation data is subject to redaction as configured in + # {::Google::Cloud::Ces::V1beta::LoggingSettings#redaction_config RedactionConfig}. # @!attribute [rw] cloud_logging_settings # @return [::Google::Cloud::Ces::V1beta::CloudLoggingSettings] # Optional. Settings to describe the Cloud Logging behaviors for the app. @@ -613,6 +628,13 @@ module HallucinationMetricBehavior # @return [::Google::Cloud::Ces::V1beta::EvaluationToolCallBehaviour] # Optional. Configures the default tool call behaviour for scenario # evaluations. + # @!attribute [rw] metrics_config + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig] + # Optional. Configures the default metrics for evaluations. + # @!attribute [rw] scenario_execution_mode + # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings::ScenarioExecutionMode] + # Optional. The execution mode for scenario evaluations. If not provided, + # will default to QUALITY_OPTIMIZED. class EvaluationSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -628,6 +650,18 @@ module ScenarioConversationInitiator # The agent starts the conversation. AGENT = 2 end + + # The execution mode for scenario evaluations. + module ScenarioExecutionMode + # Unspecified execution mode. Defaults to QUALITY_OPTIMIZED. + SCENARIO_EXECUTION_MODE_UNSPECIFIED = 0 + + # Quality optimized mode. + QUALITY_OPTIMIZED = 1 + + # Speed optimized mode. + SPEED_OPTIMIZED = 2 + end end # Settings for custom client certificates. @@ -651,6 +685,19 @@ class ClientCertificateSettings extend ::Google::Protobuf::MessageExts::ClassMethods end + # VPC-SC settings for the app. + # @!attribute [rw] allowed_origins + # @return [::Array<::String>] + # Optional. The allowed HTTP(s) origins that OpenAPI tools in the App are + # able to directly call when VPC Service Controls are enabled. These strings + # must match the origin exactly, including the port if specified. For + # example, "https://example.com" or "https://example.com:443". This list does + # not yet apply to Python tools that may make direct HTTP calls. + class VpcScSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Settings to describe the conversation logging behaviors for the app. # @!attribute [rw] disable_conversation_logging # @return [::Boolean] diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb index 2df90c55ee2f..a2b5bd8ccacd 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb @@ -131,22 +131,25 @@ module InputType # Unspecified input type. INPUT_TYPE_UNSPECIFIED = 0 - # The input message is text. + # Text input. INPUT_TYPE_TEXT = 1 - # The input message is audio. + # Event input. + INPUT_TYPE_EVENT = 7 + + # Audio input. INPUT_TYPE_AUDIO = 2 - # The input message is image. + # Image input. INPUT_TYPE_IMAGE = 3 - # The input message is blob file. + # Blob input. INPUT_TYPE_BLOB = 4 - # The input message is client function tool response. + # Client function tool response input. INPUT_TYPE_TOOL_RESPONSE = 5 - # The input message are variables. + # Variables input. INPUT_TYPE_VARIABLES = 6 end end diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb index fc8f4c7ede3b..c1c5ca0d6eb8 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb @@ -21,6 +21,64 @@ module Google module Cloud module Ces module V1beta + # Experiment for the deployment. + # @!attribute [rw] version_release + # @return [::Google::Cloud::Ces::V1beta::ExperimentConfig::VersionRelease] + # Optional. Version release for the experiment. + class ExperimentConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Version release for the experiment. + # @!attribute [rw] state + # @return [::Google::Cloud::Ces::V1beta::ExperimentConfig::State] + # Optional. State of the version release. + # @!attribute [rw] traffic_allocations + # @return [::Array<::Google::Cloud::Ces::V1beta::ExperimentConfig::VersionRelease::TrafficAllocation>] + # Optional. Traffic allocations for the version release. + class VersionRelease + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Traffic allocation for the version release. + # @!attribute [rw] id + # @return [::String] + # Optional. Id of the traffic allocation. + # Free format string, up to 128 characters. + # @!attribute [rw] traffic_percentage + # @return [::Integer] + # Optional. Traffic percentage of the traffic allocation. + # Must be between 0 and 100. + # @!attribute [rw] app_version + # @return [::String] + # Optional. App version of the traffic allocation. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + class TrafficAllocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # State of the experiment. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Pending state. Experiment is pending and not valid. + PENDING = 1 + + # Running state. Experiment is running and valid. + RUNNING = 2 + + # Done state. Experiment is done and no longer valid. + DONE = 3 + + # Expired state. Experiment is expired and no longer valid. + EXPIRED = 4 + end + end + # A deployment represents an immutable, queryable version of the app. # It is used to deploy an app version with a specific channel profile. # @!attribute [rw] name @@ -52,6 +110,9 @@ module V1beta # Output only. Etag used to ensure the object hasn't changed during a # read-modify-write operation. If the etag is empty, the update will # overwrite any concurrent changes. + # @!attribute [rw] experiment_config + # @return [::Google::Cloud::Ces::V1beta::ExperimentConfig] + # Optional. Experiment configuration for the deployment. class Deployment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb index 47fe0326e86d..c21e5c694ce9 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb @@ -209,6 +209,12 @@ class MetricsByTurn # Output only. The last 10 evaluation results for this evaluation. This is # only populated if include_last_ten_results is set to true in the # ListEvaluationsRequest or GetEvaluationRequest. + # @!attribute [rw] evaluation_metrics_threshold_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds] + # Optional. Overrides metrics thresholds for this specific evaluation. + # @!attribute [rw] evaluation_metrics_config_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig] + # Optional. Overrides metrics config for this specific evaluation. class Evaluation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -218,42 +224,63 @@ class Evaluation # @return [::Google::Cloud::Ces::V1beta::ToolCall] # Optional. Check that a specific tool was called with the parameters. # - # Note: The following fields are mutually exclusive: `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] tool_response # @return [::Google::Cloud::Ces::V1beta::ToolResponse] # Optional. Check that a specific tool had the expected response. # - # Note: The following fields are mutually exclusive: `tool_response`, `tool_call`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `tool_response`, `tool_call`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] agent_response # @return [::Google::Cloud::Ces::V1beta::Message] # Optional. Check that the agent responded with the correct response. The # role "agent" is implied. # - # Note: The following fields are mutually exclusive: `agent_response`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `agent_response`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] agent_transfer # @return [::Google::Cloud::Ces::V1beta::AgentTransfer] # Optional. Check that the agent transferred the conversation to a # different agent. # - # Note: The following fields are mutually exclusive: `agent_transfer`, `tool_call`, `tool_response`, `agent_response`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `agent_transfer`, `tool_call`, `tool_response`, `agent_response`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] updated_variables # @return [::Google::Protobuf::Struct] # Optional. Check that the agent updated the session variables to the # expected values. Used to also capture agent variable updates for golden # evals. # - # Note: The following fields are mutually exclusive: `updated_variables`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `updated_variables`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] mock_tool_response # @return [::Google::Cloud::Ces::V1beta::ToolResponse] # Optional. The tool response to mock, with the parameters of interest # specified. Any parameters not specified will be hallucinated by the # LLM. # - # Note: The following fields are mutually exclusive: `mock_tool_response`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `mock_tool_response`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] no_tool_calls + # @return [::Boolean] + # Optional. Check that no tools were called during this turn. + # + # Note: The following fields are mutually exclusive: `no_tool_calls`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] note # @return [::String] # Optional. A note for this requirement, useful in reporting when specific # checks fail. E.g., "Check_Payment_Tool_Called". + # @!attribute [rw] skip_evaluation + # @return [::Boolean] + # Optional. If set to true, this specific expectation will not be + # evaluated. + # @!attribute [rw] expectation_level_metrics_thresholds_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds] + # Optional. Overrides metrics at the step level. + # @!attribute [rw] agent_response_semantic_similarity_metrics_config_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::SemanticSimilarityMetricsConfig] + # Optional. Overrides for agent_response semantic similarity metrics. + # @!attribute [rw] agent_response_hallucination_metrics_config_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::HallucinationMetricsConfig] + # Optional. Overrides for agent_response hallucination metrics. + # @!attribute [rw] comparison_type + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::ComparisonType] + # Optional. The comparison type to use for the expectation check. class GoldenExpectation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -287,7 +314,14 @@ class Step # @!attribute [rw] root_span # @return [::Google::Cloud::Ces::V1beta::Span] # Optional. The root span of the golden turn for processing and maintaining - # audio information. + # audio information. The uri for the audio must contain audio saved in + # 16Khz sample rate. + # @!attribute [rw] turn_level_metrics_thresholds_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds] + # Optional. Overrides for turn-level metric thresholds. + # @!attribute [rw] hallucination_metric_behavior_override + # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::HallucinationMetricBehavior] + # Optional. Override for turn-level hallucination metric behavior. class GoldenTurn include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -297,6 +331,7 @@ class GoldenTurn # @!attribute [rw] turns # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::GoldenTurn>] # Required. The golden turns required to replay a golden conversation. + # The maximum number of allowed turns is 100. # @!attribute [rw] evaluation_expectations # @return [::Array<::String>] # Optional. The evaluation expectations to evaluate the replayed @@ -348,8 +383,8 @@ class ToolExpectation # Optional. The user facts to be used by the scenario. # @!attribute [rw] max_turns # @return [::Integer] - # Optional. The maximum number of turns to simulate. If not specified, the - # simulation will continue until the task is complete. + # Optional. The maximum number of turns to simulate. The maximum allowed + # value is 100. The default value is 100. # @!attribute [rw] rubrics # @return [::Array<::String>] # Required. The rubrics to score the scenario against. @@ -378,6 +413,9 @@ class ToolExpectation # Optional. The evaluation expectations to evaluate the conversation # produced by the simulation against. Format: # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}` + # @!attribute [rw] scenario_execution_mode + # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings::ScenarioExecutionMode] + # Optional. The execution mode for scenario evaluations. class Scenario include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -555,22 +593,29 @@ class EvaluationResult # @return [::Google::Cloud::Ces::V1beta::ToolCall] # Output only. The result of the tool call expectation. # - # Note: The following fields are mutually exclusive: `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_agent_transfer`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] observed_tool_response # @return [::Google::Cloud::Ces::V1beta::ToolResponse] # Output only. The result of the tool response expectation. # - # Note: The following fields are mutually exclusive: `observed_tool_response`, `observed_tool_call`, `observed_agent_response`, `observed_agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `observed_tool_response`, `observed_tool_call`, `observed_agent_response`, `observed_agent_transfer`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] observed_agent_response # @return [::Google::Cloud::Ces::V1beta::Message] # Output only. The result of the agent response expectation. # - # Note: The following fields are mutually exclusive: `observed_agent_response`, `observed_tool_call`, `observed_tool_response`, `observed_agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `observed_agent_response`, `observed_tool_call`, `observed_tool_response`, `observed_agent_transfer`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] observed_agent_transfer # @return [::Google::Cloud::Ces::V1beta::AgentTransfer] # Output only. The result of the agent transfer expectation. # - # Note: The following fields are mutually exclusive: `observed_agent_transfer`, `observed_tool_call`, `observed_tool_response`, `observed_agent_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `observed_agent_transfer`, `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] observed_payload + # @return [::Google::Protobuf::Struct] + # Output only. An observed custom payload. + # There are no expectations for custom payloads. This is only used for + # metrics calculation. The outcome is always SKIPPED. + # + # Note: The following fields are mutually exclusive: `observed_payload`, `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] expectation # @return [::Google::Cloud::Ces::V1beta::Evaluation::GoldenExpectation] # Output only. The expectation that was evaluated. @@ -989,6 +1034,9 @@ module ExecutionState # Evaluation result execution state is not specified. EXECUTION_STATE_UNSPECIFIED = 0 + # Evaluation result execution is queued. + QUEUED = 5 + # Evaluation result execution is running. RUNNING = 1 @@ -997,6 +1045,9 @@ module ExecutionState # Evaluation result execution failed due to an internal error. ERROR = 3 + + # Evaluation result execution was cancelled. + CANCELLED = 4 end end @@ -1098,6 +1149,11 @@ module ExecutionState # @!attribute [r] golden_run_method # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod] # Output only. The method used to run the evaluation. + # @!attribute [r] operation + # @return [::String] + # Output only. The operation that created this evaluation run. + # Format: + # `projects/{project}/locations/{location}/operations/{operation}` class EvaluationRun include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1124,6 +1180,10 @@ class EvaluationRun # Output only. Number of completed evaluation results with an outcome of # PASS. (EvaluationResult.execution_state is COMPLETED and # EvaluationResult.evaluation_status is PASS). + # @!attribute [r] cancelled_count + # @return [::Integer] + # Output only. Number of evaluation results that were cancelled. + # (EvaluationResult.execution_state is CANCELLED). class Progress include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1178,6 +1238,9 @@ module EvaluationRunState # Evaluation run state is not specified. EVALUATION_RUN_STATE_UNSPECIFIED = 0 + # Indicates the evaluation run is queued. + QUEUED = 5 + # Evaluation run is running. RUNNING = 1 @@ -1186,6 +1249,9 @@ module EvaluationRunState # The evaluation run has an error. ERROR = 3 + + # Evaluation run was cancelled. + CANCELLED = 4 end end @@ -1376,6 +1442,9 @@ module EvaluationChannel # @!attribute [r] session_id # @return [::String] # Output only. The session ID for the conversation that caused the error. + # @!attribute [r] user_facing_error_message + # @return [::String] + # Output only. The user facing error message. class EvaluationErrorInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb similarity index 100% rename from owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb rename to google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb index e1a5558022c7..b828bab0506a 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb @@ -21,6 +21,28 @@ module Google module Cloud module Ces module V1beta + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics EvaluationService.RunEvaluationResultMetrics}. + # @!attribute [rw] evaluation_result_id + # @return [::String] + # Required. The evaluation result to run metrics for. + # Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}` + class RunEvaluationResultMetricsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics EvaluationService.RunEvaluationResultMetrics}. + # @!attribute [r] status + # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] + # Output only. The status of the evaluation result metrics calculation. + class RunEvaluationResultMetricsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Response message for # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation EvaluationService.RunEvaluation}. # @!attribute [rw] evaluation_run @@ -964,8 +986,26 @@ class FailedEvaluationsEntry end end + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results EvaluationService.ExportEvaluationResults}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the evaluation to export evaluation results + # from. Format: + # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The resource names of the evaluation results to export. + # @!attribute [rw] export_options + # @return [::Google::Cloud::Ces::V1beta::ExportOptions] + # Optional. The export options for the evaluation results. + class ExportEvaluationResultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Response message for - # [EvaluationService.ExportEvaluationResults][google.cloud.ces.v1beta.EvaluationService.ExportEvaluationResults]. + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results EvaluationService.ExportEvaluationResults}. # @!attribute [rw] evaluation_results_content # @return [::String] # The content of the exported Evaluation Results. This will be populated if @@ -984,8 +1024,25 @@ class ExportEvaluationResultsResponse extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request message for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs EvaluationService.ExportEvaluationRuns}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the app to export evaluation runs from. + # Format: `projects/{project}/locations/{location}/apps/{app}` + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The resource names of the evaluation runs to export. + # @!attribute [rw] export_options + # @return [::Google::Cloud::Ces::V1beta::ExportOptions] + # Optional. The export options for the evaluation runs. + class ExportEvaluationRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Response message for - # [EvaluationService.ExportEvaluationRuns][google.cloud.ces.v1beta.EvaluationService.ExportEvaluationRuns]. + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs EvaluationService.ExportEvaluationRuns}. # @!attribute [rw] evaluation_runs_content # @return [::String] # The content of the exported Evaluation Runs. This will be populated if @@ -1003,6 +1060,27 @@ class ExportEvaluationRunsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Operation metadata for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs EvaluationService.ExportEvaluationRuns}. + class ExportEvaluationRunsOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation metadata for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results EvaluationService.ExportEvaluationResults}. + class ExportEvaluationResultsOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation metadata for + # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics EvaluationService.RunEvaluationResultMetrics}. + class RunEvaluationResultMetricsOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb index 3a38b2959b4f..46c6ac1df076 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb @@ -27,6 +27,10 @@ module V1beta # @!attribute [rw] name # @return [::String] # Required. The name of the MCP tool. + # @!attribute [rw] name_override + # @return [::String] + # Optional. The name override of the MCP tool. + # This is populated if the name was overridden by a Toolset override. # @!attribute [rw] description # @return [::String] # Optional. The description of the MCP tool. @@ -66,6 +70,10 @@ module V1beta # can be set in the session variables. See # https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection # for more details. + # @!attribute [r] state + # @return [::Google::Cloud::Ces::V1beta::McpTool::State] + # Output only. The dynamic availability state of the tool on the external + # server. class McpTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -78,6 +86,23 @@ class CustomHeadersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Represents the dynamic availability state of the tool. + module State + # Default state. + STATE_UNSPECIFIED = 0 + + # The tool is available and actively offered by the server. + ACTIVE = 1 + + # The tool is configured or pinned, but currently not offered by the + # server. + INACTIVE = 2 + + # The tool exists on the server, but does not match the version on the + # server. + STALE = 3 + end end end end diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb index 94c5a6fa8b83..c2673b2839d2 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb @@ -52,6 +52,11 @@ module V1beta # can be set in the session variables. See # https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection # for more details. + # @!attribute [rw] tool_overrides + # @return [::Array<::Google::Cloud::Ces::V1beta::McpToolOverride>] + # Optional. Overrides for individual tools within this toolset. + # This allows overriding specific details like descriptions, names, + # or pinning the tools' states so they aren't fully dynamic. class McpToolset include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -65,6 +70,48 @@ class CustomHeadersEntry extend ::Google::Protobuf::MessageExts::ClassMethods end end + + # Overrides associated with a given tool in a Toolset. + # This enables "pinning" or "overriding" of tool definitions from the external + # dynamic server. + # @!attribute [rw] tool + # @return [::String] + # Required. The original name of the tool as it is emitted by the MCP server. + # @!attribute [rw] name_override + # @return [::String] + # Optional. If present, this tool uses this name in the Agent instead of the + # original name. This is primarily used as an alias if the MCP server offers + # poorly named tools. + # @!attribute [rw] description_override + # @return [::String] + # Optional. If present, this tool uses this description instead of the + # original description from the server. + # @!attribute [r] snapshot + # @return [::Google::Cloud::Ces::V1beta::McpToolDefinition] + # Output only. If present, this tool is "Pinned" and uses the snapshot values + # as fallbacks if the server becomes temporarily unavailable or if no + # Override is present. + class McpToolOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for a tool's core definition elements that are snapshot. + # Schemas in the snapshot are used as-is and cannot be overridden. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the MCP tool. This can be overridden + # by `description_override` in `McpToolOverride`. + # @!attribute [r] input_schema + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Output only. The schema of the input arguments of the MCP tool. + # @!attribute [r] output_schema + # @return [::Google::Cloud::Ces::V1beta::Schema] + # Output only. The schema of the output arguments of the MCP tool. + class McpToolDefinition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end end end diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb index 4d1b8c3957c0..a3178c54e15b 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb @@ -34,6 +34,9 @@ module V1beta # @return [::String] # Output only. The description of the Python function, parsed from the python # code's docstring. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] + # Optional. Service Directory configuration for the tool. class PythonFunction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb index d65be8feb814..8bf6c2976597 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb @@ -207,6 +207,9 @@ class Citations # @!attribute [rw] text # @return [::String] # Text used for citation. + # @!attribute [rw] requires_attribution + # @return [::Boolean] + # Whether this citation requires attribution to be shown to the end users. class CitedChunk include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb index 90086f0679b2..f2435d73822d 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb @@ -27,58 +27,63 @@ module V1beta # @return [::Google::Cloud::Ces::V1beta::ClientFunction] # Optional. The client function. # - # Note: The following fields are mutually exclusive: `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] open_api_tool # @return [::Google::Cloud::Ces::V1beta::OpenApiTool] # Optional. The open API tool. # - # Note: The following fields are mutually exclusive: `open_api_tool`, `client_function`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `open_api_tool`, `client_function`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] google_search_tool # @return [::Google::Cloud::Ces::V1beta::GoogleSearchTool] # Optional. The google search tool. # - # Note: The following fields are mutually exclusive: `google_search_tool`, `client_function`, `open_api_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `google_search_tool`, `client_function`, `open_api_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] connector_tool # @return [::Google::Cloud::Ces::V1beta::ConnectorTool] # Optional. The Integration Connector tool. # - # Note: The following fields are mutually exclusive: `connector_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `connector_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] data_store_tool # @return [::Google::Cloud::Ces::V1beta::DataStoreTool] # Optional. The data store tool. # - # Note: The following fields are mutually exclusive: `data_store_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `data_store_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] python_function # @return [::Google::Cloud::Ces::V1beta::PythonFunction] # Optional. The python function tool. # - # Note: The following fields are mutually exclusive: `python_function`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `python_function`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] mcp_tool # @return [::Google::Cloud::Ces::V1beta::McpTool] # Optional. The MCP tool. An MCP tool cannot be created or updated directly # and is managed by the MCP toolset. # - # Note: The following fields are mutually exclusive: `mcp_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `mcp_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] file_search_tool # @return [::Google::Cloud::Ces::V1beta::FileSearchTool] # Optional. The file search tool. # - # Note: The following fields are mutually exclusive: `file_search_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `file_search_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] system_tool # @return [::Google::Cloud::Ces::V1beta::SystemTool] # Optional. The system tool. # - # Note: The following fields are mutually exclusive: `system_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `system_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] agent_tool # @return [::Google::Cloud::Ces::V1beta::AgentTool] # Optional. The agent tool. # - # Note: The following fields are mutually exclusive: `agent_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `agent_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] widget_tool # @return [::Google::Cloud::Ces::V1beta::WidgetTool] # Optional. The widget tool. # - # Note: The following fields are mutually exclusive: `widget_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `widget_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] remote_agent_tool + # @return [::Google::Cloud::Ces::V1beta::RemoteAgentTool] + # Optional. The remote agent tool. + # + # Note: The following fields are mutually exclusive: `remote_agent_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] name # @return [::String] # Identifier. The resource name of the tool. Format: @@ -98,6 +103,11 @@ module V1beta # @!attribute [rw] execution_type # @return [::Google::Cloud::Ces::V1beta::ExecutionType] # Optional. The execution type of the tool. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Optional. The timeout for the tool execution. If not set, the default + # timeout is 30 seconds for `SYNCHRONOUS` tools and 60 seconds for + # `ASYNCHRONOUS` tools. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. Timestamp when the tool was created. diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb index 23c1d7ee1dbd..01584c536336 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb @@ -88,6 +88,13 @@ class ExecuteToolRequest # @!attribute [rw] variables # @return [::Google::Protobuf::Struct] # The variable values at the end of the tool execution. + # @!attribute [rw] citations + # @return [::Google::Cloud::Ces::V1beta::Citations] + # Citations that provide the source information for the tool's execution. + # @!attribute [rw] google_search_suggestions + # @return [::Google::Cloud::Ces::V1beta::GoogleSearchSuggestions] + # The suggestions returned from Google Search as a result of invoking the + # Google Search Tool during the tool execution. class ExecuteToolResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -153,6 +160,11 @@ class RetrieveToolSchemaResponse # @return [::Array<::String>] # Optional. The identifiers of the tools to retrieve from the toolset. # If empty, all tools in the toolset will be returned. + # @!attribute [rw] bypass_persistence_config + # @return [::Boolean] + # Optional. If true, the returned tools will contain raw descriptions and + # schemas directly from the server, bypassing any stored persistence + # configurations (overrides/snapshots). class RetrieveToolsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb index 74b728e7ccb7..40d4a164da67 100644 --- a/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb +++ b/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb @@ -45,10 +45,46 @@ module V1beta # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping] # Optional. The mapping that defines how data from a source tool is mapped to # the widget's input parameters. + # @!attribute [rw] text_response_config + # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig] + # Optional. Configuration for always-included text responses. class WidgetTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + # Configuration for the text response returned with the widget. + # @!attribute [rw] type + # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig::Type] + # Optional. The strategy for providing the text response. + # @!attribute [rw] static_text + # @return [::String] + # Optional. The static text response to return when type is STATIC. + # @!attribute [rw] text_response_instruction + # @return [::String] + # Optional. Instruction for the LLM on how to generate the text response. + # Used as the description for the text response parameter if type is + # LLM_GENERATED. + class TextResponseConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines how the text response is produced. + module Type + # Unspecified type. + TYPE_UNSPECIFIED = 0 + + # The LLM dynamically decides whether to generate a text response + # alongside the widget based on the conversation context. + NONE = 1 + + # The LLM is explicitly required to generate a text response. + LLM_GENERATED = 2 + + # A pre-defined static text response is always used. + STATIC = 3 + end + end + # Configuration for mapping data from a source tool to the widget's input # parameters. # @!attribute [rw] source_tool_name diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_results.rb b/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_results.rb similarity index 100% rename from owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_results.rb rename to google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_results.rb diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_runs.rb b/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_runs.rb similarity index 100% rename from owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_runs.rb rename to google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluation_runs.rb diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation_result_metrics.rb b/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation_result_metrics.rb similarity index 100% rename from owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation_result_metrics.rb rename to google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation_result_metrics.rb diff --git a/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json b/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json index e0dc75eda289..ea7c3ee5744f 100644 --- a/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json +++ b/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json @@ -3451,6 +3451,126 @@ } ] }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ExportEvaluationRuns_sync", + "title": "Snippet for the export_evaluation_runs call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs.", + "file": "evaluation_service/export_evaluation_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_evaluation_runs", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ExportEvaluationRuns", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ExportEvaluationRuns", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_ExportEvaluationResults_sync", + "title": "Snippet for the export_evaluation_results call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results.", + "file": "evaluation_service/export_evaluation_results.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_evaluation_results", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "ExportEvaluationResults", + "full_name": "google.cloud.ces.v1beta.EvaluationService.ExportEvaluationResults", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "ces_v1beta_generated_EvaluationService_RunEvaluationResultMetrics_sync", + "title": "Snippet for the run_evaluation_result_metrics call in the EvaluationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics.", + "file": "evaluation_service/run_evaluation_result_metrics.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_evaluation_result_metrics", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "EvaluationService::Client", + "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" + }, + "method": { + "short_name": "RunEvaluationResultMetrics", + "full_name": "google.cloud.ces.v1beta.EvaluationService.RunEvaluationResultMetrics", + "service": { + "short_name": "EvaluationService", + "full_name": "google.cloud.ces.v1beta.EvaluationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "ces_v1beta_generated_ToolService_ExecuteTool_sync", "title": "Snippet for the execute_tool call in the ToolService service", diff --git a/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb b/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb index 942003554c7c..5d266592e5a2 100644 --- a/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb +++ b/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb @@ -1872,6 +1872,172 @@ def test_export_evaluations end end + def test_export_evaluation_runs + # 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" + names = ["hello world"] + export_options = {} + + export_evaluation_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_export_evaluation_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_evaluation_runs_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_evaluation_runs parent: parent, names: names, export_options: export_options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_evaluation_runs ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_evaluation_runs(::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_evaluation_runs_client_stub.call_count + end + end + end + + def test_export_evaluation_results + # 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" + names = ["hello world"] + export_options = {} + + export_evaluation_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_export_evaluation_results_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_evaluation_results_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_evaluation_results({ parent: parent, names: names, export_options: export_options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_evaluation_results parent: parent, names: names, export_options: export_options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_evaluation_results ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_evaluation_results({ parent: parent, names: names, export_options: export_options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_evaluation_results(::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_evaluation_results_client_stub.call_count + end + end + end + + def test_run_evaluation_result_metrics + # 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. + evaluation_result_id = "hello world" + + run_evaluation_result_metrics_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_run_evaluation_result_metrics_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_evaluation_result_metrics_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_evaluation_result_metrics evaluation_result_id: evaluation_result_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_evaluation_result_metrics ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_evaluation_result_metrics(::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_evaluation_result_metrics_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb b/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb index 6ab6d38bd361..021883c5e66d 100644 --- a/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb +++ b/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb @@ -2108,6 +2108,203 @@ def test_export_evaluations end end + def test_export_evaluation_runs + # 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" + names = ["hello world"] + export_options = {} + + export_evaluation_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_evaluation_runs, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ExportOptions), request["export_options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_evaluation_runs_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }) 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.export_evaluation_runs parent: parent, names: names, export_options: export_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 + client.export_evaluation_runs ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options) 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.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }, 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.export_evaluation_runs(::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_evaluation_runs_client_stub.call_rpc_count + end + end + + def test_export_evaluation_results + # 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" + names = ["hello world"] + export_options = {} + + export_evaluation_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_evaluation_results, name + assert_kind_of ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ExportOptions), request["export_options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_evaluation_results_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_evaluation_results({ parent: parent, names: names, export_options: export_options }) 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.export_evaluation_results parent: parent, names: names, export_options: export_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 + client.export_evaluation_results ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options) 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.export_evaluation_results({ parent: parent, names: names, export_options: export_options }, 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.export_evaluation_results(::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_evaluation_results_client_stub.call_rpc_count + end + end + + def test_run_evaluation_result_metrics + # 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. + evaluation_result_id = "hello world" + + run_evaluation_result_metrics_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_evaluation_result_metrics, name + assert_kind_of ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, request + assert_equal "hello world", request["evaluation_result_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_evaluation_result_metrics_client_stub do + # Create client + client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics(::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_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, run_evaluation_result_metrics_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb b/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb index 90d6815bac5a..07aa71523536 100644 --- a/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb +++ b/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb @@ -201,6 +201,7 @@ def test_retrieve_tools # Create request parameters for a unary method. toolset = "hello world" tool_ids = ["hello world"] + bypass_persistence_config = true retrieve_tools_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -216,27 +217,27 @@ def test_retrieve_tools end # Use hash object - client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids }) do |_result, response| + client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.retrieve_tools toolset: toolset, tool_ids: tool_ids do |_result, response| + client.retrieve_tools toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.retrieve_tools ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids) do |_result, response| + client.retrieve_tools ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids }, call_options) do |_result, response| + client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.retrieve_tools(::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids), call_options) do |_result, response| + client.retrieve_tools(::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb b/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb index 6ce0f5ec78e1..be227e6c59fb 100644 --- a/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb +++ b/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb @@ -202,12 +202,14 @@ def test_retrieve_tools # Create request parameters for a unary method. toolset = "hello world" tool_ids = ["hello world"] + bypass_persistence_config = true retrieve_tools_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :retrieve_tools, name assert_kind_of ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest, request assert_equal "hello world", request["toolset"] assert_equal ["hello world"], request["tool_ids"] + assert_equal true, request["bypass_persistence_config"] refute_nil options end @@ -218,31 +220,31 @@ def test_retrieve_tools end # Use hash object - client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids }) do |response, operation| + client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.retrieve_tools toolset: toolset, tool_ids: tool_ids do |response, operation| + client.retrieve_tools toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.retrieve_tools ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids) do |response, operation| + client.retrieve_tools ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids }, grpc_options) do |response, operation| + client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.retrieve_tools(::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids), grpc_options) do |response, operation| + client.retrieve_tools(::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/.gitignore b/owl-bot-staging/google-cloud-ces-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-ces-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-ces-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-ces-v1beta/.repo-metadata.json deleted file mode 100644 index a660632c3be2..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "ces.googleapis.com", - "api_shortname": "ces", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-ces-v1beta/latest", - "distribution_name": "google-cloud-ces-v1beta", - "is_cloud": true, - "language": "ruby", - "name": "ces", - "name_pretty": "Gemini Enterprise for Customer Experience V1BETA API", - "product_documentation": "https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-ces-v1beta is the official client library for the Gemini Enterprise for Customer Experience V1BETA API. Note that google-cloud-ces-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-ces instead. See the readme for more details.", - "ruby-cloud-product-url": "https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-ces-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-ces-v1beta/.rubocop.yml deleted file mode 100644 index aa5c8ff13938..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-ces-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-ces-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-ces-v1beta/.toys.rb b/owl-bot-staging/google-cloud-ces-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/.yardopts b/owl-bot-staging/google-cloud-ces-v1beta/.yardopts deleted file mode 100644 index 3407f27b84f3..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Gemini Enterprise for Customer Experience 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-ces-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-ces-v1beta/AUTHENTICATION.md deleted file mode 100644 index 023e59ec5159..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-ces-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-ces-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/ces/v1beta" - -client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/ces/v1beta" - -::Google::Cloud::Ces::V1beta::SessionService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Ces::V1beta::SessionService::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-ces-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/ces/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Ces::V1beta::SessionService::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-ces-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-ces-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-ces-v1beta/Gemfile b/owl-bot-staging/google-cloud-ces-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-ces-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-ces-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-ces-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-ces-v1beta/README.md b/owl-bot-staging/google-cloud-ces-v1beta/README.md deleted file mode 100644 index da8aa2b3a2a8..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Gemini Enterprise for Customer Experience V1BETA API - -API Client library for the Gemini Enterprise for Customer Experience V1BETA API - -google-cloud-ces-v1beta is the official client library for the Gemini Enterprise for Customer Experience 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 Gemini Enterprise for Customer Experience V1BETA API. Most users should consider using -the main client gem, -[google-cloud-ces](https://rubygems.org/gems/google-cloud-ces). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-ces-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/ces.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/ces/v1beta" - -client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new -request = ::Google::Cloud::Ces::V1beta::RunSessionRequest.new # (request fields as keyword arguments...) -response = client.run_session request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-ces-v1beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps) -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/ces/v1beta" -require "logger" - -client = ::Google::Cloud::Ces::V1beta::SessionService::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-ces`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-ces-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-ces`. -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-ces-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-ces-v1beta/Rakefile b/owl-bot-staging/google-cloud-ces-v1beta/Rakefile deleted file mode 100644 index 024868ac1099..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-ces-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/ces/v1beta/session_service/credentials" - ::Google::Cloud::Ces::V1beta::SessionService::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-ces-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-ces-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-ces-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-ces-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-ces-v1beta" - header "google-cloud-ces-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-ces-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-ces-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-ces-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-ces-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-ces-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-ces-v1beta/gapic_metadata.json deleted file mode 100644 index 09270bb1a53c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/gapic_metadata.json +++ /dev/null @@ -1,519 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.ces.v1beta", - "libraryPackage": "::Google::Cloud::Ces::V1beta", - "services": { - "SessionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Ces::V1beta::SessionService::Client", - "rpcs": { - "RunSession": { - "methods": [ - "run_session" - ] - }, - "StreamRunSession": { - "methods": [ - "stream_run_session" - ] - }, - "BidiRunSession": { - "methods": [ - "bidi_run_session" - ] - } - } - } - } - }, - "AgentService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Ces::V1beta::AgentService::Client", - "rpcs": { - "ListApps": { - "methods": [ - "list_apps" - ] - }, - "GetApp": { - "methods": [ - "get_app" - ] - }, - "CreateApp": { - "methods": [ - "create_app" - ] - }, - "UpdateApp": { - "methods": [ - "update_app" - ] - }, - "DeleteApp": { - "methods": [ - "delete_app" - ] - }, - "ExportApp": { - "methods": [ - "export_app" - ] - }, - "ImportApp": { - "methods": [ - "import_app" - ] - }, - "GetSecuritySettings": { - "methods": [ - "get_security_settings" - ] - }, - "UpdateSecuritySettings": { - "methods": [ - "update_security_settings" - ] - }, - "ListAgents": { - "methods": [ - "list_agents" - ] - }, - "GetAgent": { - "methods": [ - "get_agent" - ] - }, - "CreateAgent": { - "methods": [ - "create_agent" - ] - }, - "UpdateAgent": { - "methods": [ - "update_agent" - ] - }, - "DeleteAgent": { - "methods": [ - "delete_agent" - ] - }, - "ListExamples": { - "methods": [ - "list_examples" - ] - }, - "GetExample": { - "methods": [ - "get_example" - ] - }, - "CreateExample": { - "methods": [ - "create_example" - ] - }, - "UpdateExample": { - "methods": [ - "update_example" - ] - }, - "DeleteExample": { - "methods": [ - "delete_example" - ] - }, - "ListTools": { - "methods": [ - "list_tools" - ] - }, - "GetTool": { - "methods": [ - "get_tool" - ] - }, - "ListConversations": { - "methods": [ - "list_conversations" - ] - }, - "GetConversation": { - "methods": [ - "get_conversation" - ] - }, - "DeleteConversation": { - "methods": [ - "delete_conversation" - ] - }, - "BatchDeleteConversations": { - "methods": [ - "batch_delete_conversations" - ] - }, - "CreateTool": { - "methods": [ - "create_tool" - ] - }, - "UpdateTool": { - "methods": [ - "update_tool" - ] - }, - "DeleteTool": { - "methods": [ - "delete_tool" - ] - }, - "ListGuardrails": { - "methods": [ - "list_guardrails" - ] - }, - "GetGuardrail": { - "methods": [ - "get_guardrail" - ] - }, - "CreateGuardrail": { - "methods": [ - "create_guardrail" - ] - }, - "UpdateGuardrail": { - "methods": [ - "update_guardrail" - ] - }, - "DeleteGuardrail": { - "methods": [ - "delete_guardrail" - ] - }, - "ListDeployments": { - "methods": [ - "list_deployments" - ] - }, - "GetDeployment": { - "methods": [ - "get_deployment" - ] - }, - "CreateDeployment": { - "methods": [ - "create_deployment" - ] - }, - "UpdateDeployment": { - "methods": [ - "update_deployment" - ] - }, - "DeleteDeployment": { - "methods": [ - "delete_deployment" - ] - }, - "ListToolsets": { - "methods": [ - "list_toolsets" - ] - }, - "GetToolset": { - "methods": [ - "get_toolset" - ] - }, - "CreateToolset": { - "methods": [ - "create_toolset" - ] - }, - "UpdateToolset": { - "methods": [ - "update_toolset" - ] - }, - "DeleteToolset": { - "methods": [ - "delete_toolset" - ] - }, - "ListAppVersions": { - "methods": [ - "list_app_versions" - ] - }, - "GetAppVersion": { - "methods": [ - "get_app_version" - ] - }, - "CreateAppVersion": { - "methods": [ - "create_app_version" - ] - }, - "DeleteAppVersion": { - "methods": [ - "delete_app_version" - ] - }, - "RestoreAppVersion": { - "methods": [ - "restore_app_version" - ] - }, - "GenerateAppResource": { - "methods": [ - "generate_app_resource" - ] - }, - "ListChangelogs": { - "methods": [ - "list_changelogs" - ] - }, - "GetChangelog": { - "methods": [ - "get_changelog" - ] - } - } - } - } - }, - "EvaluationService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Ces::V1beta::EvaluationService::Client", - "rpcs": { - "RunEvaluation": { - "methods": [ - "run_evaluation" - ] - }, - "UploadEvaluationAudio": { - "methods": [ - "upload_evaluation_audio" - ] - }, - "CreateEvaluation": { - "methods": [ - "create_evaluation" - ] - }, - "GenerateEvaluation": { - "methods": [ - "generate_evaluation" - ] - }, - "ImportEvaluations": { - "methods": [ - "import_evaluations" - ] - }, - "CreateEvaluationDataset": { - "methods": [ - "create_evaluation_dataset" - ] - }, - "UpdateEvaluation": { - "methods": [ - "update_evaluation" - ] - }, - "UpdateEvaluationDataset": { - "methods": [ - "update_evaluation_dataset" - ] - }, - "DeleteEvaluation": { - "methods": [ - "delete_evaluation" - ] - }, - "DeleteEvaluationResult": { - "methods": [ - "delete_evaluation_result" - ] - }, - "DeleteEvaluationDataset": { - "methods": [ - "delete_evaluation_dataset" - ] - }, - "DeleteEvaluationRun": { - "methods": [ - "delete_evaluation_run" - ] - }, - "GetEvaluation": { - "methods": [ - "get_evaluation" - ] - }, - "GetEvaluationResult": { - "methods": [ - "get_evaluation_result" - ] - }, - "GetEvaluationDataset": { - "methods": [ - "get_evaluation_dataset" - ] - }, - "GetEvaluationRun": { - "methods": [ - "get_evaluation_run" - ] - }, - "ListEvaluations": { - "methods": [ - "list_evaluations" - ] - }, - "ListEvaluationResults": { - "methods": [ - "list_evaluation_results" - ] - }, - "ListEvaluationDatasets": { - "methods": [ - "list_evaluation_datasets" - ] - }, - "ListEvaluationRuns": { - "methods": [ - "list_evaluation_runs" - ] - }, - "ListEvaluationExpectations": { - "methods": [ - "list_evaluation_expectations" - ] - }, - "GetEvaluationExpectation": { - "methods": [ - "get_evaluation_expectation" - ] - }, - "CreateEvaluationExpectation": { - "methods": [ - "create_evaluation_expectation" - ] - }, - "UpdateEvaluationExpectation": { - "methods": [ - "update_evaluation_expectation" - ] - }, - "DeleteEvaluationExpectation": { - "methods": [ - "delete_evaluation_expectation" - ] - }, - "CreateScheduledEvaluationRun": { - "methods": [ - "create_scheduled_evaluation_run" - ] - }, - "GetScheduledEvaluationRun": { - "methods": [ - "get_scheduled_evaluation_run" - ] - }, - "ListScheduledEvaluationRuns": { - "methods": [ - "list_scheduled_evaluation_runs" - ] - }, - "UpdateScheduledEvaluationRun": { - "methods": [ - "update_scheduled_evaluation_run" - ] - }, - "DeleteScheduledEvaluationRun": { - "methods": [ - "delete_scheduled_evaluation_run" - ] - }, - "TestPersonaVoice": { - "methods": [ - "test_persona_voice" - ] - }, - "ExportEvaluations": { - "methods": [ - "export_evaluations" - ] - }, - "ExportEvaluationRuns": { - "methods": [ - "export_evaluation_runs" - ] - }, - "ExportEvaluationResults": { - "methods": [ - "export_evaluation_results" - ] - }, - "RunEvaluationResultMetrics": { - "methods": [ - "run_evaluation_result_metrics" - ] - } - } - } - } - }, - "ToolService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Ces::V1beta::ToolService::Client", - "rpcs": { - "ExecuteTool": { - "methods": [ - "execute_tool" - ] - }, - "RetrieveToolSchema": { - "methods": [ - "retrieve_tool_schema" - ] - }, - "RetrieveTools": { - "methods": [ - "retrieve_tools" - ] - } - } - } - } - }, - "WidgetService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Ces::V1beta::WidgetService::Client", - "rpcs": { - "GenerateChatToken": { - "methods": [ - "generate_chat_token" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-ces-v1beta/google-cloud-ces-v1beta.gemspec b/owl-bot-staging/google-cloud-ces-v1beta/google-cloud-ces-v1beta.gemspec deleted file mode 100644 index 88dd87d58571..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/google-cloud-ces-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/ces/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-ces-v1beta" - gem.version = Google::Cloud::Ces::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-ces-v1beta is the official client library for the Gemini Enterprise for Customer Experience V1BETA API. Note that google-cloud-ces-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-ces instead. See the readme for more details." - gem.summary = "API Client library for the Gemini Enterprise for Customer Experience 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.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google-cloud-ces-v1beta.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google-cloud-ces-v1beta.rb deleted file mode 100644 index 5232653624a9..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google-cloud-ces-v1beta.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/ces/v1beta" diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta.rb deleted file mode 100644 index fe91e91cbfaa..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/ces/v1beta/session_service" -require "google/cloud/ces/v1beta/agent_service" -require "google/cloud/ces/v1beta/evaluation_service" -require "google/cloud/ces/v1beta/tool_service" -require "google/cloud/ces/v1beta/widget_service" -require "google/cloud/ces/v1beta/version" - -module Google - module Cloud - module Ces - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/ces/v1beta" - # client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/ces/v1beta" - # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new - # - module V1beta - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/cloud/ces/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb deleted file mode 100644 index 1577f20427a2..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/agent.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/ces/v1beta/agent_transfers_pb' -require 'google/cloud/ces/v1beta/common_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n#google/cloud/ces/v1beta/agent.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/ces/v1beta/agent_transfers.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\x10\n\x05\x41gent\x12\x41\n\tllm_agent\x18\x1a \x01(\x0b\x32\'.google.cloud.ces.v1beta.Agent.LlmAgentB\x03\xe0\x41\x01H\x00\x12\\\n\x17remote_dialogflow_agent\x18\x1b \x01(\x0b\x32\x34.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgentB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0emodel_settings\x18\x04 \x01(\x0b\x32&.google.cloud.ces.v1beta.ModelSettingsB\x03\xe0\x41\x01\x12\x18\n\x0binstruction\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12.\n\x05tools\x18\x07 \x03(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x36\n\x0c\x63hild_agents\x18\x08 \x03(\tB \xe0\x41\x01\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x46\n\x16\x62\x65\x66ore_agent_callbacks\x18\x12 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x61\x66ter_agent_callbacks\x18\x13 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x46\n\x16\x62\x65\x66ore_model_callbacks\x18\x14 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x61\x66ter_model_callbacks\x18\x15 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x45\n\x15\x62\x65\x66ore_tool_callbacks\x18\x16 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x44\n\x14\x61\x66ter_tool_callbacks\x18\x17 \x03(\x0b\x32!.google.cloud.ces.v1beta.CallbackB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\nguardrails\x18\x11 \x03(\tB$\xe0\x41\x01\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12\x0c\n\x04\x65tag\x18\x18 \x01(\t\x12\x42\n\x08toolsets\x18\x1c \x03(\x0b\x32+.google.cloud.ces.v1beta.Agent.AgentToolsetB\x03\xe0\x41\x01\x12\x1e\n\x11generated_summary\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x0etransfer_rules\x18\x1e \x03(\x0b\x32%.google.cloud.ces.v1beta.TransferRuleB\x03\xe0\x41\x01\x12\x1e\n\x11validation_errors\x18 \x03(\tB\x03\xe0\x41\x03\x1a\n\n\x08LlmAgent\x1a\xcd\x04\n\x15RemoteDialogflowAgent\x12@\n\x05\x61gent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)dialogflow.googleapis.com/DialogflowAgent\x12\x14\n\x07\x66low_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65nvironment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12s\n\x16input_variable_mapping\x18\x04 \x03(\x0b\x32N.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgent.InputVariableMappingEntryB\x03\xe0\x41\x01\x12u\n\x17output_variable_mapping\x18\x05 \x03(\x0b\x32O.google.cloud.ces.v1beta.Agent.RemoteDialogflowAgent.OutputVariableMappingEntryB\x03\xe0\x41\x01\x12\x33\n&respect_response_interruption_settings\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16language_code_variable\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19InputVariableMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a<\n\x1aOutputVariableMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aZ\n\x0c\x41gentToolset\x12\x33\n\x07toolset\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x15\n\x08tool_ids\x18\x04 \x03(\tB\x03\xe0\x41\x01:o\xea\x41l\n\x18\x63\x65s.googleapis.com/Agent\x12\x41projects/{project}/locations/{location}/apps/{app}/agents/{agent}*\x06\x61gents2\x05\x61gentB\x0c\n\nagent_typeB\xc0\x01\n\x1b\x63om.google.cloud.ces.v1betaB\nAgentProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41\x63\n)dialogflow.googleapis.com/DialogflowAgent\x12\x36projects/{project}/locations/{location}/agents/{agent}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - Agent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Agent").msgclass - Agent::LlmAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Agent.LlmAgent").msgclass - Agent::RemoteDialogflowAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Agent.RemoteDialogflowAgent").msgclass - Agent::AgentToolset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Agent.AgentToolset").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service.rb deleted file mode 100644 index ca09970d26c1..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/version" - -require "google/cloud/ces/v1beta/agent_service/credentials" -require "google/cloud/ces/v1beta/agent_service/paths" -require "google/cloud/ces/v1beta/agent_service/operations" -require "google/cloud/ces/v1beta/agent_service/client" -require "google/cloud/ces/v1beta/agent_service/rest" - -module Google - module Cloud - module Ces - module V1beta - ## - # The service that manages agent-related resources in Gemini Enterprise for - # Customer Engagement (CES). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/ces/v1beta/agent_service" - # client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/ces/v1beta/agent_service/rest" - # client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - module AgentService - end - end - end - end -end - -helper_path = ::File.join __dir__, "agent_service", "helpers.rb" -require "google/cloud/ces/v1beta/agent_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb deleted file mode 100644 index 3e47dd6aa565..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/client.rb +++ /dev/null @@ -1,5639 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/agent_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module Ces - module V1beta - module AgentService - ## - # Client for the AgentService service. - # - # The service that manages agent-related resources in Gemini Enterprise for - # Customer Engagement (CES). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :agent_service_stub - - ## - # Configure the AgentService Client class. - # - # See {::Google::Cloud::Ces::V1beta::AgentService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AgentService clients - # ::Google::Cloud::Ces::V1beta::AgentService::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", "Ces", "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 = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AgentService 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::Ces::V1beta::AgentService::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 - @agent_service_stub.universe_domain - end - - ## - # Create a new AgentService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AgentService 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/ces/v1beta/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 - - @agent_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Ces::V1beta::AgentService::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 - ) - - @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 = @agent_service_stub.endpoint - config.universe_domain = @agent_service_stub.universe_domain - config.logger = @agent_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Ces::V1beta::AgentService::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 - @agent_service_stub.logger - end - - # Service calls - - ## - # Lists apps in the given project and location. - # - # @overload list_apps(request, options = nil) - # Pass arguments to `list_apps` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListAppsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListAppsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_apps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_apps` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location to list apps from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListAppsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_apps AgentService.ListApps} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the apps. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::App>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::App>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListAppsRequest.new - # - # # Call the list_apps method. - # result = client.list_apps 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::Ces::V1beta::App. - # p item - # end - # - def list_apps request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAppsRequest - - # Converts hash and nil to 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_apps.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_apps.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_apps.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :list_apps, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_apps, 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 the specified app. - # - # @overload get_app(request, options = nil) - # Pass arguments to `get_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app(name: nil) - # Pass arguments to `get_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::App] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::App] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetAppRequest.new - # - # # Call the get_app method. - # result = client.get_app request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::App. - # p result - # - def get_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAppRequest - - # Converts hash and nil to 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_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :get_app, 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 app in the given project and location. - # - # @overload create_app(request, options = nil) - # Pass arguments to `create_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app(parent: nil, app_id: nil, app: nil) - # Pass arguments to `create_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location to create an app in. - # @param app_id [::String] - # Optional. The ID to use for the app, which will become the final component - # of the app's resource name. If not provided, a unique ID will be - # automatically assigned for the app. - # @param app [::Google::Cloud::Ces::V1beta::App, ::Hash] - # Required. The app to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateAppRequest.new - # - # # Call the create_app method. - # result = client.create_app 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_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAppRequest - - # Converts hash and nil to 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_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :create_app, 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 specified app. - # - # @overload update_app(request, options = nil) - # Pass arguments to `update_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app(app: nil, update_mask: nil) - # Pass arguments to `update_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param app [::Google::Cloud::Ces::V1beta::App, ::Hash] - # Required. The app to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::App] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::App] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateAppRequest.new - # - # # Call the update_app method. - # result = client.update_app request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::App. - # p result - # - def update_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateAppRequest - - # Converts hash and nil to 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_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.app&.name - header_params["app.name"] = request.app.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_app.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :update_app, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified app. - # - # @overload delete_app(request, options = nil) - # Pass arguments to `delete_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app(name: nil, etag: nil) - # Pass arguments to `delete_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app to delete. - # @param etag [::String] - # Optional. The current etag of the app. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the app, deletion will be blocked and an - # ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteAppRequest.new - # - # # Call the delete_app method. - # result = client.delete_app 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_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAppRequest - - # Converts hash and nil to 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_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :delete_app, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports the specified app. - # - # @overload export_app(request, options = nil) - # Pass arguments to `export_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ExportAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ExportAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_app(name: nil, export_format: nil, gcs_uri: nil, app_version: nil) - # Pass arguments to `export_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app to export. - # @param export_format [::Google::Cloud::Ces::V1beta::ExportAppRequest::ExportFormat] - # Required. The format to export the app in. - # @param gcs_uri [::String] - # Optional. The [Google Cloud - # Storage](https://cloud.google.com/storage/docs/) URI to which to export the - # app. The format of this URI must be `gs:///`. The - # exported app archive will be written directly to the specified GCS object. - # @param app_version [::String] - # Optional. The resource name of the app version to export. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ExportAppRequest.new - # - # # Call the export_app method. - # result = client.export_app request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportAppRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.export_app.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :export_app, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports the specified app. - # - # @overload import_app(request, options = nil) - # Pass arguments to `import_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ImportAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ImportAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_app(gcs_uri: nil, app_content: nil, parent: nil, display_name: nil, app_id: nil, import_options: nil, ignore_app_lock: nil) - # Pass arguments to `import_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_uri [::String] - # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - # from which to import app. The format of this URI must be - # `gs:///`. - # - # Note: The following parameters are mutually exclusive: `gcs_uri`, `app_content`. 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 app_content [::String] - # Raw bytes representing the compressed zip file with the app folder - # structure. - # - # Note: The following parameters are mutually exclusive: `app_content`, `gcs_uri`. 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 parent [::String] - # Required. The parent resource name with the location of the app to import. - # @param display_name [::String] - # Optional. The display name of the app to import. - # * If the app is created on import, and the display name is specified, - # the imported app will use this display name. If a conflict is detected - # with an existing app, a timestamp will be appended to the display name - # to make it unique. - # * If the app is a reimport, this field should not be set. Providing a - # display name during reimport will result in an INVALID_ARGUMENT error. - # @param app_id [::String] - # Optional. The ID to use for the imported app. - # * If not specified, a unique ID will be automatically assigned for - # the app. - # * Otherwise, the imported app will use this ID as the final component of - # its resource name. If an app with the same ID already exists at the - # specified location in the project, the content of the existing app will be - # replaced. - # @param import_options [::Google::Cloud::Ces::V1beta::ImportAppRequest::ImportOptions, ::Hash] - # Optional. Options governing the import process for the app. - # @param ignore_app_lock [::Boolean] - # Optional. Flag for overriding the app lock during import. - # If set to true, the import process will ignore the app lock. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ImportAppRequest.new - # - # # Call the import_app method. - # result = client.import_app request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ImportAppRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.import_app.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :import_app, 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 - - ## - # Retrieves the security settings for the project and location. - # - # @overload get_security_settings(request, options = nil) - # Pass arguments to `get_security_settings` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_security_settings(name: nil) - # Pass arguments to `get_security_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the security settings to retrieve. - # Format: `projects/{project}/locations/{location}/securitySettings` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::SecuritySettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new - # - # # Call the get_security_settings method. - # result = client.get_security_settings request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. - # p result - # - def get_security_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest - - # Converts hash and nil to 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_security_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_security_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_security_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :get_security_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the security settings for the project and location. - # - # @overload update_security_settings(request, options = nil) - # Pass arguments to `update_security_settings` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_security_settings(security_settings: nil, update_mask: nil) - # Pass arguments to `update_security_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_settings [::Google::Cloud::Ces::V1beta::SecuritySettings, ::Hash] - # Required. The security settings to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::SecuritySettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new - # - # # Call the update_security_settings method. - # result = client.update_security_settings request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. - # p result - # - def update_security_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest - - # Converts hash and nil to 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_security_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.security_settings&.name - header_params["security_settings.name"] = request.security_settings.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_security_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_security_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :update_security_settings, 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 agents in the given app. - # - # @overload list_agents(request, options = nil) - # Pass arguments to `list_agents` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListAgentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListAgentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_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. The resource name of the app to list agents from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListAgentsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_agents AgentService.ListAgents} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the agents. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Agent>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Agent>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListAgentsRequest.new - # - # # Call the list_agents method. - # result = client.list_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::Ces::V1beta::Agent. - # p item - # end - # - def list_agents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAgentsRequest - - # Converts hash and nil to 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_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::Ces::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_agents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_agents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :list_agents, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_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 the specified agent. - # - # @overload get_agent(request, options = nil) - # Pass arguments to `get_agent` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(name: nil) - # Pass arguments to `get_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. The resource name of the agent to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Agent] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Agent] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetAgentRequest.new - # - # # Call the get_agent method. - # result = client.get_agent request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. - # p result - # - def get_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAgentRequest - - # Converts hash and nil to 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_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::Ces::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_agent.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :get_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 agent in the given app. - # - # @overload create_agent(request, options = nil) - # Pass arguments to `create_agent` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(parent: nil, agent_id: nil, agent: nil) - # Pass arguments to `create_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. The resource name of the app to create an agent in. - # @param agent_id [::String] - # Optional. The ID to use for the agent, which will become the final - # component of the agent's resource name. If not provided, a unique ID will - # be automatically assigned for the agent. - # @param agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] - # Required. The agent to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Agent] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Agent] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateAgentRequest.new - # - # # Call the create_agent method. - # result = client.create_agent request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. - # p result - # - def create_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAgentRequest - - # Converts hash and nil to 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_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::Ces::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_agent.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :create_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 - - ## - # Updates the specified agent. - # - # @overload update_agent(request, options = nil) - # Pass arguments to `update_agent` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(agent: nil, update_mask: nil) - # Pass arguments to `update_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 agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] - # Required. The agent to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Agent] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Agent] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateAgentRequest.new - # - # # Call the update_agent method. - # result = client.update_agent request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. - # p result - # - def update_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateAgentRequest - - # Converts hash and nil to 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_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::Ces::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.agent&.name - header_params["agent.name"] = request.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_agent.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :update_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 - - ## - # Deletes the specified agent. - # - # @overload delete_agent(request, options = nil) - # Pass arguments to `delete_agent` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(name: nil, force: nil, etag: nil) - # Pass arguments to `delete_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. The resource name of the agent to delete. - # @param force [::Boolean] - # Optional. Indicates whether to forcefully delete the agent, even if it is - # still referenced by other app/agents/examples. - # - # * If `force = false`, the deletion fails if other agents/examples - # reference it. - # * If `force = true`, delete the agent and remove it from all referencing - # apps/agents/examples. - # @param etag [::String] - # Optional. The current etag of the agent. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the agent, deletion will be blocked and - # an ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteAgentRequest.new - # - # # Call the delete_agent method. - # result = client.delete_agent request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAgentRequest - - # Converts hash and nil to 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_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::Ces::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_agent.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :delete_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 - - ## - # Lists examples in the given app. - # - # @overload list_examples(request, options = nil) - # Pass arguments to `list_examples` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListExamplesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListExamplesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_examples(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_examples` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list examples from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListExamplesResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_examples AgentService.ListExamples} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the examples. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Example>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Example>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListExamplesRequest.new - # - # # Call the list_examples method. - # result = client.list_examples 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::Ces::V1beta::Example. - # p item - # end - # - def list_examples request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListExamplesRequest - - # Converts hash and nil to 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_examples.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_examples.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_examples.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :list_examples, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_examples, 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 the specified example. - # - # @overload get_example(request, options = nil) - # Pass arguments to `get_example` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetExampleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetExampleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_example(name: nil) - # Pass arguments to `get_example` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the example to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Example] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Example] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetExampleRequest.new - # - # # Call the get_example method. - # result = client.get_example request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Example. - # p result - # - def get_example request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetExampleRequest - - # Converts hash and nil to 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_example.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_example.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_example.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :get_example, 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 example in the given app. - # - # @overload create_example(request, options = nil) - # Pass arguments to `create_example` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateExampleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateExampleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_example(parent: nil, example_id: nil, example: nil) - # Pass arguments to `create_example` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to create an example in. - # @param example_id [::String] - # Optional. The ID to use for the example, which will become the final - # component of the example's resource name. If not provided, a unique ID will - # be automatically assigned for the example. - # @param example [::Google::Cloud::Ces::V1beta::Example, ::Hash] - # Required. The example to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Example] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Example] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateExampleRequest.new - # - # # Call the create_example method. - # result = client.create_example request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Example. - # p result - # - def create_example request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateExampleRequest - - # Converts hash and nil to 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_example.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_example.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_example.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :create_example, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified example. - # - # @overload update_example(request, options = nil) - # Pass arguments to `update_example` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateExampleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateExampleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_example(example: nil, update_mask: nil) - # Pass arguments to `update_example` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param example [::Google::Cloud::Ces::V1beta::Example, ::Hash] - # Required. The example to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Example] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Example] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateExampleRequest.new - # - # # Call the update_example method. - # result = client.update_example request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Example. - # p result - # - def update_example request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateExampleRequest - - # Converts hash and nil to 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_example.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.example&.name - header_params["example.name"] = request.example.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_example.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_example.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :update_example, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified example. - # - # @overload delete_example(request, options = nil) - # Pass arguments to `delete_example` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteExampleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteExampleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_example(name: nil, etag: nil) - # Pass arguments to `delete_example` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the example to delete. - # @param etag [::String] - # Optional. The current etag of the example. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the example, deletion will be blocked - # and an ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteExampleRequest.new - # - # # Call the delete_example method. - # result = client.delete_example request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_example request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteExampleRequest - - # Converts hash and nil to 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_example.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_example.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_example.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :delete_example, 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 tools in the given app. - # - # @overload list_tools(request, options = nil) - # Pass arguments to `list_tools` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListToolsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListToolsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_tools` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list tools from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListToolsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_tools AgentService.ListTools} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the tools. Use - # "include_system_tools=true" to include system tools in the response. See - # https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Tool>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Tool>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListToolsRequest.new - # - # # Call the list_tools method. - # result = client.list_tools 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::Ces::V1beta::Tool. - # p item - # end - # - def list_tools request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListToolsRequest - - # Converts hash and nil to 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_tools.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_tools.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tools.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :list_tools, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_tools, 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 the specified tool. - # - # @overload get_tool(request, options = nil) - # Pass arguments to `get_tool` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetToolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetToolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tool(name: nil) - # Pass arguments to `get_tool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the tool to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Tool] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Tool] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetToolRequest.new - # - # # Call the get_tool method. - # result = client.get_tool request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. - # p result - # - def get_tool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetToolRequest - - # Converts hash and nil to 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_tool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_tool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :get_tool, 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 conversations in the given app. - # - # @overload list_conversations(request, options = nil) - # Pass arguments to `list_conversations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListConversationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::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, source: nil, sources: 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. The resource name of the app to list conversations from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListConversationsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations AgentService.ListConversations} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the conversations. - # See https://google.aip.dev/160 for more details. - # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, Source.Live - # will be applied by default. Will be deprecated in favor of `sources` field. - # @param sources [::Array<::Google::Cloud::Ces::V1beta::Conversation::Source>] - # Optional. Indicate the sources of the conversations. If not set, all - # available sources will be applied by default. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Conversation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Conversation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::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::Ces::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::Ces::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::Ces::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 - - @agent_service_stub.call_rpc :list_conversations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @agent_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 - - ## - # Gets details of the specified conversation. - # - # @overload get_conversation(request, options = nil) - # Pass arguments to `get_conversation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetConversationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::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, source: 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. The resource name of the conversation to retrieve. - # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, all source - # will be searched. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Conversation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Conversation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetConversationRequest.new - # - # # Call the get_conversation method. - # result = client.get_conversation request - # - # # The returned object is of type Google::Cloud::Ces::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::Ces::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::Ces::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 - - @agent_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 - - ## - # Deletes the specified conversation. - # - # @overload delete_conversation(request, options = nil) - # Pass arguments to `delete_conversation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteConversationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::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, source: 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. The resource name of the conversation to delete. - # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, Source.Live - # will be applied by default. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::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::Ces::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::Ces::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 - - @agent_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 - - ## - # Batch deletes the specified conversations. - # - # @overload batch_delete_conversations(request, options = nil) - # Pass arguments to `batch_delete_conversations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_delete_conversations(parent: nil, conversations: nil) - # Pass arguments to `batch_delete_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. The resource name of the app to delete conversations from. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param conversations [::Array<::String>] - # Required. The resource names of the conversations to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new - # - # # Call the batch_delete_conversations method. - # result = client.batch_delete_conversations request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_delete_conversations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_delete_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::Ces::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.batch_delete_conversations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_delete_conversations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :batch_delete_conversations, 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 - - ## - # Creates a new tool in the given app. - # - # @overload create_tool(request, options = nil) - # Pass arguments to `create_tool` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateToolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateToolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tool(parent: nil, tool_id: nil, tool: nil) - # Pass arguments to `create_tool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to create a tool in. - # @param tool_id [::String] - # Optional. The ID to use for the tool, which will become the final component - # of the tool's resource name. If not provided, a unique ID will be - # automatically assigned for the tool. - # @param tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] - # Required. The tool to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Tool] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Tool] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateToolRequest.new - # - # # Call the create_tool method. - # result = client.create_tool request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. - # p result - # - def create_tool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateToolRequest - - # Converts hash and nil to 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_tool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_tool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_tool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :create_tool, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified tool. - # - # @overload update_tool(request, options = nil) - # Pass arguments to `update_tool` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateToolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateToolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tool(tool: nil, update_mask: nil) - # Pass arguments to `update_tool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] - # Required. The tool to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Tool] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Tool] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateToolRequest.new - # - # # Call the update_tool method. - # result = client.update_tool request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. - # p result - # - def update_tool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateToolRequest - - # Converts hash and nil to 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_tool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.tool&.name - header_params["tool.name"] = request.tool.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_tool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_tool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :update_tool, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified tool. - # - # @overload delete_tool(request, options = nil) - # Pass arguments to `delete_tool` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteToolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteToolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tool(name: nil, force: nil, etag: nil) - # Pass arguments to `delete_tool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the tool to delete. - # @param force [::Boolean] - # Optional. Indicates whether to forcefully delete the tool, even if it is - # still referenced by agents/examples. - # - # * If `force = false`, the deletion will fail if any agents still - # reference the tool. - # * If `force = true`, all existing references from agents will be removed - # and the tool will be deleted. - # @param etag [::String] - # Optional. The current etag of the tool. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the tool, deletion will be blocked and - # an ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteToolRequest.new - # - # # Call the delete_tool method. - # result = client.delete_tool request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteToolRequest - - # Converts hash and nil to 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_tool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_tool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_tool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :delete_tool, 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 guardrails in the given app. - # - # @overload list_guardrails(request, options = nil) - # Pass arguments to `list_guardrails` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListGuardrailsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListGuardrailsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_guardrails(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_guardrails` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list guardrails from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListGuardrailsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails AgentService.ListGuardrails} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the guardrails. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Guardrail>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Guardrail>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new - # - # # Call the list_guardrails method. - # result = client.list_guardrails 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::Ces::V1beta::Guardrail. - # p item - # end - # - def list_guardrails request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListGuardrailsRequest - - # Converts hash and nil to 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_guardrails.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_guardrails.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_guardrails.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :list_guardrails, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_guardrails, 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 the specified guardrail. - # - # @overload get_guardrail(request, options = nil) - # Pass arguments to `get_guardrail` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetGuardrailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetGuardrailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_guardrail(name: nil) - # Pass arguments to `get_guardrail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the guardrail to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Guardrail] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetGuardrailRequest.new - # - # # Call the get_guardrail method. - # result = client.get_guardrail request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. - # p result - # - def get_guardrail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetGuardrailRequest - - # Converts hash and nil to 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_guardrail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_guardrail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :get_guardrail, 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 guardrail in the given app. - # - # @overload create_guardrail(request, options = nil) - # Pass arguments to `create_guardrail` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateGuardrailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateGuardrailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_guardrail(parent: nil, guardrail_id: nil, guardrail: nil) - # Pass arguments to `create_guardrail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to create a guardrail in. - # @param guardrail_id [::String] - # Optional. The ID to use for the guardrail, which will become the final - # component of the guardrail's resource name. If not provided, a unique ID - # will be automatically assigned for the guardrail. - # @param guardrail [::Google::Cloud::Ces::V1beta::Guardrail, ::Hash] - # Required. The guardrail to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Guardrail] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new - # - # # Call the create_guardrail method. - # result = client.create_guardrail request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. - # p result - # - def create_guardrail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateGuardrailRequest - - # Converts hash and nil to 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_guardrail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_guardrail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :create_guardrail, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified guardrail. - # - # @overload update_guardrail(request, options = nil) - # Pass arguments to `update_guardrail` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_guardrail(guardrail: nil, update_mask: nil) - # Pass arguments to `update_guardrail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param guardrail [::Google::Cloud::Ces::V1beta::Guardrail, ::Hash] - # Required. The guardrail to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Guardrail] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new - # - # # Call the update_guardrail method. - # result = client.update_guardrail request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. - # p result - # - def update_guardrail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest - - # Converts hash and nil to 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_guardrail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.guardrail&.name - header_params["guardrail.name"] = request.guardrail.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_guardrail.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_guardrail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :update_guardrail, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified guardrail. - # - # @overload delete_guardrail(request, options = nil) - # Pass arguments to `delete_guardrail` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_guardrail(name: nil, force: nil, etag: nil) - # Pass arguments to `delete_guardrail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the guardrail to delete. - # @param force [::Boolean] - # Optional. Indicates whether to forcefully delete the guardrail, even if it - # is still referenced by app/agents. - # - # * If `force = false`, the deletion fails if any apps/agents still - # reference the guardrail. - # * If `force = true`, all existing references from apps/agents will be - # removed and the guardrail will be deleted. - # @param etag [::String] - # Optional. The current etag of the guardrail. If an etag is not provided, - # the deletion will overwrite any concurrent changes. If an etag is provided - # and does not match the current etag of the guardrail, deletion will be - # blocked and an ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new - # - # # Call the delete_guardrail method. - # result = client.delete_guardrail request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_guardrail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest - - # Converts hash and nil to 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_guardrail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_guardrail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :delete_guardrail, 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 deployments in the given app. - # - # @overload list_deployments(request, options = nil) - # Pass arguments to `list_deployments` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployments(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent app. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param page_size [::Integer] - # Optional. The maximum number of deployments to return. The service may - # return fewer than this value. If unspecified, at most 50 deployments will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeployments` must - # match the call that provided the page token. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Deployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Deployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new - # - # # Call the list_deployments method. - # result = client.list_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Ces::V1beta::Deployment. - # p item - # end - # - def list_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListDeploymentsRequest - - # Converts hash and nil to 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_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_deployments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :list_deployments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_deployments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified deployment. - # - # @overload get_deployment(request, options = nil) - # Pass arguments to `get_deployment` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployment(name: nil) - # Pass arguments to `get_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Deployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetDeploymentRequest.new - # - # # Call the get_deployment method. - # result = client.get_deployment request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. - # p result - # - def get_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetDeploymentRequest - - # Converts hash and nil to 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :get_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new deployment in the given app. - # - # @overload create_deployment(request, options = nil) - # Pass arguments to `create_deployment` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployment(parent: nil, deployment_id: nil, deployment: nil) - # Pass arguments to `create_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent app. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param deployment_id [::String] - # Optional. The ID to use for the deployment, which will become the final - # component of the deployment's resource name. If not provided, a unique ID - # will be automatically assigned for the deployment. - # @param deployment [::Google::Cloud::Ces::V1beta::Deployment, ::Hash] - # Required. The deployment to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Deployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new - # - # # Call the create_deployment method. - # result = client.create_deployment request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. - # p result - # - def create_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateDeploymentRequest - - # Converts hash and nil to 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :create_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified deployment. - # - # @overload update_deployment(request, options = nil) - # Pass arguments to `update_deployment` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployment(deployment: nil, update_mask: nil) - # Pass arguments to `update_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param deployment [::Google::Cloud::Ces::V1beta::Deployment, ::Hash] - # Required. The deployment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Deployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new - # - # # Call the update_deployment method. - # result = client.update_deployment request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. - # p result - # - def update_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest - - # Converts hash and nil to 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.deployment&.name - header_params["deployment.name"] = request.deployment.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :update_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified deployment. - # - # @overload delete_deployment(request, options = nil) - # Pass arguments to `delete_deployment` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployment(name: nil, etag: nil) - # Pass arguments to `delete_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to delete. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - # @param etag [::String] - # Optional. The etag of the deployment. - # If an etag is provided and does not match the current etag of the - # deployment, deletion will be blocked and an ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new - # - # # Call the delete_deployment method. - # result = client.delete_deployment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest - - # Converts hash and nil to 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :delete_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists toolsets in the given app. - # - # @overload list_toolsets(request, options = nil) - # Pass arguments to `list_toolsets` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListToolsetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListToolsetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_toolsets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_toolsets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list toolsets from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListToolsetsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets AgentService.ListToolsets} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the toolsets. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Toolset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Toolset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListToolsetsRequest.new - # - # # Call the list_toolsets method. - # result = client.list_toolsets 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::Ces::V1beta::Toolset. - # p item - # end - # - def list_toolsets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListToolsetsRequest - - # Converts hash and nil to 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_toolsets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_toolsets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_toolsets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :list_toolsets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_toolsets, 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 the specified toolset. - # - # @overload get_toolset(request, options = nil) - # Pass arguments to `get_toolset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetToolsetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetToolsetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_toolset(name: nil) - # Pass arguments to `get_toolset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the toolset to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Toolset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetToolsetRequest.new - # - # # Call the get_toolset method. - # result = client.get_toolset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. - # p result - # - def get_toolset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetToolsetRequest - - # Converts hash and nil to 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_toolset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_toolset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :get_toolset, 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 toolset in the given app. - # - # @overload create_toolset(request, options = nil) - # Pass arguments to `create_toolset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateToolsetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateToolsetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_toolset(parent: nil, toolset_id: nil, toolset: nil) - # Pass arguments to `create_toolset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to create a toolset in. - # @param toolset_id [::String] - # Optional. The ID to use for the toolset, which will become the final - # component of the toolset's resource name. If not provided, a unique ID will - # be automatically assigned for the toolset. - # @param toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] - # Required. The toolset to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Toolset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateToolsetRequest.new - # - # # Call the create_toolset method. - # result = client.create_toolset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. - # p result - # - def create_toolset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateToolsetRequest - - # Converts hash and nil to 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_toolset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_toolset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :create_toolset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified toolset. - # - # @overload update_toolset(request, options = nil) - # Pass arguments to `update_toolset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateToolsetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateToolsetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_toolset(toolset: nil, update_mask: nil) - # Pass arguments to `update_toolset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] - # Required. The toolset to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Toolset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new - # - # # Call the update_toolset method. - # result = client.update_toolset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. - # p result - # - def update_toolset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateToolsetRequest - - # Converts hash and nil to 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_toolset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.toolset&.name - header_params["toolset.name"] = request.toolset.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_toolset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_toolset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :update_toolset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified toolset. - # - # @overload delete_toolset(request, options = nil) - # Pass arguments to `delete_toolset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteToolsetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteToolsetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_toolset(name: nil, force: nil, etag: nil) - # Pass arguments to `delete_toolset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the toolset to delete. - # @param force [::Boolean] - # Optional. Indicates whether to forcefully delete the toolset, even if it is - # still referenced by app/agents. - # - # * If `force = false`, the deletion fails if any agents still - # reference the toolset. - # * If `force = true`, all existing references from agents will be - # removed and the toolset will be deleted. - # @param etag [::String] - # Optional. The current etag of the toolset. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the toolset, deletion will be blocked - # and an ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new - # - # # Call the delete_toolset method. - # result = client.delete_toolset request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_toolset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteToolsetRequest - - # Converts hash and nil to 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_toolset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_toolset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :delete_toolset, 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 app versions in the given app. - # - # @overload list_app_versions(request, options = nil) - # Pass arguments to `list_app_versions` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListAppVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListAppVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_app_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list app versions from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListAppVersionsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions AgentService.ListAppVersions} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the app versions. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::AppVersion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::AppVersion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new - # - # # Call the list_app_versions method. - # result = client.list_app_versions 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::Ces::V1beta::AppVersion. - # p item - # end - # - def list_app_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAppVersionsRequest - - # Converts hash and nil to 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_app_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_app_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :list_app_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_app_versions, 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 the specified app version. - # - # @overload get_app_version(request, options = nil) - # Pass arguments to `get_app_version` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetAppVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetAppVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app_version(name: nil) - # Pass arguments to `get_app_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app version to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::AppVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::AppVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetAppVersionRequest.new - # - # # Call the get_app_version method. - # result = client.get_app_version request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. - # p result - # - def get_app_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAppVersionRequest - - # Converts hash and nil to 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_app_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_app_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :get_app_version, 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 app version in the given app. - # - # @overload create_app_version(request, options = nil) - # Pass arguments to `create_app_version` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateAppVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateAppVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app_version(parent: nil, app_version_id: nil, app_version: nil) - # Pass arguments to `create_app_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to create an app version in. - # @param app_version_id [::String] - # Optional. The ID to use for the app version, which will become the final - # component of the app version's resource name. If not provided, a unique ID - # will be automatically assigned for the app version. - # @param app_version [::Google::Cloud::Ces::V1beta::AppVersion, ::Hash] - # Required. The app version to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::AppVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::AppVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new - # - # # Call the create_app_version method. - # result = client.create_app_version request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. - # p result - # - def create_app_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAppVersionRequest - - # Converts hash and nil to 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_app_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_app_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :create_app_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified app version. - # - # @overload delete_app_version(request, options = nil) - # Pass arguments to `delete_app_version` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app_version(name: nil, etag: nil) - # Pass arguments to `delete_app_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app version to delete. - # @param etag [::String] - # Optional. The current etag of the app version. If an etag is not provided, - # the deletion will overwrite any concurrent changes. If an etag is provided - # and does not match the current etag of the app version, deletion will be - # blocked and an ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new - # - # # Call the delete_app_version method. - # result = client.delete_app_version request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_app_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest - - # Converts hash and nil to 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_app_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_app_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :delete_app_version, 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 - - ## - # Restores the specified app version. - # This will create a new app version from the current draft app and overwrite - # the current draft with the specified app version. - # - # @overload restore_app_version(request, options = nil) - # Pass arguments to `restore_app_version` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restore_app_version(name: nil) - # Pass arguments to `restore_app_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app version to restore. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.new - # - # # Call the restore_app_version method. - # result = client.restore_app_version 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 restore_app_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restore_app_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.restore_app_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restore_app_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :restore_app_version, 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 - - ## - # Generates specific resources (e.g. agent) in the app using LLM assistant. - # - # @overload generate_app_resource(request, options = nil) - # Pass arguments to `generate_app_resource` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload generate_app_resource(agent: nil, tool: nil, toolset: nil, app_version_context: nil, parent: nil, refine_instructions: nil, tool_generation_config: nil, app_generation_config: nil, evaluation_generation_config: nil, evaluation_personas_generation_config: nil, quality_report_generation_config: nil, hill_climbing_fix_config: nil) - # Pass arguments to `generate_app_resource` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] - # The agent resource to be used by the LLM assistant, can be empty for - # generating a new agent. - # - # Note: The following parameters are mutually exclusive: `agent`, `tool`, `toolset`, `app_version_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 tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] - # The tool resource to be used by the LLM assistant, can be empty for - # generating a new tool. - # - # Note: The following parameters are mutually exclusive: `tool`, `agent`, `toolset`, `app_version_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 toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] - # The toolset resource to be used by the LLM assistant, can be empty for - # generating a new toolset. - # - # Note: The following parameters are mutually exclusive: `toolset`, `agent`, `tool`, `app_version_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 app_version_context [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppVersionContext, ::Hash] - # The app version context specifying the base snapshot and target agent. - # - # Note: The following parameters are mutually exclusive: `app_version_context`, `agent`, `tool`, `toolset`. 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 parent [::String] - # Required. The resource name of the app to generate the resource for. - # @param refine_instructions [::Array<::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::RefineInstructions, ::Hash>] - # Optional. List of refine instructions to be used to refine the resource. - # @param tool_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig, ::Hash] - # Optional. The configuration to be used to generate the tool. - # @param app_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppGenerationConfig, ::Hash] - # Optional. The configuration to be used to generate the agents and tools. - # @param evaluation_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationGenerationConfig, ::Hash] - # Optional. The configuration to be used to generate the evaluations. - # @param evaluation_personas_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationPersonasGenerationConfig, ::Hash] - # Optional. The configuration to be used to generate the evaluation personas. - # @param quality_report_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::QualityReportGenerationConfig, ::Hash] - # Optional. The configuration to be used for quality report generation. - # @param hill_climbing_fix_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::HillClimbingFixConfig, ::Hash] - # Optional. The configuration to be used for hill climbing fixes. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new - # - # # Call the generate_app_resource method. - # result = client.generate_app_resource 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 generate_app_resource request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.generate_app_resource.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.generate_app_resource.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_app_resource.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :generate_app_resource, 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 - - ## - # Lists the changelogs of the specified app. - # - # @overload list_changelogs(request, options = nil) - # Pass arguments to `list_changelogs` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListChangelogsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListChangelogsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_changelogs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_changelogs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list changelogs from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListChangelogsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs AgentService.ListChangelogs} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the changelogs. - # See https://google.aip.dev/160 for more details. - # - # The filter string can be used to filter by `action`, `resource_type`, - # `resource_name`, `author`, and `create_time`. - # The `:` comparator can be used for case-insensitive partial matching on - # string fields, while `=` performs an exact case-sensitive match. - # - # Examples: - # * `action:update` (case-insensitive partial match) - # * `action="Create"` (case-sensitive exact match) - # * `resource_type:agent` - # * `resource_name:my-agent` - # * `author:me@example.com` - # * `create_time > "2025-01-01T00:00:00Z"` - # * `create_time <= "2025-01-01T00:00:00Z" AND resource_type:tool` - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Changelog>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Changelog>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListChangelogsRequest.new - # - # # Call the list_changelogs method. - # result = client.list_changelogs 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::Ces::V1beta::Changelog. - # p item - # end - # - def list_changelogs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListChangelogsRequest - - # Converts hash and nil to 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_changelogs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_changelogs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_changelogs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :list_changelogs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @agent_service_stub, :list_changelogs, 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 the specified changelog. - # - # @overload get_changelog(request, options = nil) - # Pass arguments to `get_changelog` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetChangelogRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetChangelogRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_changelog(name: nil) - # Pass arguments to `get_changelog` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the changelog to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Changelog] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Changelog] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetChangelogRequest.new - # - # # Call the get_changelog method. - # result = client.get_changelog request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Changelog. - # p result - # - def get_changelog request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetChangelogRequest - - # Converts hash and nil to 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_changelog.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_changelog.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_changelog.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.call_rpc :get_changelog, 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 AgentService API. - # - # This class represents the configuration for AgentService, - # 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::Ces::V1beta::AgentService::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_apps to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Ces::V1beta::AgentService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_apps.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_apps.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::Ces::V1beta::AgentService::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 = "ces.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 AgentService 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_apps` - # @return [::Gapic::Config::Method] - # - attr_reader :list_apps - ## - # RPC-specific configuration for `get_app` - # @return [::Gapic::Config::Method] - # - attr_reader :get_app - ## - # RPC-specific configuration for `create_app` - # @return [::Gapic::Config::Method] - # - attr_reader :create_app - ## - # RPC-specific configuration for `update_app` - # @return [::Gapic::Config::Method] - # - attr_reader :update_app - ## - # RPC-specific configuration for `delete_app` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_app - ## - # RPC-specific configuration for `export_app` - # @return [::Gapic::Config::Method] - # - attr_reader :export_app - ## - # RPC-specific configuration for `import_app` - # @return [::Gapic::Config::Method] - # - attr_reader :import_app - ## - # RPC-specific configuration for `get_security_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_security_settings - ## - # RPC-specific configuration for `update_security_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_settings - ## - # RPC-specific configuration for `list_agents` - # @return [::Gapic::Config::Method] - # - attr_reader :list_agents - ## - # RPC-specific configuration for `get_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :get_agent - ## - # RPC-specific configuration for `create_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :create_agent - ## - # RPC-specific configuration for `update_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :update_agent - ## - # RPC-specific configuration for `delete_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_agent - ## - # RPC-specific configuration for `list_examples` - # @return [::Gapic::Config::Method] - # - attr_reader :list_examples - ## - # RPC-specific configuration for `get_example` - # @return [::Gapic::Config::Method] - # - attr_reader :get_example - ## - # RPC-specific configuration for `create_example` - # @return [::Gapic::Config::Method] - # - attr_reader :create_example - ## - # RPC-specific configuration for `update_example` - # @return [::Gapic::Config::Method] - # - attr_reader :update_example - ## - # RPC-specific configuration for `delete_example` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_example - ## - # RPC-specific configuration for `list_tools` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tools - ## - # RPC-specific configuration for `get_tool` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tool - ## - # RPC-specific configuration for `list_conversations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversations - ## - # RPC-specific configuration for `get_conversation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversation - ## - # RPC-specific configuration for `delete_conversation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversation - ## - # RPC-specific configuration for `batch_delete_conversations` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_delete_conversations - ## - # RPC-specific configuration for `create_tool` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tool - ## - # RPC-specific configuration for `update_tool` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tool - ## - # RPC-specific configuration for `delete_tool` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tool - ## - # RPC-specific configuration for `list_guardrails` - # @return [::Gapic::Config::Method] - # - attr_reader :list_guardrails - ## - # RPC-specific configuration for `get_guardrail` - # @return [::Gapic::Config::Method] - # - attr_reader :get_guardrail - ## - # RPC-specific configuration for `create_guardrail` - # @return [::Gapic::Config::Method] - # - attr_reader :create_guardrail - ## - # RPC-specific configuration for `update_guardrail` - # @return [::Gapic::Config::Method] - # - attr_reader :update_guardrail - ## - # RPC-specific configuration for `delete_guardrail` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_guardrail - ## - # RPC-specific configuration for `list_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_deployments - ## - # RPC-specific configuration for `get_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_deployment - ## - # RPC-specific configuration for `create_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_deployment - ## - # RPC-specific configuration for `update_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_deployment - ## - # RPC-specific configuration for `delete_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_deployment - ## - # RPC-specific configuration for `list_toolsets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_toolsets - ## - # RPC-specific configuration for `get_toolset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_toolset - ## - # RPC-specific configuration for `create_toolset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_toolset - ## - # RPC-specific configuration for `update_toolset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_toolset - ## - # RPC-specific configuration for `delete_toolset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_toolset - ## - # RPC-specific configuration for `list_app_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_app_versions - ## - # RPC-specific configuration for `get_app_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_app_version - ## - # RPC-specific configuration for `create_app_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_app_version - ## - # RPC-specific configuration for `delete_app_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_app_version - ## - # RPC-specific configuration for `restore_app_version` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_app_version - ## - # RPC-specific configuration for `generate_app_resource` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_app_resource - ## - # RPC-specific configuration for `list_changelogs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_changelogs - ## - # RPC-specific configuration for `get_changelog` - # @return [::Gapic::Config::Method] - # - attr_reader :get_changelog - - # @private - def initialize parent_rpcs = nil - list_apps_config = parent_rpcs.list_apps if parent_rpcs.respond_to? :list_apps - @list_apps = ::Gapic::Config::Method.new list_apps_config - get_app_config = parent_rpcs.get_app if parent_rpcs.respond_to? :get_app - @get_app = ::Gapic::Config::Method.new get_app_config - create_app_config = parent_rpcs.create_app if parent_rpcs.respond_to? :create_app - @create_app = ::Gapic::Config::Method.new create_app_config - update_app_config = parent_rpcs.update_app if parent_rpcs.respond_to? :update_app - @update_app = ::Gapic::Config::Method.new update_app_config - delete_app_config = parent_rpcs.delete_app if parent_rpcs.respond_to? :delete_app - @delete_app = ::Gapic::Config::Method.new delete_app_config - export_app_config = parent_rpcs.export_app if parent_rpcs.respond_to? :export_app - @export_app = ::Gapic::Config::Method.new export_app_config - import_app_config = parent_rpcs.import_app if parent_rpcs.respond_to? :import_app - @import_app = ::Gapic::Config::Method.new import_app_config - get_security_settings_config = parent_rpcs.get_security_settings if parent_rpcs.respond_to? :get_security_settings - @get_security_settings = ::Gapic::Config::Method.new get_security_settings_config - update_security_settings_config = parent_rpcs.update_security_settings if parent_rpcs.respond_to? :update_security_settings - @update_security_settings = ::Gapic::Config::Method.new update_security_settings_config - list_agents_config = parent_rpcs.list_agents if parent_rpcs.respond_to? :list_agents - @list_agents = ::Gapic::Config::Method.new list_agents_config - get_agent_config = parent_rpcs.get_agent if parent_rpcs.respond_to? :get_agent - @get_agent = ::Gapic::Config::Method.new get_agent_config - create_agent_config = parent_rpcs.create_agent if parent_rpcs.respond_to? :create_agent - @create_agent = ::Gapic::Config::Method.new create_agent_config - update_agent_config = parent_rpcs.update_agent if parent_rpcs.respond_to? :update_agent - @update_agent = ::Gapic::Config::Method.new update_agent_config - delete_agent_config = parent_rpcs.delete_agent if parent_rpcs.respond_to? :delete_agent - @delete_agent = ::Gapic::Config::Method.new delete_agent_config - list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples - @list_examples = ::Gapic::Config::Method.new list_examples_config - get_example_config = parent_rpcs.get_example if parent_rpcs.respond_to? :get_example - @get_example = ::Gapic::Config::Method.new get_example_config - create_example_config = parent_rpcs.create_example if parent_rpcs.respond_to? :create_example - @create_example = ::Gapic::Config::Method.new create_example_config - update_example_config = parent_rpcs.update_example if parent_rpcs.respond_to? :update_example - @update_example = ::Gapic::Config::Method.new update_example_config - delete_example_config = parent_rpcs.delete_example if parent_rpcs.respond_to? :delete_example - @delete_example = ::Gapic::Config::Method.new delete_example_config - list_tools_config = parent_rpcs.list_tools if parent_rpcs.respond_to? :list_tools - @list_tools = ::Gapic::Config::Method.new list_tools_config - get_tool_config = parent_rpcs.get_tool if parent_rpcs.respond_to? :get_tool - @get_tool = ::Gapic::Config::Method.new get_tool_config - list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations - @list_conversations = ::Gapic::Config::Method.new list_conversations_config - get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation - @get_conversation = ::Gapic::Config::Method.new get_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 - batch_delete_conversations_config = parent_rpcs.batch_delete_conversations if parent_rpcs.respond_to? :batch_delete_conversations - @batch_delete_conversations = ::Gapic::Config::Method.new batch_delete_conversations_config - create_tool_config = parent_rpcs.create_tool if parent_rpcs.respond_to? :create_tool - @create_tool = ::Gapic::Config::Method.new create_tool_config - update_tool_config = parent_rpcs.update_tool if parent_rpcs.respond_to? :update_tool - @update_tool = ::Gapic::Config::Method.new update_tool_config - delete_tool_config = parent_rpcs.delete_tool if parent_rpcs.respond_to? :delete_tool - @delete_tool = ::Gapic::Config::Method.new delete_tool_config - list_guardrails_config = parent_rpcs.list_guardrails if parent_rpcs.respond_to? :list_guardrails - @list_guardrails = ::Gapic::Config::Method.new list_guardrails_config - get_guardrail_config = parent_rpcs.get_guardrail if parent_rpcs.respond_to? :get_guardrail - @get_guardrail = ::Gapic::Config::Method.new get_guardrail_config - create_guardrail_config = parent_rpcs.create_guardrail if parent_rpcs.respond_to? :create_guardrail - @create_guardrail = ::Gapic::Config::Method.new create_guardrail_config - update_guardrail_config = parent_rpcs.update_guardrail if parent_rpcs.respond_to? :update_guardrail - @update_guardrail = ::Gapic::Config::Method.new update_guardrail_config - delete_guardrail_config = parent_rpcs.delete_guardrail if parent_rpcs.respond_to? :delete_guardrail - @delete_guardrail = ::Gapic::Config::Method.new delete_guardrail_config - list_deployments_config = parent_rpcs.list_deployments if parent_rpcs.respond_to? :list_deployments - @list_deployments = ::Gapic::Config::Method.new list_deployments_config - get_deployment_config = parent_rpcs.get_deployment if parent_rpcs.respond_to? :get_deployment - @get_deployment = ::Gapic::Config::Method.new get_deployment_config - create_deployment_config = parent_rpcs.create_deployment if parent_rpcs.respond_to? :create_deployment - @create_deployment = ::Gapic::Config::Method.new create_deployment_config - update_deployment_config = parent_rpcs.update_deployment if parent_rpcs.respond_to? :update_deployment - @update_deployment = ::Gapic::Config::Method.new update_deployment_config - delete_deployment_config = parent_rpcs.delete_deployment if parent_rpcs.respond_to? :delete_deployment - @delete_deployment = ::Gapic::Config::Method.new delete_deployment_config - list_toolsets_config = parent_rpcs.list_toolsets if parent_rpcs.respond_to? :list_toolsets - @list_toolsets = ::Gapic::Config::Method.new list_toolsets_config - get_toolset_config = parent_rpcs.get_toolset if parent_rpcs.respond_to? :get_toolset - @get_toolset = ::Gapic::Config::Method.new get_toolset_config - create_toolset_config = parent_rpcs.create_toolset if parent_rpcs.respond_to? :create_toolset - @create_toolset = ::Gapic::Config::Method.new create_toolset_config - update_toolset_config = parent_rpcs.update_toolset if parent_rpcs.respond_to? :update_toolset - @update_toolset = ::Gapic::Config::Method.new update_toolset_config - delete_toolset_config = parent_rpcs.delete_toolset if parent_rpcs.respond_to? :delete_toolset - @delete_toolset = ::Gapic::Config::Method.new delete_toolset_config - list_app_versions_config = parent_rpcs.list_app_versions if parent_rpcs.respond_to? :list_app_versions - @list_app_versions = ::Gapic::Config::Method.new list_app_versions_config - get_app_version_config = parent_rpcs.get_app_version if parent_rpcs.respond_to? :get_app_version - @get_app_version = ::Gapic::Config::Method.new get_app_version_config - create_app_version_config = parent_rpcs.create_app_version if parent_rpcs.respond_to? :create_app_version - @create_app_version = ::Gapic::Config::Method.new create_app_version_config - delete_app_version_config = parent_rpcs.delete_app_version if parent_rpcs.respond_to? :delete_app_version - @delete_app_version = ::Gapic::Config::Method.new delete_app_version_config - restore_app_version_config = parent_rpcs.restore_app_version if parent_rpcs.respond_to? :restore_app_version - @restore_app_version = ::Gapic::Config::Method.new restore_app_version_config - generate_app_resource_config = parent_rpcs.generate_app_resource if parent_rpcs.respond_to? :generate_app_resource - @generate_app_resource = ::Gapic::Config::Method.new generate_app_resource_config - list_changelogs_config = parent_rpcs.list_changelogs if parent_rpcs.respond_to? :list_changelogs - @list_changelogs = ::Gapic::Config::Method.new list_changelogs_config - get_changelog_config = parent_rpcs.get_changelog if parent_rpcs.respond_to? :get_changelog - @get_changelog = ::Gapic::Config::Method.new get_changelog_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/credentials.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/credentials.rb deleted file mode 100644 index b44107916ff1..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/credentials.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Ces - module V1beta - module AgentService - # Credentials for the AgentService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/ces", - "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-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/operations.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/operations.rb deleted file mode 100644 index 53b0b1b4ed77..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Ces - module V1beta - module AgentService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AgentService 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 AgentService 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::Ces::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::Ces::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::Ces::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::Ces::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::Ces::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 = "ces.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-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/paths.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/paths.rb deleted file mode 100644 index 78525532278c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/paths.rb +++ /dev/null @@ -1,481 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - module AgentService - # Path helper methods for the AgentService API. - module Paths - ## - # Create a fully-qualified Agent resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param agent [String] - # - # @return [::String] - def agent_path project:, location:, app:, agent: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/agents/#{agent}" - end - - ## - # Create a fully-qualified App resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # - # @return [::String] - def app_path project:, location:, app: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}" - end - - ## - # Create a fully-qualified AppVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param version [String] - # - # @return [::String] - def app_version_path project:, location:, app:, version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/versions/#{version}" - end - - ## - # Create a fully-qualified Changelog resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/changelogs/{changelog}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param changelog [String] - # - # @return [::String] - def changelog_path project:, location:, app:, changelog: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/changelogs/#{changelog}" - end - - ## - # Create a fully-qualified Conversation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param conversation [String] - # - # @return [::String] - def conversation_path project:, location:, app:, conversation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/conversations/#{conversation}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, location:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}" - end - - ## - # Create a fully-qualified DeidentifyTemplate resource string. - # - # @overload deidentify_template_path(organization:, location:, deidentify_template:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}` - # - # @param organization [String] - # @param location [String] - # @param deidentify_template [String] - # - # @overload deidentify_template_path(project:, location:, deidentify_template:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}` - # - # @param project [String] - # @param location [String] - # @param deidentify_template [String] - # - # @return [::String] - def deidentify_template_path **args - resources = { - "deidentify_template:location:organization" => (proc do |organization:, location:, deidentify_template:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/deidentifyTemplates/#{deidentify_template}" - end), - "deidentify_template:location:project" => (proc do |project:, location:, deidentify_template:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/deidentifyTemplates/#{deidentify_template}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Deployment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param deployment [String] - # - # @return [::String] - def deployment_path project:, location:, app:, deployment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/deployments/#{deployment}" - end - - ## - # Create a fully-qualified DialogflowAgent resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/agents/{agent}` - # - # @param project [String] - # @param location [String] - # @param agent [String] - # - # @return [::String] - def dialogflow_agent_path project:, location:, 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}/agents/#{agent}" - end - - ## - # Create a fully-qualified Engine resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` - # - # @param project [String] - # @param location [String] - # @param collection [String] - # @param engine [String] - # - # @return [::String] - def engine_path project:, location:, collection:, engine: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" - - "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}" - end - - ## - # Create a fully-qualified EvaluationRun resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param evaluation_run [String] - # - # @return [::String] - def evaluation_run_path project:, location:, app:, evaluation_run: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/evaluationRuns/#{evaluation_run}" - end - - ## - # Create a fully-qualified Example resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/examples/{example}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param example [String] - # - # @return [::String] - def example_path project:, location:, app:, example: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/examples/#{example}" - end - - ## - # Create a fully-qualified Guardrail resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param guardrail [String] - # - # @return [::String] - def guardrail_path project:, location:, app:, guardrail: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/guardrails/#{guardrail}" - end - - ## - # Create a fully-qualified InspectTemplate resource string. - # - # @overload inspect_template_path(organization:, location:, inspect_template:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}` - # - # @param organization [String] - # @param location [String] - # @param inspect_template [String] - # - # @overload inspect_template_path(project:, location:, inspect_template:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/inspectTemplates/{inspect_template}` - # - # @param project [String] - # @param location [String] - # @param inspect_template [String] - # - # @return [::String] - def inspect_template_path **args - resources = { - "inspect_template:location:organization" => (proc do |organization:, location:, inspect_template:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/inspectTemplates/#{inspect_template}" - end), - "inspect_template:location:project" => (proc do |project:, location:, inspect_template:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/inspectTemplates/#{inspect_template}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - 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 SecretVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/secrets/{secret}/versions/{secret_version}` - # - # @param project [String] - # @param secret [String] - # @param secret_version [String] - # - # @return [::String] - def secret_version_path project:, secret:, secret_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" - end - - ## - # Create a fully-qualified SecuritySettings resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/securitySettings` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def security_settings_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}/securitySettings" - end - - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param namespace [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, namespace:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" - - "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" - end - - ## - # Create a fully-qualified Tool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param tool [String] - # - # @return [::String] - def tool_path project:, location:, app:, tool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/tools/#{tool}" - end - - ## - # Create a fully-qualified Toolset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param toolset [String] - # - # @return [::String] - def toolset_path project:, location:, app:, toolset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/toolsets/#{toolset}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest.rb deleted file mode 100644 index 96a198373f4f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/ces/v1beta/version" -require "google/cloud/ces/v1beta/bindings_override" - -require "google/cloud/ces/v1beta/agent_service/credentials" -require "google/cloud/ces/v1beta/agent_service/paths" -require "google/cloud/ces/v1beta/agent_service/rest/operations" -require "google/cloud/ces/v1beta/agent_service/rest/client" - -module Google - module Cloud - module Ces - module V1beta - ## - # The service that manages agent-related resources in Gemini Enterprise for - # Customer Engagement (CES). - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/ces/v1beta/agent_service/rest" - # client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - module AgentService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/ces/v1beta/agent_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb deleted file mode 100644 index 34a69c01ab45..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb +++ /dev/null @@ -1,5247 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/agent_service_pb" -require "google/cloud/ces/v1beta/agent_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Ces - module V1beta - module AgentService - module Rest - ## - # REST client for the AgentService service. - # - # The service that manages agent-related resources in Gemini Enterprise for - # Customer Engagement (CES). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :agent_service_stub - - ## - # Configure the AgentService Client class. - # - # See {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AgentService clients - # ::Google::Cloud::Ces::V1beta::AgentService::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", "Ces", "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 = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AgentService 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::Ces::V1beta::AgentService::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 - @agent_service_stub.universe_domain - end - - ## - # Create a new AgentService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AgentService 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::Ces::V1beta::AgentService::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 - - @agent_service_stub = ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @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 = @agent_service_stub.endpoint - config.universe_domain = @agent_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @agent_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Ces::V1beta::AgentService::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 - @agent_service_stub.logger - end - - # Service calls - - ## - # Lists apps in the given project and location. - # - # @overload list_apps(request, options = nil) - # Pass arguments to `list_apps` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListAppsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListAppsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_apps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_apps` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location to list apps from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListAppsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_apps AgentService.ListApps} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the apps. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::App>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::App>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListAppsRequest.new - # - # # Call the list_apps method. - # result = client.list_apps 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::Ces::V1beta::App. - # p item - # end - # - def list_apps request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAppsRequest - - # Converts hash and nil to an 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_apps.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_apps.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_apps.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.list_apps request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_apps, "apps", 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 the specified app. - # - # @overload get_app(request, options = nil) - # Pass arguments to `get_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app(name: nil) - # Pass arguments to `get_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::App] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::App] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetAppRequest.new - # - # # Call the get_app method. - # result = client.get_app request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::App. - # p result - # - def get_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAppRequest - - # Converts hash and nil to an 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_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.get_app 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 app in the given project and location. - # - # @overload create_app(request, options = nil) - # Pass arguments to `create_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app(parent: nil, app_id: nil, app: nil) - # Pass arguments to `create_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location to create an app in. - # @param app_id [::String] - # Optional. The ID to use for the app, which will become the final component - # of the app's resource name. If not provided, a unique ID will be - # automatically assigned for the app. - # @param app [::Google::Cloud::Ces::V1beta::App, ::Hash] - # Required. The app to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateAppRequest.new - # - # # Call the create_app method. - # result = client.create_app 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_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAppRequest - - # Converts hash and nil to an 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_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.create_app 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 specified app. - # - # @overload update_app(request, options = nil) - # Pass arguments to `update_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app(app: nil, update_mask: nil) - # Pass arguments to `update_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param app [::Google::Cloud::Ces::V1beta::App, ::Hash] - # Required. The app to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::App] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::App] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateAppRequest.new - # - # # Call the update_app method. - # result = client.update_app request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::App. - # p result - # - def update_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateAppRequest - - # Converts hash and nil to an 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_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.update_app request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified app. - # - # @overload delete_app(request, options = nil) - # Pass arguments to `delete_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app(name: nil, etag: nil) - # Pass arguments to `delete_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app to delete. - # @param etag [::String] - # Optional. The current etag of the app. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the app, deletion will be blocked and an - # ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteAppRequest.new - # - # # Call the delete_app method. - # result = client.delete_app 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_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAppRequest - - # Converts hash and nil to an 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_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.delete_app request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports the specified app. - # - # @overload export_app(request, options = nil) - # Pass arguments to `export_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ExportAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ExportAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_app(name: nil, export_format: nil, gcs_uri: nil, app_version: nil) - # Pass arguments to `export_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app to export. - # @param export_format [::Google::Cloud::Ces::V1beta::ExportAppRequest::ExportFormat] - # Required. The format to export the app in. - # @param gcs_uri [::String] - # Optional. The [Google Cloud - # Storage](https://cloud.google.com/storage/docs/) URI to which to export the - # app. The format of this URI must be `gs:///`. The - # exported app archive will be written directly to the specified GCS object. - # @param app_version [::String] - # Optional. The resource name of the app version to export. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ExportAppRequest.new - # - # # Call the export_app method. - # result = client.export_app request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportAppRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.export_app.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.export_app request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports the specified app. - # - # @overload import_app(request, options = nil) - # Pass arguments to `import_app` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ImportAppRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ImportAppRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_app(gcs_uri: nil, app_content: nil, parent: nil, display_name: nil, app_id: nil, import_options: nil, ignore_app_lock: nil) - # Pass arguments to `import_app` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param gcs_uri [::String] - # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - # from which to import app. The format of this URI must be - # `gs:///`. - # - # Note: The following parameters are mutually exclusive: `gcs_uri`, `app_content`. 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 app_content [::String] - # Raw bytes representing the compressed zip file with the app folder - # structure. - # - # Note: The following parameters are mutually exclusive: `app_content`, `gcs_uri`. 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 parent [::String] - # Required. The parent resource name with the location of the app to import. - # @param display_name [::String] - # Optional. The display name of the app to import. - # * If the app is created on import, and the display name is specified, - # the imported app will use this display name. If a conflict is detected - # with an existing app, a timestamp will be appended to the display name - # to make it unique. - # * If the app is a reimport, this field should not be set. Providing a - # display name during reimport will result in an INVALID_ARGUMENT error. - # @param app_id [::String] - # Optional. The ID to use for the imported app. - # * If not specified, a unique ID will be automatically assigned for - # the app. - # * Otherwise, the imported app will use this ID as the final component of - # its resource name. If an app with the same ID already exists at the - # specified location in the project, the content of the existing app will be - # replaced. - # @param import_options [::Google::Cloud::Ces::V1beta::ImportAppRequest::ImportOptions, ::Hash] - # Optional. Options governing the import process for the app. - # @param ignore_app_lock [::Boolean] - # Optional. Flag for overriding the app lock during import. - # If set to true, the import process will ignore the app lock. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ImportAppRequest.new - # - # # Call the import_app method. - # result = client.import_app request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_app request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ImportAppRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_app.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.import_app.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_app.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.import_app 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 - - ## - # Retrieves the security settings for the project and location. - # - # @overload get_security_settings(request, options = nil) - # Pass arguments to `get_security_settings` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_security_settings(name: nil) - # Pass arguments to `get_security_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the security settings to retrieve. - # Format: `projects/{project}/locations/{location}/securitySettings` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::SecuritySettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new - # - # # Call the get_security_settings method. - # result = client.get_security_settings request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. - # p result - # - def get_security_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest - - # Converts hash and nil to an 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_security_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_security_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_security_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.get_security_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the security settings for the project and location. - # - # @overload update_security_settings(request, options = nil) - # Pass arguments to `update_security_settings` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_security_settings(security_settings: nil, update_mask: nil) - # Pass arguments to `update_security_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_settings [::Google::Cloud::Ces::V1beta::SecuritySettings, ::Hash] - # Required. The security settings to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::SecuritySettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new - # - # # Call the update_security_settings method. - # result = client.update_security_settings request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. - # p result - # - def update_security_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest - - # Converts hash and nil to an 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_security_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_security_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_security_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.update_security_settings 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 agents in the given app. - # - # @overload list_agents(request, options = nil) - # Pass arguments to `list_agents` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListAgentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListAgentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_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. The resource name of the app to list agents from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListAgentsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_agents AgentService.ListAgents} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the agents. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Agent>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Agent>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListAgentsRequest.new - # - # # Call the list_agents method. - # result = client.list_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::Ces::V1beta::Agent. - # p item - # end - # - def list_agents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAgentsRequest - - # Converts hash and nil to an 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_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::Ces::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_agents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_agents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.list_agents request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_agents, "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 the specified agent. - # - # @overload get_agent(request, options = nil) - # Pass arguments to `get_agent` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(name: nil) - # Pass arguments to `get_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. The resource name of the agent to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Agent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Agent] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetAgentRequest.new - # - # # Call the get_agent method. - # result = client.get_agent request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. - # p result - # - def get_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAgentRequest - - # Converts hash and nil to an 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_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::Ces::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_agent.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.get_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 agent in the given app. - # - # @overload create_agent(request, options = nil) - # Pass arguments to `create_agent` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(parent: nil, agent_id: nil, agent: nil) - # Pass arguments to `create_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. The resource name of the app to create an agent in. - # @param agent_id [::String] - # Optional. The ID to use for the agent, which will become the final - # component of the agent's resource name. If not provided, a unique ID will - # be automatically assigned for the agent. - # @param agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] - # Required. The agent to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Agent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Agent] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateAgentRequest.new - # - # # Call the create_agent method. - # result = client.create_agent request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. - # p result - # - def create_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAgentRequest - - # Converts hash and nil to an 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_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::Ces::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_agent.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.create_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 - - ## - # Updates the specified agent. - # - # @overload update_agent(request, options = nil) - # Pass arguments to `update_agent` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(agent: nil, update_mask: nil) - # Pass arguments to `update_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 agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] - # Required. The agent to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Agent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Agent] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateAgentRequest.new - # - # # Call the update_agent method. - # result = client.update_agent request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Agent. - # p result - # - def update_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateAgentRequest - - # Converts hash and nil to an 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_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::Ces::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_agent.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.update_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 - - ## - # Deletes the specified agent. - # - # @overload delete_agent(request, options = nil) - # Pass arguments to `delete_agent` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(name: nil, force: nil, etag: nil) - # Pass arguments to `delete_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. The resource name of the agent to delete. - # @param force [::Boolean] - # Optional. Indicates whether to forcefully delete the agent, even if it is - # still referenced by other app/agents/examples. - # - # * If `force = false`, the deletion fails if other agents/examples - # reference it. - # * If `force = true`, delete the agent and remove it from all referencing - # apps/agents/examples. - # @param etag [::String] - # Optional. The current etag of the agent. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the agent, deletion will be blocked and - # an ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteAgentRequest.new - # - # # Call the delete_agent method. - # result = client.delete_agent request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAgentRequest - - # Converts hash and nil to an 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_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::Ces::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_agent.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.delete_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 - - ## - # Lists examples in the given app. - # - # @overload list_examples(request, options = nil) - # Pass arguments to `list_examples` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListExamplesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListExamplesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_examples(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_examples` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list examples from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListExamplesResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_examples AgentService.ListExamples} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the examples. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Example>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Example>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListExamplesRequest.new - # - # # Call the list_examples method. - # result = client.list_examples 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::Ces::V1beta::Example. - # p item - # end - # - def list_examples request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListExamplesRequest - - # Converts hash and nil to an 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_examples.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_examples.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_examples.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.list_examples request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_examples, "examples", 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 the specified example. - # - # @overload get_example(request, options = nil) - # Pass arguments to `get_example` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetExampleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetExampleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_example(name: nil) - # Pass arguments to `get_example` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the example to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Example] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Example] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetExampleRequest.new - # - # # Call the get_example method. - # result = client.get_example request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Example. - # p result - # - def get_example request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetExampleRequest - - # Converts hash and nil to an 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_example.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_example.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_example.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.get_example 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 example in the given app. - # - # @overload create_example(request, options = nil) - # Pass arguments to `create_example` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateExampleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateExampleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_example(parent: nil, example_id: nil, example: nil) - # Pass arguments to `create_example` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to create an example in. - # @param example_id [::String] - # Optional. The ID to use for the example, which will become the final - # component of the example's resource name. If not provided, a unique ID will - # be automatically assigned for the example. - # @param example [::Google::Cloud::Ces::V1beta::Example, ::Hash] - # Required. The example to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Example] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Example] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateExampleRequest.new - # - # # Call the create_example method. - # result = client.create_example request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Example. - # p result - # - def create_example request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateExampleRequest - - # Converts hash and nil to an 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_example.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_example.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_example.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.create_example request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified example. - # - # @overload update_example(request, options = nil) - # Pass arguments to `update_example` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateExampleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateExampleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_example(example: nil, update_mask: nil) - # Pass arguments to `update_example` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param example [::Google::Cloud::Ces::V1beta::Example, ::Hash] - # Required. The example to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Example] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Example] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateExampleRequest.new - # - # # Call the update_example method. - # result = client.update_example request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Example. - # p result - # - def update_example request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateExampleRequest - - # Converts hash and nil to an 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_example.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_example.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_example.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.update_example request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified example. - # - # @overload delete_example(request, options = nil) - # Pass arguments to `delete_example` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteExampleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteExampleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_example(name: nil, etag: nil) - # Pass arguments to `delete_example` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the example to delete. - # @param etag [::String] - # Optional. The current etag of the example. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the example, deletion will be blocked - # and an ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteExampleRequest.new - # - # # Call the delete_example method. - # result = client.delete_example request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_example request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteExampleRequest - - # Converts hash and nil to an 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_example.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_example.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_example.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.delete_example 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 tools in the given app. - # - # @overload list_tools(request, options = nil) - # Pass arguments to `list_tools` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListToolsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListToolsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_tools` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list tools from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListToolsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_tools AgentService.ListTools} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the tools. Use - # "include_system_tools=true" to include system tools in the response. See - # https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Tool>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Tool>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListToolsRequest.new - # - # # Call the list_tools method. - # result = client.list_tools 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::Ces::V1beta::Tool. - # p item - # end - # - def list_tools request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListToolsRequest - - # Converts hash and nil to an 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_tools.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_tools.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tools.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.list_tools request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_tools, "tools", 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 the specified tool. - # - # @overload get_tool(request, options = nil) - # Pass arguments to `get_tool` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetToolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetToolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tool(name: nil) - # Pass arguments to `get_tool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the tool to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Tool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Tool] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetToolRequest.new - # - # # Call the get_tool method. - # result = client.get_tool request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. - # p result - # - def get_tool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetToolRequest - - # Converts hash and nil to an 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_tool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_tool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_tool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.get_tool 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 conversations in the given app. - # - # @overload list_conversations(request, options = nil) - # Pass arguments to `list_conversations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListConversationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::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, source: nil, sources: 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. The resource name of the app to list conversations from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListConversationsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_conversations AgentService.ListConversations} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the conversations. - # See https://google.aip.dev/160 for more details. - # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, Source.Live - # will be applied by default. Will be deprecated in favor of `sources` field. - # @param sources [::Array<::Google::Cloud::Ces::V1beta::Conversation::Source>] - # Optional. Indicate the sources of the conversations. If not set, all - # available sources will be applied by default. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Conversation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Conversation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::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::Ces::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::Ces::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::Ces::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 - - @agent_service_stub.list_conversations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @agent_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 - - ## - # Gets details of the specified conversation. - # - # @overload get_conversation(request, options = nil) - # Pass arguments to `get_conversation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetConversationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::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, source: 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. The resource name of the conversation to retrieve. - # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, all source - # will be searched. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Conversation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Conversation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetConversationRequest.new - # - # # Call the get_conversation method. - # result = client.get_conversation request - # - # # The returned object is of type Google::Cloud::Ces::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::Ces::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::Ces::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 - - @agent_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 - - ## - # Deletes the specified conversation. - # - # @overload delete_conversation(request, options = nil) - # Pass arguments to `delete_conversation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteConversationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::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, source: 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. The resource name of the conversation to delete. - # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, Source.Live - # will be applied by default. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::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::Ces::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::Ces::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 - - @agent_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 - - ## - # Batch deletes the specified conversations. - # - # @overload batch_delete_conversations(request, options = nil) - # Pass arguments to `batch_delete_conversations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_delete_conversations(parent: nil, conversations: nil) - # Pass arguments to `batch_delete_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. The resource name of the app to delete conversations from. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param conversations [::Array<::String>] - # Required. The resource names of the conversations to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new - # - # # Call the batch_delete_conversations method. - # result = client.batch_delete_conversations request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_delete_conversations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_delete_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::Ces::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.batch_delete_conversations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_delete_conversations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.batch_delete_conversations 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 - - ## - # Creates a new tool in the given app. - # - # @overload create_tool(request, options = nil) - # Pass arguments to `create_tool` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateToolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateToolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tool(parent: nil, tool_id: nil, tool: nil) - # Pass arguments to `create_tool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to create a tool in. - # @param tool_id [::String] - # Optional. The ID to use for the tool, which will become the final component - # of the tool's resource name. If not provided, a unique ID will be - # automatically assigned for the tool. - # @param tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] - # Required. The tool to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Tool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Tool] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateToolRequest.new - # - # # Call the create_tool method. - # result = client.create_tool request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. - # p result - # - def create_tool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateToolRequest - - # Converts hash and nil to an 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_tool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_tool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_tool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.create_tool request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified tool. - # - # @overload update_tool(request, options = nil) - # Pass arguments to `update_tool` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateToolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateToolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tool(tool: nil, update_mask: nil) - # Pass arguments to `update_tool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] - # Required. The tool to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Tool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Tool] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateToolRequest.new - # - # # Call the update_tool method. - # result = client.update_tool request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Tool. - # p result - # - def update_tool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateToolRequest - - # Converts hash and nil to an 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_tool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_tool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_tool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.update_tool request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified tool. - # - # @overload delete_tool(request, options = nil) - # Pass arguments to `delete_tool` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteToolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteToolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tool(name: nil, force: nil, etag: nil) - # Pass arguments to `delete_tool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the tool to delete. - # @param force [::Boolean] - # Optional. Indicates whether to forcefully delete the tool, even if it is - # still referenced by agents/examples. - # - # * If `force = false`, the deletion will fail if any agents still - # reference the tool. - # * If `force = true`, all existing references from agents will be removed - # and the tool will be deleted. - # @param etag [::String] - # Optional. The current etag of the tool. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the tool, deletion will be blocked and - # an ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteToolRequest.new - # - # # Call the delete_tool method. - # result = client.delete_tool request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteToolRequest - - # Converts hash and nil to an 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_tool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_tool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_tool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.delete_tool 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 guardrails in the given app. - # - # @overload list_guardrails(request, options = nil) - # Pass arguments to `list_guardrails` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListGuardrailsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListGuardrailsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_guardrails(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_guardrails` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list guardrails from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListGuardrailsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_guardrails AgentService.ListGuardrails} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the guardrails. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Guardrail>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Guardrail>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new - # - # # Call the list_guardrails method. - # result = client.list_guardrails 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::Ces::V1beta::Guardrail. - # p item - # end - # - def list_guardrails request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListGuardrailsRequest - - # Converts hash and nil to an 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_guardrails.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_guardrails.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_guardrails.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.list_guardrails request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_guardrails, "guardrails", 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 the specified guardrail. - # - # @overload get_guardrail(request, options = nil) - # Pass arguments to `get_guardrail` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetGuardrailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetGuardrailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_guardrail(name: nil) - # Pass arguments to `get_guardrail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the guardrail to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Guardrail] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetGuardrailRequest.new - # - # # Call the get_guardrail method. - # result = client.get_guardrail request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. - # p result - # - def get_guardrail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetGuardrailRequest - - # Converts hash and nil to an 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_guardrail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_guardrail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.get_guardrail 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 guardrail in the given app. - # - # @overload create_guardrail(request, options = nil) - # Pass arguments to `create_guardrail` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateGuardrailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateGuardrailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_guardrail(parent: nil, guardrail_id: nil, guardrail: nil) - # Pass arguments to `create_guardrail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to create a guardrail in. - # @param guardrail_id [::String] - # Optional. The ID to use for the guardrail, which will become the final - # component of the guardrail's resource name. If not provided, a unique ID - # will be automatically assigned for the guardrail. - # @param guardrail [::Google::Cloud::Ces::V1beta::Guardrail, ::Hash] - # Required. The guardrail to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Guardrail] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new - # - # # Call the create_guardrail method. - # result = client.create_guardrail request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. - # p result - # - def create_guardrail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateGuardrailRequest - - # Converts hash and nil to an 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_guardrail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_guardrail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.create_guardrail request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified guardrail. - # - # @overload update_guardrail(request, options = nil) - # Pass arguments to `update_guardrail` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_guardrail(guardrail: nil, update_mask: nil) - # Pass arguments to `update_guardrail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param guardrail [::Google::Cloud::Ces::V1beta::Guardrail, ::Hash] - # Required. The guardrail to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Guardrail] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new - # - # # Call the update_guardrail method. - # result = client.update_guardrail request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. - # p result - # - def update_guardrail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest - - # Converts hash and nil to an 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_guardrail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_guardrail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.update_guardrail request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified guardrail. - # - # @overload delete_guardrail(request, options = nil) - # Pass arguments to `delete_guardrail` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_guardrail(name: nil, force: nil, etag: nil) - # Pass arguments to `delete_guardrail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the guardrail to delete. - # @param force [::Boolean] - # Optional. Indicates whether to forcefully delete the guardrail, even if it - # is still referenced by app/agents. - # - # * If `force = false`, the deletion fails if any apps/agents still - # reference the guardrail. - # * If `force = true`, all existing references from apps/agents will be - # removed and the guardrail will be deleted. - # @param etag [::String] - # Optional. The current etag of the guardrail. If an etag is not provided, - # the deletion will overwrite any concurrent changes. If an etag is provided - # and does not match the current etag of the guardrail, deletion will be - # blocked and an ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new - # - # # Call the delete_guardrail method. - # result = client.delete_guardrail request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_guardrail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest - - # Converts hash and nil to an 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_guardrail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_guardrail.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_guardrail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.delete_guardrail 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 deployments in the given app. - # - # @overload list_deployments(request, options = nil) - # Pass arguments to `list_deployments` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployments(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent app. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param page_size [::Integer] - # Optional. The maximum number of deployments to return. The service may - # return fewer than this value. If unspecified, at most 50 deployments will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeployments` must - # match the call that provided the page token. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Deployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Deployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new - # - # # Call the list_deployments method. - # result = client.list_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Ces::V1beta::Deployment. - # p item - # end - # - def list_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListDeploymentsRequest - - # Converts hash and nil to an 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_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_deployments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.list_deployments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_deployments, "deployments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified deployment. - # - # @overload get_deployment(request, options = nil) - # Pass arguments to `get_deployment` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployment(name: nil) - # Pass arguments to `get_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetDeploymentRequest.new - # - # # Call the get_deployment method. - # result = client.get_deployment request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. - # p result - # - def get_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetDeploymentRequest - - # Converts hash and nil to an 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.get_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new deployment in the given app. - # - # @overload create_deployment(request, options = nil) - # Pass arguments to `create_deployment` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployment(parent: nil, deployment_id: nil, deployment: nil) - # Pass arguments to `create_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent app. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param deployment_id [::String] - # Optional. The ID to use for the deployment, which will become the final - # component of the deployment's resource name. If not provided, a unique ID - # will be automatically assigned for the deployment. - # @param deployment [::Google::Cloud::Ces::V1beta::Deployment, ::Hash] - # Required. The deployment to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new - # - # # Call the create_deployment method. - # result = client.create_deployment request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. - # p result - # - def create_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateDeploymentRequest - - # Converts hash and nil to an 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.create_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified deployment. - # - # @overload update_deployment(request, options = nil) - # Pass arguments to `update_deployment` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployment(deployment: nil, update_mask: nil) - # Pass arguments to `update_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param deployment [::Google::Cloud::Ces::V1beta::Deployment, ::Hash] - # Required. The deployment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new - # - # # Call the update_deployment method. - # result = client.update_deployment request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. - # p result - # - def update_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest - - # Converts hash and nil to an 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.update_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified deployment. - # - # @overload delete_deployment(request, options = nil) - # Pass arguments to `delete_deployment` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployment(name: nil, etag: nil) - # Pass arguments to `delete_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to delete. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - # @param etag [::String] - # Optional. The etag of the deployment. - # If an etag is provided and does not match the current etag of the - # deployment, deletion will be blocked and an ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new - # - # # Call the delete_deployment method. - # result = client.delete_deployment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest - - # Converts hash and nil to an 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.delete_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists toolsets in the given app. - # - # @overload list_toolsets(request, options = nil) - # Pass arguments to `list_toolsets` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListToolsetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListToolsetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_toolsets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_toolsets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list toolsets from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListToolsetsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_toolsets AgentService.ListToolsets} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the toolsets. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Toolset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Toolset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListToolsetsRequest.new - # - # # Call the list_toolsets method. - # result = client.list_toolsets 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::Ces::V1beta::Toolset. - # p item - # end - # - def list_toolsets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListToolsetsRequest - - # Converts hash and nil to an 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_toolsets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_toolsets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_toolsets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.list_toolsets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_toolsets, "toolsets", 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 the specified toolset. - # - # @overload get_toolset(request, options = nil) - # Pass arguments to `get_toolset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetToolsetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetToolsetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_toolset(name: nil) - # Pass arguments to `get_toolset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the toolset to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Toolset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetToolsetRequest.new - # - # # Call the get_toolset method. - # result = client.get_toolset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. - # p result - # - def get_toolset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetToolsetRequest - - # Converts hash and nil to an 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_toolset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_toolset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.get_toolset 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 toolset in the given app. - # - # @overload create_toolset(request, options = nil) - # Pass arguments to `create_toolset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateToolsetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateToolsetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_toolset(parent: nil, toolset_id: nil, toolset: nil) - # Pass arguments to `create_toolset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to create a toolset in. - # @param toolset_id [::String] - # Optional. The ID to use for the toolset, which will become the final - # component of the toolset's resource name. If not provided, a unique ID will - # be automatically assigned for the toolset. - # @param toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] - # Required. The toolset to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Toolset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateToolsetRequest.new - # - # # Call the create_toolset method. - # result = client.create_toolset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. - # p result - # - def create_toolset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateToolsetRequest - - # Converts hash and nil to an 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_toolset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_toolset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.create_toolset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified toolset. - # - # @overload update_toolset(request, options = nil) - # Pass arguments to `update_toolset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateToolsetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateToolsetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_toolset(toolset: nil, update_mask: nil) - # Pass arguments to `update_toolset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] - # Required. The toolset to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Toolset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new - # - # # Call the update_toolset method. - # result = client.update_toolset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. - # p result - # - def update_toolset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateToolsetRequest - - # Converts hash and nil to an 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_toolset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_toolset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.update_toolset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified toolset. - # - # @overload delete_toolset(request, options = nil) - # Pass arguments to `delete_toolset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteToolsetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteToolsetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_toolset(name: nil, force: nil, etag: nil) - # Pass arguments to `delete_toolset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the toolset to delete. - # @param force [::Boolean] - # Optional. Indicates whether to forcefully delete the toolset, even if it is - # still referenced by app/agents. - # - # * If `force = false`, the deletion fails if any agents still - # reference the toolset. - # * If `force = true`, all existing references from agents will be - # removed and the toolset will be deleted. - # @param etag [::String] - # Optional. The current etag of the toolset. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the toolset, deletion will be blocked - # and an ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new - # - # # Call the delete_toolset method. - # result = client.delete_toolset request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_toolset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteToolsetRequest - - # Converts hash and nil to an 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_toolset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_toolset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_toolset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.delete_toolset 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 app versions in the given app. - # - # @overload list_app_versions(request, options = nil) - # Pass arguments to `list_app_versions` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListAppVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListAppVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_app_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list app versions from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListAppVersionsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_app_versions AgentService.ListAppVersions} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the app versions. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::AppVersion>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::AppVersion>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new - # - # # Call the list_app_versions method. - # result = client.list_app_versions 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::Ces::V1beta::AppVersion. - # p item - # end - # - def list_app_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListAppVersionsRequest - - # Converts hash and nil to an 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_app_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_app_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.list_app_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_app_versions, "app_versions", 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 the specified app version. - # - # @overload get_app_version(request, options = nil) - # Pass arguments to `get_app_version` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetAppVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetAppVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app_version(name: nil) - # Pass arguments to `get_app_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app version to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::AppVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::AppVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetAppVersionRequest.new - # - # # Call the get_app_version method. - # result = client.get_app_version request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. - # p result - # - def get_app_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetAppVersionRequest - - # Converts hash and nil to an 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_app_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_app_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.get_app_version 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 app version in the given app. - # - # @overload create_app_version(request, options = nil) - # Pass arguments to `create_app_version` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateAppVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateAppVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app_version(parent: nil, app_version_id: nil, app_version: nil) - # Pass arguments to `create_app_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to create an app version in. - # @param app_version_id [::String] - # Optional. The ID to use for the app version, which will become the final - # component of the app version's resource name. If not provided, a unique ID - # will be automatically assigned for the app version. - # @param app_version [::Google::Cloud::Ces::V1beta::AppVersion, ::Hash] - # Required. The app version to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::AppVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::AppVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new - # - # # Call the create_app_version method. - # result = client.create_app_version request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. - # p result - # - def create_app_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateAppVersionRequest - - # Converts hash and nil to an 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_app_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_app_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.create_app_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified app version. - # - # @overload delete_app_version(request, options = nil) - # Pass arguments to `delete_app_version` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_app_version(name: nil, etag: nil) - # Pass arguments to `delete_app_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app version to delete. - # @param etag [::String] - # Optional. The current etag of the app version. If an etag is not provided, - # the deletion will overwrite any concurrent changes. If an etag is provided - # and does not match the current etag of the app version, deletion will be - # blocked and an ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new - # - # # Call the delete_app_version method. - # result = client.delete_app_version request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_app_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest - - # Converts hash and nil to an 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_app_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_app_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_app_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.delete_app_version 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 - - ## - # Restores the specified app version. - # This will create a new app version from the current draft app and overwrite - # the current draft with the specified app version. - # - # @overload restore_app_version(request, options = nil) - # Pass arguments to `restore_app_version` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restore_app_version(name: nil) - # Pass arguments to `restore_app_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the app version to restore. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.new - # - # # Call the restore_app_version method. - # result = client.restore_app_version 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 restore_app_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restore_app_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.restore_app_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restore_app_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.restore_app_version 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 - - ## - # Generates specific resources (e.g. agent) in the app using LLM assistant. - # - # @overload generate_app_resource(request, options = nil) - # Pass arguments to `generate_app_resource` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload generate_app_resource(agent: nil, tool: nil, toolset: nil, app_version_context: nil, parent: nil, refine_instructions: nil, tool_generation_config: nil, app_generation_config: nil, evaluation_generation_config: nil, evaluation_personas_generation_config: nil, quality_report_generation_config: nil, hill_climbing_fix_config: nil) - # Pass arguments to `generate_app_resource` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param agent [::Google::Cloud::Ces::V1beta::Agent, ::Hash] - # The agent resource to be used by the LLM assistant, can be empty for - # generating a new agent. - # - # Note: The following parameters are mutually exclusive: `agent`, `tool`, `toolset`, `app_version_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 tool [::Google::Cloud::Ces::V1beta::Tool, ::Hash] - # The tool resource to be used by the LLM assistant, can be empty for - # generating a new tool. - # - # Note: The following parameters are mutually exclusive: `tool`, `agent`, `toolset`, `app_version_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 toolset [::Google::Cloud::Ces::V1beta::Toolset, ::Hash] - # The toolset resource to be used by the LLM assistant, can be empty for - # generating a new toolset. - # - # Note: The following parameters are mutually exclusive: `toolset`, `agent`, `tool`, `app_version_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 app_version_context [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppVersionContext, ::Hash] - # The app version context specifying the base snapshot and target agent. - # - # Note: The following parameters are mutually exclusive: `app_version_context`, `agent`, `tool`, `toolset`. 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 parent [::String] - # Required. The resource name of the app to generate the resource for. - # @param refine_instructions [::Array<::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::RefineInstructions, ::Hash>] - # Optional. List of refine instructions to be used to refine the resource. - # @param tool_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig, ::Hash] - # Optional. The configuration to be used to generate the tool. - # @param app_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppGenerationConfig, ::Hash] - # Optional. The configuration to be used to generate the agents and tools. - # @param evaluation_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationGenerationConfig, ::Hash] - # Optional. The configuration to be used to generate the evaluations. - # @param evaluation_personas_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationPersonasGenerationConfig, ::Hash] - # Optional. The configuration to be used to generate the evaluation personas. - # @param quality_report_generation_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::QualityReportGenerationConfig, ::Hash] - # Optional. The configuration to be used for quality report generation. - # @param hill_climbing_fix_config [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::HillClimbingFixConfig, ::Hash] - # Optional. The configuration to be used for hill climbing fixes. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new - # - # # Call the generate_app_resource method. - # result = client.generate_app_resource 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 generate_app_resource request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.generate_app_resource.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.generate_app_resource.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_app_resource.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.generate_app_resource 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 - - ## - # Lists the changelogs of the specified app. - # - # @overload list_changelogs(request, options = nil) - # Pass arguments to `list_changelogs` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListChangelogsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListChangelogsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_changelogs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_changelogs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list changelogs from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListChangelogsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Rest::Client#list_changelogs AgentService.ListChangelogs} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the changelogs. - # See https://google.aip.dev/160 for more details. - # - # The filter string can be used to filter by `action`, `resource_type`, - # `resource_name`, `author`, and `create_time`. - # The `:` comparator can be used for case-insensitive partial matching on - # string fields, while `=` performs an exact case-sensitive match. - # - # Examples: - # * `action:update` (case-insensitive partial match) - # * `action="Create"` (case-sensitive exact match) - # * `resource_type:agent` - # * `resource_name:my-agent` - # * `author:me@example.com` - # * `create_time > "2025-01-01T00:00:00Z"` - # * `create_time <= "2025-01-01T00:00:00Z" AND resource_type:tool` - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Changelog>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Changelog>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListChangelogsRequest.new - # - # # Call the list_changelogs method. - # result = client.list_changelogs 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::Ces::V1beta::Changelog. - # p item - # end - # - def list_changelogs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListChangelogsRequest - - # Converts hash and nil to an 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_changelogs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_changelogs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_changelogs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.list_changelogs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @agent_service_stub, :list_changelogs, "changelogs", 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 specified changelog. - # - # @overload get_changelog(request, options = nil) - # Pass arguments to `get_changelog` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetChangelogRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetChangelogRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_changelog(name: nil) - # Pass arguments to `get_changelog` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the changelog to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Changelog] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Changelog] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetChangelogRequest.new - # - # # Call the get_changelog method. - # result = client.get_changelog request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Changelog. - # p result - # - def get_changelog request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetChangelogRequest - - # Converts hash and nil to an 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_changelog.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_changelog.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_changelog.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @agent_service_stub.get_changelog 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 AgentService REST API. - # - # This class represents the configuration for AgentService 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::Ces::V1beta::AgentService::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_apps to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_apps.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_apps.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 = "ces.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 AgentService 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_apps` - # @return [::Gapic::Config::Method] - # - attr_reader :list_apps - ## - # RPC-specific configuration for `get_app` - # @return [::Gapic::Config::Method] - # - attr_reader :get_app - ## - # RPC-specific configuration for `create_app` - # @return [::Gapic::Config::Method] - # - attr_reader :create_app - ## - # RPC-specific configuration for `update_app` - # @return [::Gapic::Config::Method] - # - attr_reader :update_app - ## - # RPC-specific configuration for `delete_app` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_app - ## - # RPC-specific configuration for `export_app` - # @return [::Gapic::Config::Method] - # - attr_reader :export_app - ## - # RPC-specific configuration for `import_app` - # @return [::Gapic::Config::Method] - # - attr_reader :import_app - ## - # RPC-specific configuration for `get_security_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_security_settings - ## - # RPC-specific configuration for `update_security_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_settings - ## - # RPC-specific configuration for `list_agents` - # @return [::Gapic::Config::Method] - # - attr_reader :list_agents - ## - # RPC-specific configuration for `get_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :get_agent - ## - # RPC-specific configuration for `create_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :create_agent - ## - # RPC-specific configuration for `update_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :update_agent - ## - # RPC-specific configuration for `delete_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_agent - ## - # RPC-specific configuration for `list_examples` - # @return [::Gapic::Config::Method] - # - attr_reader :list_examples - ## - # RPC-specific configuration for `get_example` - # @return [::Gapic::Config::Method] - # - attr_reader :get_example - ## - # RPC-specific configuration for `create_example` - # @return [::Gapic::Config::Method] - # - attr_reader :create_example - ## - # RPC-specific configuration for `update_example` - # @return [::Gapic::Config::Method] - # - attr_reader :update_example - ## - # RPC-specific configuration for `delete_example` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_example - ## - # RPC-specific configuration for `list_tools` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tools - ## - # RPC-specific configuration for `get_tool` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tool - ## - # RPC-specific configuration for `list_conversations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversations - ## - # RPC-specific configuration for `get_conversation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversation - ## - # RPC-specific configuration for `delete_conversation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversation - ## - # RPC-specific configuration for `batch_delete_conversations` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_delete_conversations - ## - # RPC-specific configuration for `create_tool` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tool - ## - # RPC-specific configuration for `update_tool` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tool - ## - # RPC-specific configuration for `delete_tool` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tool - ## - # RPC-specific configuration for `list_guardrails` - # @return [::Gapic::Config::Method] - # - attr_reader :list_guardrails - ## - # RPC-specific configuration for `get_guardrail` - # @return [::Gapic::Config::Method] - # - attr_reader :get_guardrail - ## - # RPC-specific configuration for `create_guardrail` - # @return [::Gapic::Config::Method] - # - attr_reader :create_guardrail - ## - # RPC-specific configuration for `update_guardrail` - # @return [::Gapic::Config::Method] - # - attr_reader :update_guardrail - ## - # RPC-specific configuration for `delete_guardrail` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_guardrail - ## - # RPC-specific configuration for `list_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_deployments - ## - # RPC-specific configuration for `get_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_deployment - ## - # RPC-specific configuration for `create_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_deployment - ## - # RPC-specific configuration for `update_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_deployment - ## - # RPC-specific configuration for `delete_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_deployment - ## - # RPC-specific configuration for `list_toolsets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_toolsets - ## - # RPC-specific configuration for `get_toolset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_toolset - ## - # RPC-specific configuration for `create_toolset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_toolset - ## - # RPC-specific configuration for `update_toolset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_toolset - ## - # RPC-specific configuration for `delete_toolset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_toolset - ## - # RPC-specific configuration for `list_app_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_app_versions - ## - # RPC-specific configuration for `get_app_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_app_version - ## - # RPC-specific configuration for `create_app_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_app_version - ## - # RPC-specific configuration for `delete_app_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_app_version - ## - # RPC-specific configuration for `restore_app_version` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_app_version - ## - # RPC-specific configuration for `generate_app_resource` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_app_resource - ## - # RPC-specific configuration for `list_changelogs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_changelogs - ## - # RPC-specific configuration for `get_changelog` - # @return [::Gapic::Config::Method] - # - attr_reader :get_changelog - - # @private - def initialize parent_rpcs = nil - list_apps_config = parent_rpcs.list_apps if parent_rpcs.respond_to? :list_apps - @list_apps = ::Gapic::Config::Method.new list_apps_config - get_app_config = parent_rpcs.get_app if parent_rpcs.respond_to? :get_app - @get_app = ::Gapic::Config::Method.new get_app_config - create_app_config = parent_rpcs.create_app if parent_rpcs.respond_to? :create_app - @create_app = ::Gapic::Config::Method.new create_app_config - update_app_config = parent_rpcs.update_app if parent_rpcs.respond_to? :update_app - @update_app = ::Gapic::Config::Method.new update_app_config - delete_app_config = parent_rpcs.delete_app if parent_rpcs.respond_to? :delete_app - @delete_app = ::Gapic::Config::Method.new delete_app_config - export_app_config = parent_rpcs.export_app if parent_rpcs.respond_to? :export_app - @export_app = ::Gapic::Config::Method.new export_app_config - import_app_config = parent_rpcs.import_app if parent_rpcs.respond_to? :import_app - @import_app = ::Gapic::Config::Method.new import_app_config - get_security_settings_config = parent_rpcs.get_security_settings if parent_rpcs.respond_to? :get_security_settings - @get_security_settings = ::Gapic::Config::Method.new get_security_settings_config - update_security_settings_config = parent_rpcs.update_security_settings if parent_rpcs.respond_to? :update_security_settings - @update_security_settings = ::Gapic::Config::Method.new update_security_settings_config - list_agents_config = parent_rpcs.list_agents if parent_rpcs.respond_to? :list_agents - @list_agents = ::Gapic::Config::Method.new list_agents_config - get_agent_config = parent_rpcs.get_agent if parent_rpcs.respond_to? :get_agent - @get_agent = ::Gapic::Config::Method.new get_agent_config - create_agent_config = parent_rpcs.create_agent if parent_rpcs.respond_to? :create_agent - @create_agent = ::Gapic::Config::Method.new create_agent_config - update_agent_config = parent_rpcs.update_agent if parent_rpcs.respond_to? :update_agent - @update_agent = ::Gapic::Config::Method.new update_agent_config - delete_agent_config = parent_rpcs.delete_agent if parent_rpcs.respond_to? :delete_agent - @delete_agent = ::Gapic::Config::Method.new delete_agent_config - list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples - @list_examples = ::Gapic::Config::Method.new list_examples_config - get_example_config = parent_rpcs.get_example if parent_rpcs.respond_to? :get_example - @get_example = ::Gapic::Config::Method.new get_example_config - create_example_config = parent_rpcs.create_example if parent_rpcs.respond_to? :create_example - @create_example = ::Gapic::Config::Method.new create_example_config - update_example_config = parent_rpcs.update_example if parent_rpcs.respond_to? :update_example - @update_example = ::Gapic::Config::Method.new update_example_config - delete_example_config = parent_rpcs.delete_example if parent_rpcs.respond_to? :delete_example - @delete_example = ::Gapic::Config::Method.new delete_example_config - list_tools_config = parent_rpcs.list_tools if parent_rpcs.respond_to? :list_tools - @list_tools = ::Gapic::Config::Method.new list_tools_config - get_tool_config = parent_rpcs.get_tool if parent_rpcs.respond_to? :get_tool - @get_tool = ::Gapic::Config::Method.new get_tool_config - list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations - @list_conversations = ::Gapic::Config::Method.new list_conversations_config - get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation - @get_conversation = ::Gapic::Config::Method.new get_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 - batch_delete_conversations_config = parent_rpcs.batch_delete_conversations if parent_rpcs.respond_to? :batch_delete_conversations - @batch_delete_conversations = ::Gapic::Config::Method.new batch_delete_conversations_config - create_tool_config = parent_rpcs.create_tool if parent_rpcs.respond_to? :create_tool - @create_tool = ::Gapic::Config::Method.new create_tool_config - update_tool_config = parent_rpcs.update_tool if parent_rpcs.respond_to? :update_tool - @update_tool = ::Gapic::Config::Method.new update_tool_config - delete_tool_config = parent_rpcs.delete_tool if parent_rpcs.respond_to? :delete_tool - @delete_tool = ::Gapic::Config::Method.new delete_tool_config - list_guardrails_config = parent_rpcs.list_guardrails if parent_rpcs.respond_to? :list_guardrails - @list_guardrails = ::Gapic::Config::Method.new list_guardrails_config - get_guardrail_config = parent_rpcs.get_guardrail if parent_rpcs.respond_to? :get_guardrail - @get_guardrail = ::Gapic::Config::Method.new get_guardrail_config - create_guardrail_config = parent_rpcs.create_guardrail if parent_rpcs.respond_to? :create_guardrail - @create_guardrail = ::Gapic::Config::Method.new create_guardrail_config - update_guardrail_config = parent_rpcs.update_guardrail if parent_rpcs.respond_to? :update_guardrail - @update_guardrail = ::Gapic::Config::Method.new update_guardrail_config - delete_guardrail_config = parent_rpcs.delete_guardrail if parent_rpcs.respond_to? :delete_guardrail - @delete_guardrail = ::Gapic::Config::Method.new delete_guardrail_config - list_deployments_config = parent_rpcs.list_deployments if parent_rpcs.respond_to? :list_deployments - @list_deployments = ::Gapic::Config::Method.new list_deployments_config - get_deployment_config = parent_rpcs.get_deployment if parent_rpcs.respond_to? :get_deployment - @get_deployment = ::Gapic::Config::Method.new get_deployment_config - create_deployment_config = parent_rpcs.create_deployment if parent_rpcs.respond_to? :create_deployment - @create_deployment = ::Gapic::Config::Method.new create_deployment_config - update_deployment_config = parent_rpcs.update_deployment if parent_rpcs.respond_to? :update_deployment - @update_deployment = ::Gapic::Config::Method.new update_deployment_config - delete_deployment_config = parent_rpcs.delete_deployment if parent_rpcs.respond_to? :delete_deployment - @delete_deployment = ::Gapic::Config::Method.new delete_deployment_config - list_toolsets_config = parent_rpcs.list_toolsets if parent_rpcs.respond_to? :list_toolsets - @list_toolsets = ::Gapic::Config::Method.new list_toolsets_config - get_toolset_config = parent_rpcs.get_toolset if parent_rpcs.respond_to? :get_toolset - @get_toolset = ::Gapic::Config::Method.new get_toolset_config - create_toolset_config = parent_rpcs.create_toolset if parent_rpcs.respond_to? :create_toolset - @create_toolset = ::Gapic::Config::Method.new create_toolset_config - update_toolset_config = parent_rpcs.update_toolset if parent_rpcs.respond_to? :update_toolset - @update_toolset = ::Gapic::Config::Method.new update_toolset_config - delete_toolset_config = parent_rpcs.delete_toolset if parent_rpcs.respond_to? :delete_toolset - @delete_toolset = ::Gapic::Config::Method.new delete_toolset_config - list_app_versions_config = parent_rpcs.list_app_versions if parent_rpcs.respond_to? :list_app_versions - @list_app_versions = ::Gapic::Config::Method.new list_app_versions_config - get_app_version_config = parent_rpcs.get_app_version if parent_rpcs.respond_to? :get_app_version - @get_app_version = ::Gapic::Config::Method.new get_app_version_config - create_app_version_config = parent_rpcs.create_app_version if parent_rpcs.respond_to? :create_app_version - @create_app_version = ::Gapic::Config::Method.new create_app_version_config - delete_app_version_config = parent_rpcs.delete_app_version if parent_rpcs.respond_to? :delete_app_version - @delete_app_version = ::Gapic::Config::Method.new delete_app_version_config - restore_app_version_config = parent_rpcs.restore_app_version if parent_rpcs.respond_to? :restore_app_version - @restore_app_version = ::Gapic::Config::Method.new restore_app_version_config - generate_app_resource_config = parent_rpcs.generate_app_resource if parent_rpcs.respond_to? :generate_app_resource - @generate_app_resource = ::Gapic::Config::Method.new generate_app_resource_config - list_changelogs_config = parent_rpcs.list_changelogs if parent_rpcs.respond_to? :list_changelogs - @list_changelogs = ::Gapic::Config::Method.new list_changelogs_config - get_changelog_config = parent_rpcs.get_changelog if parent_rpcs.respond_to? :get_changelog - @get_changelog = ::Gapic::Config::Method.new get_changelog_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb deleted file mode 100644 index 4bb7b0210fe6..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Ces - module V1beta - module AgentService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AgentService 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 AgentService 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::Ces::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::Ces::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::Ces::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::Ces::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 = "ces.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-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb deleted file mode 100644 index dc12b6d2f227..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb +++ /dev/null @@ -1,3213 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/agent_service_pb" - -module Google - module Cloud - module Ces - module V1beta - module AgentService - module Rest - ## - # REST service stub for the AgentService 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_apps REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListAppsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListAppsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListAppsResponse] - # A result object deserialized from the server's reply - def list_apps request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_apps_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_apps", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListAppsResponse.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_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetAppRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::App] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::App] - # A result object deserialized from the server's reply - def get_app request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_app_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_app", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::App.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_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAppRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_app request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_app_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_app", - 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_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateAppRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::App] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::App] - # A result object deserialized from the server's reply - def update_app request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_app_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_app", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::App.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_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAppRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_app request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_app_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_app", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ExportAppRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_app request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_app_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_app", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ImportAppRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_app request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_app_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_app", - 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_security_settings REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::SecuritySettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] - # A result object deserialized from the server's reply - def get_security_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_security_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_security_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::SecuritySettings.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_security_settings REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::SecuritySettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] - # A result object deserialized from the server's reply - def update_security_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_security_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_security_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::SecuritySettings.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_agents REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListAgentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListAgentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListAgentsResponse] - # A result object deserialized from the server's reply - def list_agents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_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_agents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListAgentsResponse.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_agent REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetAgentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Agent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Agent] - # A result object deserialized from the server's reply - def get_agent request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_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_agent", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Agent.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_agent REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAgentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Agent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Agent] - # A result object deserialized from the server's reply - def create_agent request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_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_agent", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Agent.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_agent REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateAgentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Agent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Agent] - # A result object deserialized from the server's reply - def update_agent request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_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_agent", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Agent.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_agent REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAgentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_agent request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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_agent", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_examples REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListExamplesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListExamplesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListExamplesResponse] - # A result object deserialized from the server's reply - def list_examples request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_examples_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_examples", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListExamplesResponse.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_example REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetExampleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Example] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Example] - # A result object deserialized from the server's reply - def get_example request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_example_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_example", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Example.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_example REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateExampleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Example] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Example] - # A result object deserialized from the server's reply - def create_example request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_example_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_example", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Example.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_example REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateExampleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Example] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Example] - # A result object deserialized from the server's reply - def update_example request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_example_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_example", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Example.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_example REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteExampleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_example request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_example_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_example", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tools REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListToolsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListToolsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListToolsResponse] - # A result object deserialized from the server's reply - def list_tools request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tools_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tools", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListToolsResponse.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_tool REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetToolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Tool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Tool] - # A result object deserialized from the server's reply - def get_tool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_tool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Tool.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::Ces::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::Ces::V1beta::ListConversationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::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::Ces::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 get_conversation REST call - # - # @param request_pb [::Google::Cloud::Ces::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::Ces::V1beta::Conversation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::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::Ces::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::Ces::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 batch_delete_conversations REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_delete_conversations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_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: "batch_delete_conversations", - 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 create_tool REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateToolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Tool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Tool] - # A result object deserialized from the server's reply - def create_tool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_tool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Tool.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_tool REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateToolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Tool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Tool] - # A result object deserialized from the server's reply - def update_tool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_tool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Tool.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_tool REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteToolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_tool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_tool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_guardrails REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListGuardrailsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListGuardrailsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListGuardrailsResponse] - # A result object deserialized from the server's reply - def list_guardrails request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_guardrails_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_guardrails", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListGuardrailsResponse.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_guardrail REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetGuardrailRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Guardrail] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # A result object deserialized from the server's reply - def get_guardrail request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_guardrail_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_guardrail", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Guardrail.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_guardrail REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateGuardrailRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Guardrail] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # A result object deserialized from the server's reply - def create_guardrail request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_guardrail_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_guardrail", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Guardrail.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_guardrail REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Guardrail] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # A result object deserialized from the server's reply - def update_guardrail request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_guardrail_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_guardrail", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Guardrail.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_guardrail REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_guardrail request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_guardrail_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_guardrail", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_deployments REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListDeploymentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListDeploymentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListDeploymentsResponse] - # A result object deserialized from the server's reply - def list_deployments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_deployments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_deployments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListDeploymentsResponse.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_deployment REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # A result object deserialized from the server's reply - def get_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Deployment.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_deployment REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # A result object deserialized from the server's reply - def create_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Deployment.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_deployment REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # A result object deserialized from the server's reply - def update_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Deployment.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_deployment REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_toolsets REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListToolsetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListToolsetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListToolsetsResponse] - # A result object deserialized from the server's reply - def list_toolsets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_toolsets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_toolsets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListToolsetsResponse.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_toolset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetToolsetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Toolset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # A result object deserialized from the server's reply - def get_toolset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_toolset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_toolset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Toolset.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_toolset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateToolsetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Toolset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # A result object deserialized from the server's reply - def create_toolset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_toolset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_toolset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Toolset.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_toolset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateToolsetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Toolset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # A result object deserialized from the server's reply - def update_toolset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_toolset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_toolset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Toolset.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_toolset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteToolsetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_toolset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_toolset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_toolset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_app_versions REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListAppVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListAppVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListAppVersionsResponse] - # A result object deserialized from the server's reply - def list_app_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_app_versions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_app_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListAppVersionsResponse.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_app_version REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetAppVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::AppVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::AppVersion] - # A result object deserialized from the server's reply - def get_app_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_app_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_app_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::AppVersion.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_app_version REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAppVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::AppVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::AppVersion] - # A result object deserialized from the server's reply - def create_app_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_app_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_app_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::AppVersion.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_app_version REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_app_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_app_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_app_version", - 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 restore_app_version REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 restore_app_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restore_app_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "restore_app_version", - 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 generate_app_resource REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 generate_app_resource request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_app_resource_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "generate_app_resource", - 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 list_changelogs REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListChangelogsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListChangelogsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListChangelogsResponse] - # A result object deserialized from the server's reply - def list_changelogs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_changelogs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_changelogs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListChangelogsResponse.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_changelog REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetChangelogRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Changelog] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Changelog] - # A result object deserialized from the server's reply - def get_changelog request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_changelog_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_changelog", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Changelog.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_apps REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListAppsRequest] - # 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_apps_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/apps", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetAppRequest] - # 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_app_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAppRequest] - # 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_app_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/apps", - body: "app", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateAppRequest] - # 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_app_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{app.name}", - body: "app", - matches: [ - ["app.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAppRequest] - # 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_app_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ExportAppRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_app_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:exportApp", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_app REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ImportAppRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_app_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/apps:importApp", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_security_settings REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest] - # 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_security_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/securitySettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_security_settings REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest] - # 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_security_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{security_settings.name}", - body: "security_settings", - matches: [ - ["security_settings.name", %r{^projects/[^/]+/locations/[^/]+/securitySettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_agents REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListAgentsRequest] - # 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_agents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/agents", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_agent REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetAgentRequest] - # 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_agent_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/agents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_agent REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAgentRequest] - # 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_agent_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/agents", - body: "agent", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_agent REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateAgentRequest] - # 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_agent_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{agent.name}", - body: "agent", - matches: [ - ["agent.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/agents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_agent REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAgentRequest] - # 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_agent_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/agents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_examples REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListExamplesRequest] - # 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_examples_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/examples", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_example REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetExampleRequest] - # 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_example_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/examples/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_example REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateExampleRequest] - # 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_example_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/examples", - body: "example", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_example REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateExampleRequest] - # 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_example_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{example.name}", - body: "example", - matches: [ - ["example.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/examples/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_example REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteExampleRequest] - # 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_example_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/examples/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tools REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListToolsRequest] - # 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_tools_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/tools", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_tool REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetToolRequest] - # 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_tool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/tools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_conversations REST call - # - # @param request_pb [::Google::Cloud::Ces::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/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_conversation REST call - # - # @param request_pb [::Google::Cloud::Ces::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/[^/]+/apps/[^/]+/conversations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_conversation REST call - # - # @param request_pb [::Google::Cloud::Ces::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/[^/]+/apps/[^/]+/conversations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_delete_conversations REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_delete_conversations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/conversations:batchDelete", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_tool REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateToolRequest] - # 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_tool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/tools", - body: "tool", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_tool REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateToolRequest] - # 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_tool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{tool.name}", - body: "tool", - matches: [ - ["tool.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/tools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_tool REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteToolRequest] - # 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_tool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/tools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_guardrails REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListGuardrailsRequest] - # 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_guardrails_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/guardrails", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_guardrail REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetGuardrailRequest] - # 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_guardrail_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/guardrails/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_guardrail REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateGuardrailRequest] - # 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_guardrail_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/guardrails", - body: "guardrail", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_guardrail REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest] - # 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_guardrail_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{guardrail.name}", - body: "guardrail", - matches: [ - ["guardrail.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/guardrails/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_guardrail REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest] - # 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_guardrail_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/guardrails/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_deployments REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListDeploymentsRequest] - # 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_deployments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/deployments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_deployment REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetDeploymentRequest] - # 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_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_deployment REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateDeploymentRequest] - # 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_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/deployments", - body: "deployment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_deployment REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest] - # 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_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{deployment.name}", - body: "deployment", - matches: [ - ["deployment.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_deployment REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest] - # 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_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_toolsets REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListToolsetsRequest] - # 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_toolsets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/toolsets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_toolset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetToolsetRequest] - # 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_toolset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/toolsets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_toolset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateToolsetRequest] - # 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_toolset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/toolsets", - body: "toolset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_toolset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateToolsetRequest] - # 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_toolset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{toolset.name}", - body: "toolset", - matches: [ - ["toolset.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/toolsets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_toolset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteToolsetRequest] - # 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_toolset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/toolsets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_app_versions REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListAppVersionsRequest] - # 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_app_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_app_version REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetAppVersionRequest] - # 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_app_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_app_version REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateAppVersionRequest] - # 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_app_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/versions", - body: "app_version", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_app_version REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest] - # 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_app_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restore_app_version REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restore_app_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:restore", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_app_resource REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_generate_app_resource_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}:generateAppResource", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_changelogs REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListChangelogsRequest] - # 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_changelogs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/changelogs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_changelog REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetChangelogRequest] - # 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_changelog_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/changelogs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb deleted file mode 100644 index ac4a09622c00..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/agent_service_pb.rb +++ /dev/null @@ -1,132 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/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/resource_pb' -require 'google/cloud/ces/v1beta/agent_pb' -require 'google/cloud/ces/v1beta/app_pb' -require 'google/cloud/ces/v1beta/app_version_pb' -require 'google/cloud/ces/v1beta/changelog_pb' -require 'google/cloud/ces/v1beta/conversation_pb' -require 'google/cloud/ces/v1beta/deployment_pb' -require 'google/cloud/ces/v1beta/evaluation_pb' -require 'google/cloud/ces/v1beta/example_pb' -require 'google/cloud/ces/v1beta/file_context_pb' -require 'google/cloud/ces/v1beta/guardrail_pb' -require 'google/cloud/ces/v1beta/security_settings_pb' -require 'google/cloud/ces/v1beta/tool_pb' -require 'google/cloud/ces/v1beta/toolset_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n+google/cloud/ces/v1beta/agent_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/ces/v1beta/agent.proto\x1a!google/cloud/ces/v1beta/app.proto\x1a)google/cloud/ces/v1beta/app_version.proto\x1a\'google/cloud/ces/v1beta/changelog.proto\x1a*google/cloud/ces/v1beta/conversation.proto\x1a(google/cloud/ces/v1beta/deployment.proto\x1a(google/cloud/ces/v1beta/evaluation.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a*google/cloud/ces/v1beta/file_context.proto\x1a\'google/cloud/ces/v1beta/guardrail.proto\x1a/google/cloud/ces/v1beta/security_settings.proto\x1a\"google/cloud/ces/v1beta/tool.proto\x1a%google/cloud/ces/v1beta/toolset.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9e\x01\n\x0fListAppsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16\x63\x65s.googleapis.com/App\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\"q\n\x10ListAppsResponse\x12*\n\x04\x61pps\x18\x01 \x03(\x0b\x32\x1c.google.cloud.ces.v1beta.App\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"=\n\rGetAppRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\"\x87\x01\n\x10\x43reateAppRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16\x63\x65s.googleapis.com/App\x12\x13\n\x06\x61pp_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12.\n\x03\x61pp\x18\x03 \x01(\x0b\x32\x1c.google.cloud.ces.v1beta.AppB\x03\xe0\x41\x02\"x\n\x10UpdateAppRequest\x12.\n\x03\x61pp\x18\x01 \x01(\x0b\x32\x1c.google.cloud.ces.v1beta.AppB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"S\n\x10\x44\x65leteAppRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa9\x02\n\x10\x45xportAppRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12R\n\rexport_format\x18\x02 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.ExportAppRequest.ExportFormatB\x03\xe0\x41\x02\x12\x14\n\x07gcs_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12:\n\x0b\x61pp_version\x18\x04 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"A\n\x0c\x45xportFormat\x12\x1d\n\x19\x45XPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x08\n\x04YAML\x10\x02\"D\n\x11\x45xportAppResponse\x12\x15\n\x0b\x61pp_content\x18\x01 \x01(\x0cH\x00\x12\x11\n\x07\x61pp_uri\x18\x02 \x01(\tH\x00\x42\x05\n\x03\x61pp\"\x90\x04\n\x10ImportAppRequest\x12\x11\n\x07gcs_uri\x18\x04 \x01(\tH\x00\x12\x15\n\x0b\x61pp_content\x18\x05 \x01(\x0cH\x00\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16\x63\x65s.googleapis.com/App\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x61pp_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12T\n\x0eimport_options\x18\x06 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.ImportAppRequest.ImportOptionsB\x03\xe0\x41\x01\x12\x1c\n\x0fignore_app_lock\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xf6\x01\n\rImportOptions\x12}\n\x1c\x63onflict_resolution_strategy\x18\x01 \x01(\x0e\x32R.google.cloud.ces.v1beta.ImportAppRequest.ImportOptions.ConflictResolutionStrategyB\x03\xe0\x41\x01\"f\n\x1a\x43onflictResolutionStrategy\x12,\n(CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED\x10\x00\x12\x0b\n\x07REPLACE\x10\x01\x12\r\n\tOVERWRITE\x10\x02\x42\x05\n\x03\x61pp\"P\n\x11ImportAppResponse\x12)\n\x04name\x18\x01 \x01(\tB\x1b\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x10\n\x08warnings\x18\x02 \x03(\t\"\xa2\x01\n\x11ListAgentsRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x63\x65s.googleapis.com/Agent\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\"]\n\x12ListAgentsResponse\x12.\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x1e.google.cloud.ces.v1beta.Agent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"A\n\x0fGetAgentRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\"\x91\x01\n\x12\x43reateAgentRequest\x12\x30\n\x06parent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\x12\x18\x63\x65s.googleapis.com/Agent\x12\x15\n\x08\x61gent_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\x05\x61gent\x18\x03 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentB\x03\xe0\x41\x02\"~\n\x12UpdateAgentRequest\x12\x32\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"k\n\x12\x44\x65leteAgentRequest\x12.\n\x04name\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xbe\x01\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\x1b\n\x0estatus_message\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\"\xa6\x01\n\x13ListExamplesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Example\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\"c\n\x14ListExamplesResponse\x12\x32\n\x08\x65xamples\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.Example\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x11GetExampleRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Example\"\x9b\x01\n\x14\x43reateExampleRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Example\x12\x17\n\nexample_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\x07\x65xample\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ExampleB\x03\xe0\x41\x02\"\x84\x01\n\x14UpdateExampleRequest\x12\x36\n\x07\x65xample\x18\x01 \x01(\x0b\x32 .google.cloud.ces.v1beta.ExampleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"[\n\x14\x44\x65leteExampleRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Example\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x10ListToolsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17\x63\x65s.googleapis.com/Tool\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\"Z\n\x11ListToolsResponse\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"?\n\x0eGetToolRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\"\x8c\x01\n\x11\x43reateToolRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17\x63\x65s.googleapis.com/Tool\x12\x14\n\x07tool_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x04tool\x18\x03 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolB\x03\xe0\x41\x02\"{\n\x11UpdateToolRequest\x12\x30\n\x04tool\x18\x01 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"i\n\x11\x44\x65leteToolRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x02\n\x18ListConversationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63\x65s.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\x12\x41\n\x06source\x18\x05 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x03\xe0\x41\x01\x12\x42\n\x07sources\x18\x06 \x03(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x03\xe0\x41\x01\"r\n\x19ListConversationsResponse\x12<\n\rconversations\x18\x01 \x03(\x0b\x32%.google.cloud.ces.v1beta.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x94\x01\n\x16GetConversationRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x43\n\x06source\x18\x02 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x05\x18\x01\xe0\x41\x01\"\x97\x01\n\x19\x44\x65leteConversationRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x43\n\x06source\x18\x02 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x05\x18\x01\xe0\x41\x01\"\x9a\x01\n\x1f\x42\x61tchDeleteConversationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63\x65s.googleapis.com/Conversation\x12>\n\rconversations\x18\x02 \x03(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\"|\n BatchDeleteConversationsResponse\x12\x1d\n\x15\x64\x65leted_conversations\x18\x01 \x03(\t\x12\x1c\n\x14\x66\x61iled_conversations\x18\x02 \x03(\t\x12\x1b\n\x0e\x65rror_messages\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x15ListGuardrailsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Guardrail\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\"i\n\x16ListGuardrailsResponse\x12\x36\n\nguardrails\x18\x01 \x03(\x0b\x32\".google.cloud.ces.v1beta.Guardrail\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"I\n\x13GetGuardrailRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\"\xa5\x01\n\x16\x43reateGuardrailRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Guardrail\x12\x19\n\x0cguardrail_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12:\n\tguardrail\x18\x03 \x01(\x0b\x32\".google.cloud.ces.v1beta.GuardrailB\x03\xe0\x41\x02\"\x8a\x01\n\x16UpdateGuardrailRequest\x12:\n\tguardrail\x18\x01 \x01(\x0b\x32\".google.cloud.ces.v1beta.GuardrailB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"s\n\x16\x44\x65leteGuardrailRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x16ListDeploymentsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Deployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\"l\n\x17ListDeploymentsResponse\x12\x38\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x14GetDeploymentRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\"\xaa\x01\n\x17\x43reateDeploymentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Deployment\x12\x1a\n\rdeployment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12<\n\ndeployment\x18\x02 \x01(\x0b\x32#.google.cloud.ces.v1beta.DeploymentB\x03\xe0\x41\x02\"\x8d\x01\n\x17UpdateDeploymentRequest\x12<\n\ndeployment\x18\x01 \x01(\x0b\x32#.google.cloud.ces.v1beta.DeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"a\n\x17\x44\x65leteDeploymentRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa6\x01\n\x13ListToolsetsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Toolset\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\"c\n\x14ListToolsetsResponse\x12\x32\n\x08toolsets\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.Toolset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x11GetToolsetRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\"\x9b\x01\n\x14\x43reateToolsetRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x63\x65s.googleapis.com/Toolset\x12\x17\n\ntoolset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\x07toolset\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetB\x03\xe0\x41\x02\"\x84\x01\n\x14UpdateToolsetRequest\x12\x36\n\x07toolset\x18\x01 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"o\n\x14\x44\x65leteToolsetRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n\x16ListAppVersionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/AppVersion\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\"m\n\x17ListAppVersionsResponse\x12\x39\n\x0c\x61pp_versions\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.AppVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x14GetAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"a\n\x17\x44\x65leteAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n\x17\x43reateAppVersionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/AppVersion\x12\x1b\n\x0e\x61pp_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12=\n\x0b\x61pp_version\x18\x03 \x01(\x0b\x32#.google.cloud.ces.v1beta.AppVersionB\x03\xe0\x41\x02\"O\n\x18RestoreAppVersionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"\x1b\n\x19RestoreAppVersionResponse\"\xee\x14\n\x1aGenerateAppResourceRequest\x12/\n\x05\x61gent\x18\x02 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentH\x00\x12-\n\x04tool\x18\x04 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolH\x00\x12\x33\n\x07toolset\x18\x06 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetH\x00\x12\x64\n\x13\x61pp_version_context\x18\x0c \x01(\x0b\x32\x45.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppVersionContextH\x00\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12h\n\x13refine_instructions\x18\x03 \x03(\x0b\x32\x46.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsB\x03\xe0\x41\x01\x12m\n\x16tool_generation_config\x18\x05 \x01(\x0b\x32H.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfigB\x03\xe0\x41\x01\x12k\n\x15\x61pp_generation_config\x18\x07 \x01(\x0b\x32G.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfigB\x03\xe0\x41\x01\x12y\n\x1c\x65valuation_generation_config\x18\x08 \x01(\x0b\x32N.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfigB\x03\xe0\x41\x01\x12\x8a\x01\n%evaluation_personas_generation_config\x18\t \x01(\x0b\x32V.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfigB\x03\xe0\x41\x01\x12\x80\x01\n quality_report_generation_config\x18\n \x01(\x0b\x32Q.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfigB\x03\xe0\x41\x01\x12p\n\x18hill_climbing_fix_config\x18\x0b \x01(\x0b\x32I.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfigB\x03\xe0\x41\x01\x1a\x88\x01\n\x11\x41ppVersionContext\x12\x37\n\x0b\x61pp_version\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12:\n\x13\x61gent_resource_name\x18\x02 \x01(\tB\x1d\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x1a\x96\x01\n\x12RefineInstructions\x12\x18\n\x0bstart_index\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x16\n\tend_index\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12\x33\n\nfield_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x19\n\x0cinstructions\x18\x04 \x01(\tB\x03\xe0\x41\x02\x1a\xea\x04\n\x14ToolGenerationConfig\x12\x14\n\x07\x63ontext\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12@\n\rfile_contexts\x18\x03 \x03(\x0b\x32$.google.cloud.ces.v1beta.FileContextB\x03\xe0\x41\x01\x12\x98\x01\n\"open_api_toolset_generation_config\x18\x02 \x01(\x0b\x32g.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfigB\x03\xe0\x41\x01\x1a\xde\x02\n\x1eOpenApiToolsetGenerationConfig\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\xad\x01\n\x1coperation_generation_configs\x18\x02 \x03(\x0b\x32\x81\x01.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfigB\x03\xe0\x41\x02\x1az\n\x19OperationGenerationConfig\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0crequest_json\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rresponse_json\x18\x04 \x01(\tB\x03\xe0\x41\x02\x1a\xf5\x01\n\x13\x41ppGenerationConfig\x12\x14\n\x07\x63ontext\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12@\n\rfile_contexts\x18\x02 \x03(\x0b\x32$.google.cloud.ces.v1beta.FileContextB\x03\xe0\x41\x01\x12H\n\ndataset_id\x18\x03 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,contactcenterinsights.googleapis.com/Dataset\x12!\n\x14generate_evaluations\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cgcs_location\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x66\n\x1a\x45valuationGenerationConfig\x12H\n\ndataset_id\x18\x01 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,contactcenterinsights.googleapis.com/Dataset\x1a$\n\"EvaluationPersonasGenerationConfig\x1a\x61\n\x1dQualityReportGenerationConfig\x12@\n\x0e\x65valuation_run\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x1a\\\n\x15HillClimbingFixConfig\x12\x43\n\x0equality_report\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.QualityReportB\x03\xe0\x41\x02\x42\n\n\x08resource\"\xb4\x07\n\x1bGenerateAppResourceResponse\x12/\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentH\x00\x12\x33\n\x07toolset\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.ToolsetH\x00\x12<\n\x0c\x61pp_snapshot\x18\x04 \x01(\x0b\x32$.google.cloud.ces.v1beta.AppSnapshotH\x00\x12K\n\x05tools\x18\x05 \x01(\x0b\x32:.google.cloud.ces.v1beta.GenerateAppResourceResponse.ToolsH\x00\x12W\n\x0b\x65valuations\x18\x06 \x01(\x0b\x32@.google.cloud.ces.v1beta.GenerateAppResourceResponse.EvaluationsH\x00\x12Z\n\rapp_resources\x18\x07 \x01(\x0b\x32\x41.google.cloud.ces.v1beta.GenerateAppResourceResponse.AppResourcesH\x00\x12@\n\x0equality_report\x18\x08 \x01(\x0b\x32&.google.cloud.ces.v1beta.QualityReportH\x00\x12\x65\n\x14generate_result_info\x18\x02 \x01(\x0b\x32G.google.cloud.ces.v1beta.GenerateAppResourceResponse.GenerateResultInfo\x1aG\n\x0b\x45valuations\x12\x38\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x1a\x35\n\x05Tools\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool\x1a\x84\x01\n\x0c\x41ppResources\x12:\n\x0c\x61pp_snapshot\x18\x01 \x01(\x0b\x32$.google.cloud.ces.v1beta.AppSnapshot\x12\x38\n\x0b\x65valuations\x18\x02 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x1a)\n\x12GenerateResultInfo\x12\x13\n\x0b\x65xplanation\x18\x01 \x01(\tB\x14\n\x12generated_resource\"\x89\x03\n\rQualityReport\x12G\n\x06issues\x18\x01 \x03(\x0b\x32\x32.google.cloud.ces.v1beta.QualityReport.AgentIssuesB\x03\xe0\x41\x01\x12\x1c\n\x0f\x65valuation_runs\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12I\n\x0egeneral_issues\x18\x03 \x03(\x0b\x32,.google.cloud.ces.v1beta.QualityReport.IssueB\x03\xe0\x41\x01\x1a`\n\x05Issue\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10occurrence_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1e\n\x11proposed_solution\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x64\n\x0b\x41gentIssues\x12\x12\n\x05\x61gent\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x06issues\x18\x02 \x03(\x0b\x32,.google.cloud.ces.v1beta.QualityReport.IssueB\x03\xe0\x41\x01\"\xeb\x04\n$GenerateAppResourceOperationMetadata\x12j\n\x0fgeneration_type\x18\x01 \x01(\x0e\x32L.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationTypeB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12/\n\x0epartial_errors\x18\x06 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\"\x91\x02\n\x0eGenerationType\x12\x1f\n\x1bGENERATION_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41GENT_RESTRUCTURE\x10\x01\x12\x10\n\x0c\x41GENT_REFINE\x10\x02\x12\x10\n\x0c\x41GENT_CREATE\x10\x03\x12\x0f\n\x0bTOOL_CREATE\x10\x04\x12\x13\n\x0fSCENARIO_CREATE\x10\x05\x12$\n SCENARIO_CREATE_FROM_TRANSCRIPTS\x10\x07\x12\x1d\n\x19\x45VALUATION_PERSONA_CREATE\x10\x06\x12\x19\n\x15QUALITY_REPORT_CREATE\x10\x08\x12\x1d\n\x19INSTRUCTION_FOLLOWING_FIX\x10\t\"\xaa\x01\n\x15ListChangelogsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\x12\x1c\x63\x65s.googleapis.com/Changelog\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\"i\n\x16ListChangelogsResponse\x12\x36\n\nchangelogs\x18\x01 \x03(\x0b\x32\".google.cloud.ces.v1beta.Changelog\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"I\n\x13GetChangelogRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\"W\n\x1aGetSecuritySettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/SecuritySettings\"\xa0\x01\n\x1dUpdateSecuritySettingsRequest\x12I\n\x11security_settings\x18\x01 \x01(\x0b\x32).google.cloud.ces.v1beta.SecuritySettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\xd6M\n\x0c\x41gentService\x12\x9e\x01\n\x08ListApps\x12(.google.cloud.ces.v1beta.ListAppsRequest\x1a).google.cloud.ces.v1beta.ListAppsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1beta/{parent=projects/*/locations/*}/apps\x12\x8b\x01\n\x06GetApp\x12&.google.cloud.ces.v1beta.GetAppRequest\x1a\x1c.google.cloud.ces.v1beta.App\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1beta/{name=projects/*/locations/*/apps/*}\x12\xcc\x01\n\tCreateApp\x12).google.cloud.ces.v1beta.CreateAppRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x18\n\x03\x41pp\x12\x11OperationMetadata\xda\x41\x11parent,app,app_id\xda\x41\nparent,app\x82\xd3\xe4\x93\x02\x33\",/v1beta/{parent=projects/*/locations/*}/apps:\x03\x61pp\x12\xa5\x01\n\tUpdateApp\x12).google.cloud.ces.v1beta.UpdateAppRequest\x1a\x1c.google.cloud.ces.v1beta.App\"O\xda\x41\x0f\x61pp,update_mask\x82\xd3\xe4\x93\x02\x37\x32\x30/v1beta/{app.name=projects/*/locations/*/apps/*}:\x03\x61pp\x12\xbf\x01\n\tDeleteApp\x12).google.cloud.ces.v1beta.DeleteAppRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1beta/{name=projects/*/locations/*/apps/*}\x12\xc8\x01\n\tExportApp\x12).google.cloud.ces.v1beta.ExportAppRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41&\n\x11\x45xportAppResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta/{name=projects/*/locations/*/apps/*}:exportApp:\x01*\x12\xdf\x01\n\tImportApp\x12).google.cloud.ces.v1beta.ImportAppRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41&\n\x11ImportAppResponse\x12\x11OperationMetadata\xda\x41\x1aparent,display_name,app_id\x82\xd3\xe4\x93\x02;\"6/v1beta/{parent=projects/*/locations/*}/apps:importApp:\x01*\x12\xbc\x01\n\x13GetSecuritySettings\x12\x33.google.cloud.ces.v1beta.GetSecuritySettingsRequest\x1a).google.cloud.ces.v1beta.SecuritySettings\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta/{name=projects/*/locations/*/securitySettings}\x12\x81\x02\n\x16UpdateSecuritySettings\x12\x36.google.cloud.ces.v1beta.UpdateSecuritySettingsRequest\x1a).google.cloud.ces.v1beta.SecuritySettings\"\x83\x01\xda\x41\x1dsecurity_settings,update_mask\x82\xd3\xe4\x93\x02]2H/v1beta/{security_settings.name=projects/*/locations/*/securitySettings}:\x11security_settings\x12\xad\x01\n\nListAgents\x12*.google.cloud.ces.v1beta.ListAgentsRequest\x1a+.google.cloud.ces.v1beta.ListAgentsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*/apps/*}/agents\x12\x9a\x01\n\x08GetAgent\x12(.google.cloud.ces.v1beta.GetAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/apps/*/agents/*}\x12\xc7\x01\n\x0b\x43reateAgent\x12+.google.cloud.ces.v1beta.CreateAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"k\xda\x41\x15parent,agent,agent_id\xda\x41\x0cparent,agent\x82\xd3\xe4\x93\x02>\"5/v1beta/{parent=projects/*/locations/*/apps/*}/agents:\x05\x61gent\x12\xba\x01\n\x0bUpdateAgent\x12+.google.cloud.ces.v1beta.UpdateAgentRequest\x1a\x1e.google.cloud.ces.v1beta.Agent\"^\xda\x41\x11\x61gent,update_mask\x82\xd3\xe4\x93\x02\x44\x32;/v1beta/{agent.name=projects/*/locations/*/apps/*/agents/*}:\x05\x61gent\x12\x98\x01\n\x0b\x44\x65leteAgent\x12+.google.cloud.ces.v1beta.DeleteAgentRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta/{name=projects/*/locations/*/apps/*/agents/*}\x12\xb5\x01\n\x0cListExamples\x12,.google.cloud.ces.v1beta.ListExamplesRequest\x1a-.google.cloud.ces.v1beta.ListExamplesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1beta/{parent=projects/*/locations/*/apps/*}/examples\x12\xa2\x01\n\nGetExample\x12*.google.cloud.ces.v1beta.GetExampleRequest\x1a .google.cloud.ces.v1beta.Example\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1beta/{name=projects/*/locations/*/apps/*/examples/*}\x12\xd7\x01\n\rCreateExample\x12-.google.cloud.ces.v1beta.CreateExampleRequest\x1a .google.cloud.ces.v1beta.Example\"u\xda\x41\x19parent,example,example_id\xda\x41\x0eparent,example\x82\xd3\xe4\x93\x02\x42\"7/v1beta/{parent=projects/*/locations/*/apps/*}/examples:\x07\x65xample\x12\xc8\x01\n\rUpdateExample\x12-.google.cloud.ces.v1beta.UpdateExampleRequest\x1a .google.cloud.ces.v1beta.Example\"f\xda\x41\x13\x65xample,update_mask\x82\xd3\xe4\x93\x02J2?/v1beta/{example.name=projects/*/locations/*/apps/*/examples/*}:\x07\x65xample\x12\x9e\x01\n\rDeleteExample\x12-.google.cloud.ces.v1beta.DeleteExampleRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1beta/{name=projects/*/locations/*/apps/*/examples/*}\x12\xa9\x01\n\tListTools\x12).google.cloud.ces.v1beta.ListToolsRequest\x1a*.google.cloud.ces.v1beta.ListToolsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1beta/{parent=projects/*/locations/*/apps/*}/tools\x12\x96\x01\n\x07GetTool\x12\'.google.cloud.ces.v1beta.GetToolRequest\x1a\x1d.google.cloud.ces.v1beta.Tool\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1beta/{name=projects/*/locations/*/apps/*/tools/*}\x12\xc9\x01\n\x11ListConversations\x12\x31.google.cloud.ces.v1beta.ListConversationsRequest\x1a\x32.google.cloud.ces.v1beta.ListConversationsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12*\n\x05value\x18\x02 \x01(\x0b\x32/.google.cloud.ces.v1beta.SynthesizeSpeechConfig:\x02\x38\x01\"\xd9\x02\n\x12\x41mbientSoundConfig\x12i\n\x16prebuilt_ambient_noise\x18\x01 \x01(\x0e\x32@.google.cloud.ces.v1beta.AmbientSoundConfig.PrebuiltAmbientNoiseB\x05\x18\x01\xe0\x41\x01H\x00\x12\x16\n\x07gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12%\n\x16prebuilt_ambient_sound\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0evolume_gain_db\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01\"r\n\x14PrebuiltAmbientNoise\x12&\n\"PREBUILT_AMBIENT_NOISE_UNSPECIFIED\x10\x00\x12\x10\n\x0cRETAIL_STORE\x10\x01\x12\x13\n\x0f\x43ONVENTION_HALL\x10\x02\x12\x0b\n\x07OUTDOOR\x10\x03\x42\x08\n\x06source\"Q\n\rBargeInConfig\x12\x1f\n\x10\x64isable_barge_in\x18\x01 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x1f\n\x12\x62\x61rge_in_awareness\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"H\n\x16SynthesizeSpeechConfig\x12\x12\n\x05voice\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rspeaking_rate\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\"<\n\x16MetricAnalysisSettings\x12\"\n\x15llm_metrics_opted_out\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"\xd2\x05\n\x0fLoggingSettings\x12G\n\x10redaction_config\x18\x01 \x01(\x0b\x32(.google.cloud.ces.v1beta.RedactionConfigB\x03\xe0\x41\x01\x12R\n\x16\x61udio_recording_config\x18\x02 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12]\n!unredacted_audio_recording_config\x18\x08 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12V\n\x18\x62igquery_export_settings\x18\x03 \x01(\x0b\x32/.google.cloud.ces.v1beta.BigQueryExportSettingsB\x03\xe0\x41\x01\x12R\n\x16\x63loud_logging_settings\x18\x04 \x01(\x0b\x32-.google.cloud.ces.v1beta.CloudLoggingSettingsB\x03\xe0\x41\x01\x12`\n\x1d\x63onversation_logging_settings\x18\x05 \x01(\x0b\x32\x34.google.cloud.ces.v1beta.ConversationLoggingSettingsB\x03\xe0\x41\x01\x12]\n!evaluation_audio_recording_config\x18\x06 \x01(\x0b\x32-.google.cloud.ces.v1beta.AudioRecordingConfigB\x03\xe0\x41\x01\x12V\n\x18metric_analysis_settings\x18\x07 \x01(\x0b\x32/.google.cloud.ces.v1beta.MetricAnalysisSettingsB\x03\xe0\x41\x01\"\x9d\x06\n\x15\x45rrorHandlingSettings\x12j\n\x17\x65rror_handling_strategy\x18\x01 \x01(\x0e\x32\x44.google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategyB\x03\xe0\x41\x01\x12l\n\x18\x66\x61llback_response_config\x18\x02 \x01(\x0b\x32\x45.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfigB\x03\xe0\x41\x01\x12`\n\x12\x65nd_session_config\x18\x03 \x01(\x0b\x32?.google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfigB\x03\xe0\x41\x01\x1a\x86\x02\n\x16\x46\x61llbackResponseConfig\x12\x88\x01\n\x18\x63ustom_fallback_messages\x18\x01 \x03(\x0b\x32\x61.google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig.CustomFallbackMessagesEntryB\x03\xe0\x41\x01\x12\"\n\x15max_fallback_attempts\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a=\n\x1b\x43ustomFallbackMessagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aK\n\x10\x45ndSessionConfig\x12\"\n\x10\x65scalate_session\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x13\n\x11_escalate_session\"r\n\x15\x45rrorHandlingStrategy\x12\'\n#ERROR_HANDLING_STRATEGY_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x15\n\x11\x46\x41LLBACK_RESPONSE\x10\x02\x12\x0f\n\x0b\x45ND_SESSION\x10\x03\"\xa8\x10\n\x1b\x45valuationMetricsThresholds\x12\x89\x01\n$golden_evaluation_metrics_thresholds\x18\x01 \x01(\x0b\x32V.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholdsB\x03\xe0\x41\x01\x12~\n\x1dhallucination_metric_behavior\x18\x03 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x05\x18\x01\xe0\x41\x01\x12\x83\x01\n$golden_hallucination_metric_behavior\x18\x05 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x12\x85\x01\n&scenario_hallucination_metric_behavior\x18\x04 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x1a\x8b\t\n!GoldenEvaluationMetricsThresholds\x12\x9d\x01\n\x1dturn_level_metrics_thresholds\x18\x01 \x01(\x0b\x32q.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholdsB\x03\xe0\x41\x01\x12\xab\x01\n$expectation_level_metrics_thresholds\x18\x02 \x01(\x0b\x32x.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholdsB\x03\xe0\x41\x01\x12n\n\x16tool_matching_settings\x18\x03 \x01(\x0b\x32I.google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettingsB\x03\xe0\x41\x01\x1a\x8a\x04\n\x1aTurnLevelMetricsThresholds\x12\x37\n%semantic_similarity_success_threshold\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12?\n-overall_tool_invocation_correctness_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\xb6\x01\n\x1bsemantic_similarity_channel\x18\x03 \x01(\x0e\x32\x8b\x01.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholds.SemanticSimilarityChannelB\x03\xe0\x41\x01\"]\n\x19SemanticSimilarityChannel\x12+\n\'SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\x42(\n&_semantic_similarity_success_thresholdB0\n._overall_tool_invocation_correctness_threshold\x1a\x9a\x01\n!ExpectationLevelMetricsThresholds\x12\x41\n/tool_invocation_parameter_correctness_threshold\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x32\n0_tool_invocation_parameter_correctness_threshold\x1a\xf7\x01\n\x14ToolMatchingSettings\x12\x86\x01\n\x18\x65xtra_tool_call_behavior\x18\x01 \x01(\x0e\x32_.google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettings.ExtraToolCallBehaviorB\x03\xe0\x41\x01\"V\n\x15\x45xtraToolCallBehavior\x12(\n$EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46\x41IL\x10\x01\x12\t\n\x05\x41LLOW\x10\x02\"g\n\x1bHallucinationMetricBehavior\x12-\n)HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\"\xba\x06\n\x12\x45valuationSettings\x12w\n\x1fscenario_conversation_initiator\x18\x01 \x01(\x0e\x32I.google.cloud.ces.v1beta.EvaluationSettings.ScenarioConversationInitiatorB\x03\xe0\x41\x01\x12H\n\x11golden_run_method\x18\x04 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x01\x12h\n%golden_evaluation_tool_call_behaviour\x18\x02 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\x12j\n\'scenario_evaluation_tool_call_behaviour\x18\x03 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\x12M\n\x0emetrics_config\x18\x05 \x01(\x0b\x32\x30.google.cloud.ces.v1beta.EvaluationMetricsConfigB\x03\xe0\x41\x01\x12g\n\x17scenario_execution_mode\x18\x06 \x01(\x0e\x32\x41.google.cloud.ces.v1beta.EvaluationSettings.ScenarioExecutionModeB\x03\xe0\x41\x01\"e\n\x1dScenarioConversationInitiator\x12/\n+SCENARIO_CONVERSATION_INITIATOR_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\t\n\x05\x41GENT\x10\x02\"l\n\x15ScenarioExecutionMode\x12\'\n#SCENARIO_EXECUTION_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11QUALITY_OPTIMIZED\x10\x01\x12\x13\n\x0fSPEED_OPTIMIZED\x10\x02\"\x9b\x01\n\x19\x43lientCertificateSettings\x12\x1c\n\x0ftls_certificate\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12G\n\x0bprivate_key\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x17\n\npassphrase\x18\x03 \x01(\tB\x03\xe0\x41\x01\"-\n\rVpcScSettings\x12\x1c\n\x0f\x61llowed_origins\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x82\x01\n\x1b\x43onversationLoggingSettings\x12)\n\x1c\x64isable_conversation_logging\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x38\n\x10retention_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"9\n\x14\x43loudLoggingSettings\x12!\n\x14\x65nable_cloud_logging\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"M\n\x14\x41udioRecordingConfig\x12\x17\n\ngcs_bucket\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fgcs_path_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xc2\x01\n\x0fRedactionConfig\x12\x1d\n\x10\x65nable_redaction\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x10inspect_template\x18\x02 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12J\n\x13\x64\x65identify_template\x18\x03 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xbb\x02\n\x11\x44\x61taStoreSettings\x12G\n\x07\x65ngines\x18\x03 \x03(\x0b\x32\x31.google.cloud.ces.v1beta.DataStoreSettings.EngineB\x03\xe0\x41\x03\x1a\xdc\x01\n\x06\x45ngine\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%discoveryengine.googleapis.com/Engine\x12I\n\x04type\x18\x02 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.DataStoreSettings.Engine.TypeB\x03\xe0\x41\x03\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x45NGINE_TYPE_SEARCH\x10\x01\x12\x14\n\x10\x45NGINE_TYPE_CHAT\x10\x02\"\xf0\x03\n\x11\x45valuationPersona\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bpersonality\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12S\n\rspeech_config\x18\x05 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.EvaluationPersona.SpeechConfigB\x03\xe0\x41\x01\x1a\xa3\x02\n\x0cSpeechConfig\x12\x1a\n\rspeaking_rate\x18\x01 \x01(\x01\x42\x03\xe0\x41\x01\x12g\n\x0b\x65nvironment\x18\x02 \x01(\x0e\x32M.google.cloud.ces.v1beta.EvaluationPersona.SpeechConfig.BackgroundEnvironmentB\x03\xe0\x41\x01\x12\x15\n\x08voice_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x15\x42\x61\x63kgroundEnvironment\x12&\n\"BACKGROUND_ENVIRONMENT_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43\x41LL_CENTER\x10\x03\x12\x0b\n\x07TRAFFIC\x10\x04\x12\x0e\n\nKIDS_NOISE\x10\x05\x12\x08\n\x04\x43\x41\x46\x45\x10\x06\x42\xfc\x04\n\x1b\x63om.google.cloud.ces.v1betaB\x08\x41ppProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41\xc8\x01\n\"dlp.googleapis.com/InspectTemplate\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\xea\x41\xd7\x01\n%dlp.googleapis.com/DeidentifyTemplate\x12[organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}\x12Qprojects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}\xea\x41z\n%discoveryengine.googleapis.com/Engine\x12Qprojects/{project}/locations/{location}/collections/{collection}/engines/{engine}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - App = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.App").msgclass - App::VariableDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.App.VariableDeclaration").msgclass - App::ToolExecutionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.App.ToolExecutionMode").enummodule - TimeZoneSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TimeZoneSettings").msgclass - LanguageSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LanguageSettings").msgclass - AudioProcessingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AudioProcessingConfig").msgclass - AmbientSoundConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AmbientSoundConfig").msgclass - AmbientSoundConfig::PrebuiltAmbientNoise = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AmbientSoundConfig.PrebuiltAmbientNoise").enummodule - BargeInConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.BargeInConfig").msgclass - SynthesizeSpeechConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SynthesizeSpeechConfig").msgclass - MetricAnalysisSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.MetricAnalysisSettings").msgclass - LoggingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LoggingSettings").msgclass - ErrorHandlingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ErrorHandlingSettings").msgclass - ErrorHandlingSettings::FallbackResponseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ErrorHandlingSettings.FallbackResponseConfig").msgclass - ErrorHandlingSettings::EndSessionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ErrorHandlingSettings.EndSessionConfig").msgclass - ErrorHandlingSettings::ErrorHandlingStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ErrorHandlingSettings.ErrorHandlingStrategy").enummodule - EvaluationMetricsThresholds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds").msgclass - EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds").msgclass - EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholds").msgclass - EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds::SemanticSimilarityChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholds.SemanticSimilarityChannel").enummodule - EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholds").msgclass - EvaluationMetricsThresholds::ToolMatchingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettings").msgclass - EvaluationMetricsThresholds::ToolMatchingSettings::ExtraToolCallBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.ToolMatchingSettings.ExtraToolCallBehavior").enummodule - EvaluationMetricsThresholds::HallucinationMetricBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehavior").enummodule - EvaluationSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationSettings").msgclass - EvaluationSettings::ScenarioConversationInitiator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationSettings.ScenarioConversationInitiator").enummodule - EvaluationSettings::ScenarioExecutionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationSettings.ScenarioExecutionMode").enummodule - ClientCertificateSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ClientCertificateSettings").msgclass - VpcScSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.VpcScSettings").msgclass - ConversationLoggingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ConversationLoggingSettings").msgclass - CloudLoggingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.CloudLoggingSettings").msgclass - AudioRecordingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AudioRecordingConfig").msgclass - RedactionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RedactionConfig").msgclass - DataStoreSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreSettings").msgclass - DataStoreSettings::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreSettings.Engine").msgclass - DataStoreSettings::Engine::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreSettings.Engine.Type").enummodule - EvaluationPersona = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationPersona").msgclass - EvaluationPersona::SpeechConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationPersona.SpeechConfig").msgclass - EvaluationPersona::SpeechConfig::BackgroundEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationPersona.SpeechConfig.BackgroundEnvironment").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/app_version_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/app_version_pb.rb deleted file mode 100644 index 828d062fbb06..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/app_version_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/app_version.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/ces/v1beta/agent_pb' -require 'google/cloud/ces/v1beta/app_pb' -require 'google/cloud/ces/v1beta/example_pb' -require 'google/cloud/ces/v1beta/guardrail_pb' -require 'google/cloud/ces/v1beta/tool_pb' -require 'google/cloud/ces/v1beta/toolset_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/cloud/ces/v1beta/app_version.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/ces/v1beta/agent.proto\x1a!google/cloud/ces/v1beta/app.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a\'google/cloud/ces/v1beta/guardrail.proto\x1a\"google/cloud/ces/v1beta/tool.proto\x1a%google/cloud/ces/v1beta/toolset.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x02\n\x0b\x41ppSnapshot\x12.\n\x03\x61pp\x18\x01 \x01(\x0b\x32\x1c.google.cloud.ces.v1beta.AppB\x03\xe0\x41\x01\x12\x33\n\x06\x61gents\x18\x02 \x03(\x0b\x32\x1e.google.cloud.ces.v1beta.AgentB\x03\xe0\x41\x01\x12\x31\n\x05tools\x18\x03 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.ToolB\x03\xe0\x41\x01\x12\x37\n\x08\x65xamples\x18\x04 \x03(\x0b\x32 .google.cloud.ces.v1beta.ExampleB\x03\xe0\x41\x01\x12;\n\nguardrails\x18\x05 \x03(\x0b\x32\".google.cloud.ces.v1beta.GuardrailB\x03\xe0\x41\x01\x12\x37\n\x08toolsets\x18\x06 \x03(\x0b\x32 .google.cloud.ces.v1beta.ToolsetB\x03\xe0\x41\x01\"\xf5\x02\n\nAppVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63reator\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x08snapshot\x18\x08 \x01(\x0b\x32$.google.cloud.ces.v1beta.AppSnapshotB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x03:\x82\x01\xea\x41\x7f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x45projects/{project}/locations/{location}/apps/{app}/versions/{version}*\x0b\x61ppVersions2\nappVersionB_\n\x1b\x63om.google.cloud.ces.v1betaB\x0f\x41ppVersionProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - AppSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AppSnapshot").msgclass - AppVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AppVersion").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/auth_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/auth_pb.rb deleted file mode 100644 index 2254bee60980..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/auth_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/auth.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n\"google/cloud/ces/v1beta/auth.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa2\x02\n\x0c\x41piKeyConfig\x12\x15\n\x08key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x16\x61pi_key_secret_version\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12T\n\x10request_location\x18\x03 \x01(\x0e\x32\x35.google.cloud.ces.v1beta.ApiKeyConfig.RequestLocationB\x03\xe0\x41\x02\"Q\n\x0fRequestLocation\x12 \n\x1cREQUEST_LOCATION_UNSPECIFIED\x10\x00\x12\n\n\x06HEADER\x10\x01\x12\x10\n\x0cQUERY_STRING\x10\x02\"\xc9\x02\n\x0bOAuthConfig\x12R\n\x10oauth_grant_type\x18\x01 \x01(\x0e\x32\x33.google.cloud.ces.v1beta.OAuthConfig.OauthGrantTypeB\x03\xe0\x41\x02\x12\x16\n\tclient_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x15\x63lient_secret_version\x18\x03 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x1b\n\x0etoken_endpoint\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06scopes\x18\x05 \x03(\tB\x03\xe0\x41\x01\"I\n\x0eOauthGrantType\x12 \n\x1cOAUTH_GRANT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43LIENT_CREDENTIAL\x10\x01\"\x1f\n\x1dServiceAgentIdTokenAuthConfig\"M\n\x18ServiceAccountAuthConfig\x12\x1c\n\x0fservice_account\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\'\n\x11\x42\x65\x61rerTokenConfig\x12\x12\n\x05token\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xfb\x02\n\x11\x45ndUserAuthConfig\x12\x62\n\x17oauth2_auth_code_config\x18\x02 \x01(\x0b\x32?.google.cloud.ces.v1beta.EndUserAuthConfig.Oauth2AuthCodeConfigH\x00\x12\x64\n\x18oauth2_jwt_bearer_config\x18\x03 \x01(\x0b\x32@.google.cloud.ces.v1beta.EndUserAuthConfig.Oauth2JwtBearerConfigH\x00\x1a\x30\n\x14Oauth2AuthCodeConfig\x12\x18\n\x0boauth_token\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a[\n\x15Oauth2JwtBearerConfig\x12\x13\n\x06issuer\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07subject\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nclient_key\x18\x03 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b\x61uth_config\"\xc5\x03\n\x11\x41piAuthentication\x12\x44\n\x0e\x61pi_key_config\x18\x01 \x01(\x0b\x32%.google.cloud.ces.v1beta.ApiKeyConfigB\x03\xe0\x41\x01H\x00\x12\x41\n\x0coauth_config\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.OAuthConfigB\x03\xe0\x41\x01H\x00\x12i\n\"service_agent_id_token_auth_config\x18\x03 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.ServiceAgentIdTokenAuthConfigB\x03\xe0\x41\x01H\x00\x12]\n\x1bservice_account_auth_config\x18\x04 \x01(\x0b\x32\x31.google.cloud.ces.v1beta.ServiceAccountAuthConfigB\x03\xe0\x41\x01H\x00\x12N\n\x13\x62\x65\x61rer_token_config\x18\x05 \x01(\x0b\x32*.google.cloud.ces.v1beta.BearerTokenConfigB\x03\xe0\x41\x01H\x00\x42\r\n\x0b\x61uth_configB\xc7\x01\n\x1b\x63om.google.cloud.ces.v1betaB\tAuthProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - ApiKeyConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ApiKeyConfig").msgclass - ApiKeyConfig::RequestLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ApiKeyConfig.RequestLocation").enummodule - OAuthConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.OAuthConfig").msgclass - OAuthConfig::OauthGrantType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.OAuthConfig.OauthGrantType").enummodule - ServiceAgentIdTokenAuthConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ServiceAgentIdTokenAuthConfig").msgclass - ServiceAccountAuthConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ServiceAccountAuthConfig").msgclass - BearerTokenConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.BearerTokenConfig").msgclass - EndUserAuthConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EndUserAuthConfig").msgclass - EndUserAuthConfig::Oauth2AuthCodeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EndUserAuthConfig.Oauth2AuthCodeConfig").msgclass - EndUserAuthConfig::Oauth2JwtBearerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EndUserAuthConfig.Oauth2JwtBearerConfig").msgclass - ApiAuthentication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ApiAuthentication").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb deleted file mode 100644 index 032a20df05c1..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/bigquery_export.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n-google/cloud/ces/v1beta/bigquery_export.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"Z\n\x16\x42igQueryExportSettings\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07project\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x64\x61taset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x63\n\x1b\x63om.google.cloud.ces.v1betaB\x13\x42igQueryExportProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - BigQueryExportSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.BigQueryExportSettings").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bindings_override.rb deleted file mode 100644 index 644f518edf81..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module Ces - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/ces/v1beta/rest" - # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new - # - module V1beta - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Ces"] - 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-ces-v1beta/lib/google/cloud/ces/v1beta/changelog_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/changelog_pb.rb deleted file mode 100644 index adeee4fa2dc2..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/changelog_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/changelog.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/ces/v1beta/changelog.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x04\n\tChangelog\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x06\x61uthor\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08resource\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rresource_type\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x61\x63tion\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x37\n\x11original_resource\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x32\n\x0cnew_resource\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x39\n\x13\x64\x65pendent_resources\x18\t \x03(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0fsequence_number\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03:\x84\x01\xea\x41\x80\x01\n\x1c\x63\x65s.googleapis.com/Changelog\x12Iprojects/{project}/locations/{location}/apps/{app}/changelogs/{changelog}*\nchangelogs2\tchangelogB^\n\x1b\x63om.google.cloud.ces.v1betaB\x0e\x43hangelogProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - Changelog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Changelog").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/client_function_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/client_function_pb.rb deleted file mode 100644 index 89a344dec4e7..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/client_function_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/client_function.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/ces/v1beta/schema_pb' - - -descriptor_data = "\n-google/cloud/ces/v1beta/client_function.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a$google/cloud/ces/v1beta/schema.proto\"\xaf\x01\n\x0e\x43lientFunction\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\nparameters\x18\x03 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x03\xe0\x41\x01\x12\x36\n\x08response\x18\x04 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x03\xe0\x41\x01\x42\x63\n\x1b\x63om.google.cloud.ces.v1betaB\x13\x43lientFunctionProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - ClientFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ClientFunction").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/common_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/common_pb.rb deleted file mode 100644 index 90335aa29435..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/common_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n$google/cloud/ces/v1beta/common.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8d\x01\n\x08\x43\x61llback\x12\x1a\n\x0bpython_code\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1bproactive_execution_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\n\n\x08\x63\x61llback\"R\n\rModelSettings\x12\x12\n\x05model\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x0btemperature\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0e\n\x0c_temperature\"\xa8\x04\n\rTriggerAction\x12]\n\x13respond_immediately\x18\x01 \x01(\x0b\x32\x39.google.cloud.ces.v1beta.TriggerAction.RespondImmediatelyB\x03\xe0\x41\x01H\x00\x12S\n\x0etransfer_agent\x18\x02 \x01(\x0b\x32\x34.google.cloud.ces.v1beta.TriggerAction.TransferAgentB\x03\xe0\x41\x01H\x00\x12Y\n\x11generative_answer\x18\x03 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.TriggerAction.GenerativeAnswerB\x03\xe0\x41\x01H\x00\x1a\x34\n\x08Response\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a]\n\x12RespondImmediately\x12G\n\tresponses\x18\x01 \x03(\x0b\x32/.google.cloud.ces.v1beta.TriggerAction.ResponseB\x03\xe0\x41\x02\x1a\'\n\x10GenerativeAnswer\x12\x13\n\x06prompt\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a@\n\rTransferAgent\x12/\n\x05\x61gent\x18\x01 \x01(\tB \xe0\x41\x02\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/AgentB\x08\n\x06\x61\x63tion\"\x85\x01\n\tTlsConfig\x12@\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32).google.cloud.ces.v1beta.TlsConfig.CaCertB\x03\xe0\x41\x02\x1a\x36\n\x06\x43\x61\x43\x65rt\x12\x19\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63\x65rt\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"Z\n\x16ServiceDirectoryConfig\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\xdf\n\n\x0e\x43hannelProfile\x12\x17\n\nprofile_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0c\x63hannel_type\x18\x03 \x01(\x0e\x32\x33.google.cloud.ces.v1beta.ChannelProfile.ChannelTypeB\x03\xe0\x41\x01\x12V\n\x10persona_property\x18\x02 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.ChannelProfile.PersonaPropertyB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isable_dtmf\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12%\n\x18\x64isable_barge_in_control\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12W\n\x11web_widget_config\x18\x07 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfigB\x03\xe0\x41\x01\x12$\n\x17noise_suppression_level\x18\x08 \x01(\tB\x03\xe0\x41\x01\x1a\x99\x01\n\x0fPersonaProperty\x12U\n\x07persona\x18\x01 \x01(\x0e\x32?.google.cloud.ces.v1beta.ChannelProfile.PersonaProperty.PersonaB\x03\xe0\x41\x01\"/\n\x07Persona\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07\x43ONCISE\x10\x01\x12\n\n\x06\x43HATTY\x10\x02\x1a\x85\x05\n\x0fWebWidgetConfig\x12W\n\x08modality\x18\x01 \x01(\x0e\x32@.google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.ModalityB\x03\xe0\x41\x01\x12Q\n\x05theme\x18\x02 \x01(\x0e\x32=.google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.ThemeB\x03\xe0\x41\x01\x12\x1d\n\x10web_widget_title\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12h\n\x11security_settings\x18\x04 \x01(\x0b\x32H.google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.SecuritySettingsB\x03\xe0\x41\x01\x1a\x94\x01\n\x10SecuritySettings\x12!\n\x14\x65nable_public_access\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13\x65nable_origin_check\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x61llowed_origins\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65nable_recaptcha\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"q\n\x08Modality\x12\x18\n\x14MODALITY_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43HAT_AND_VOICE\x10\x01\x12\x0e\n\nVOICE_ONLY\x10\x02\x12\r\n\tCHAT_ONLY\x10\x03\x12\x18\n\x14\x43HAT_VOICE_AND_VIDEO\x10\x04\"3\n\x05Theme\x12\x15\n\x11THEME_UNSPECIFIED\x10\x00\x12\t\n\x05LIGHT\x10\x01\x12\x08\n\x04\x44\x41RK\x10\x02\"\xa6\x01\n\x0b\x43hannelType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06WEB_UI\x10\x02\x12\x07\n\x03\x41PI\x10\x03\x12\n\n\x06TWILIO\x10\x04\x12\x1d\n\x19GOOGLE_TELEPHONY_PLATFORM\x10\x05\x12\x1f\n\x1b\x43ONTACT_CENTER_AS_A_SERVICE\x10\x06\x12\t\n\x05\x46IVE9\x10\x07\x12\x1e\n\x1a\x43ONTACT_CENTER_INTEGRATION\x10\x08\"\x9e\x02\n\x04Span\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x30\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x30\n\nattributes\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x37\n\x0b\x63hild_spans\x18\x05 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\x03\xe0\x41\x03*R\n\rExecutionType\x12\x1e\n\x1a\x45XECUTION_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSYNCHRONOUS\x10\x01\x12\x10\n\x0c\x41SYNCHRONOUS\x10\x02\x42\xda\x01\n\x1b\x63om.google.cloud.ces.v1betaB\x0b\x43ommonProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - Callback = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Callback").msgclass - ModelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ModelSettings").msgclass - TriggerAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TriggerAction").msgclass - TriggerAction::Response = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TriggerAction.Response").msgclass - TriggerAction::RespondImmediately = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TriggerAction.RespondImmediately").msgclass - TriggerAction::GenerativeAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TriggerAction.GenerativeAnswer").msgclass - TriggerAction::TransferAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TriggerAction.TransferAgent").msgclass - TlsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TlsConfig").msgclass - TlsConfig::CaCert = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.TlsConfig.CaCert").msgclass - ServiceDirectoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ServiceDirectoryConfig").msgclass - ChannelProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile").msgclass - ChannelProfile::PersonaProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.PersonaProperty").msgclass - ChannelProfile::PersonaProperty::Persona = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.PersonaProperty.Persona").enummodule - ChannelProfile::WebWidgetConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig").msgclass - ChannelProfile::WebWidgetConfig::SecuritySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.SecuritySettings").msgclass - ChannelProfile::WebWidgetConfig::Modality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.Modality").enummodule - ChannelProfile::WebWidgetConfig::Theme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.WebWidgetConfig.Theme").enummodule - ChannelProfile::ChannelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ChannelProfile.ChannelType").enummodule - Span = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Span").msgclass - ExecutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExecutionType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_tool_pb.rb deleted file mode 100644 index 2eb6de77f08c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_tool_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/connector_tool.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/ces/v1beta/auth_pb' - - -descriptor_data = "\n,google/cloud/ces/v1beta/connector_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\"google/cloud/ces/v1beta/auth.proto\"\xa6\x03\n\x06\x41\x63tion\x12\x1e\n\x14\x63onnection_action_id\x18\x04 \x01(\tH\x00\x12K\n\x10\x65ntity_operation\x18\x05 \x01(\x0b\x32/.google.cloud.ces.v1beta.Action.EntityOperationH\x00\x12\x19\n\x0cinput_fields\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\routput_fields\x18\x03 \x03(\tB\x03\xe0\x41\x01\x1a\xe8\x01\n\x0f\x45ntityOperation\x12\x16\n\tentity_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\toperation\x18\x02 \x01(\x0e\x32=.google.cloud.ces.v1beta.Action.EntityOperation.OperationTypeB\x03\xe0\x41\x02\"f\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04LIST\x10\x01\x12\x07\n\x03GET\x10\x02\x12\n\n\x06\x43REATE\x10\x03\x12\n\n\x06UPDATE\x10\x04\x12\n\n\x06\x44\x45LETE\x10\x05\x42\r\n\x0b\x61\x63tion_spec\"\xd1\x01\n\rConnectorTool\x12\x17\n\nconnection\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.ActionB\x03\xe0\x41\x02\x12\x44\n\x0b\x61uth_config\x18\x03 \x01(\x0b\x32*.google.cloud.ces.v1beta.EndUserAuthConfigB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x42\x62\n\x1b\x63om.google.cloud.ces.v1betaB\x12\x43onnectorToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Action").msgclass - Action::EntityOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Action.EntityOperation").msgclass - Action::EntityOperation::OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Action.EntityOperation.OperationType").enummodule - ConnectorTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ConnectorTool").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb deleted file mode 100644 index 624c3212b0e3..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/connector_toolset.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/ces/v1beta/auth_pb' -require 'google/cloud/ces/v1beta/connector_tool_pb' - - -descriptor_data = "\n/google/cloud/ces/v1beta/connector_toolset.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\"google/cloud/ces/v1beta/auth.proto\x1a,google/cloud/ces/v1beta/connector_tool.proto\"\xb2\x01\n\x10\x43onnectorToolset\x12\x17\n\nconnection\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0b\x61uth_config\x18\x02 \x01(\x0b\x32*.google.cloud.ces.v1beta.EndUserAuthConfigB\x03\xe0\x41\x01\x12?\n\x11\x63onnector_actions\x18\x03 \x03(\x0b\x32\x1f.google.cloud.ces.v1beta.ActionB\x03\xe0\x41\x02\x42\x65\n\x1b\x63om.google.cloud.ces.v1betaB\x15\x43onnectorToolsetProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - ConnectorToolset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ConnectorToolset").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb deleted file mode 100644 index 9baba3305e94..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/conversation_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/conversation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/ces/v1beta/common_pb' -require 'google/cloud/ces/v1beta/example_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/cloud/ces/v1beta/conversation.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\n\n\x0c\x43onversation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x05turns\x18\x06 \x03(\x0b\x32*.google.cloud.ces.v1beta.Conversation.TurnB\x03\xe0\x41\x02\x12\x17\n\nturn_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x0c\x63hannel_type\x18\x08 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.Conversation.ChannelTypeB\x02\x18\x01\x12\x41\n\x06source\x18\t \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x03\xe0\x41\x03\x12I\n\x0binput_types\x18\n \x03(\x0e\x32/.google.cloud.ces.v1beta.Conversation.InputTypeB\x03\xe0\x41\x03\x12\x35\n\x0b\x65ntry_agent\x18\x0b \x01(\tB \xe0\x41\x03\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x39\n\ndeployment\x18\x0c \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\x12:\n\x0b\x61pp_version\x18\r \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x1a\n\rlanguage_code\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x36\n\x08messages\x18\x02 \x03(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x02\x18\x01\x1av\n\x04Turn\x12\x37\n\x08messages\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01\x12\x35\n\troot_span\x18\x02 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\x03\xe0\x41\x01\"P\n\x0b\x43hannelType\x12\x1c\n\x18\x43HANNEL_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\x12\x0e\n\nMULTIMODAL\x10\x03\"S\n\x06Source\x12\x16\n\x12SOURCE_UNSPECIFIED\x10\x00\x12\x08\n\x04LIVE\x10\x01\x12\r\n\tSIMULATOR\x10\x02\x12\x08\n\x04\x45VAL\x10\x03\x12\x0e\n\nAGENT_TOOL\x10\x04\"\xcb\x01\n\tInputType\x12\x1a\n\x16INPUT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fINPUT_TYPE_TEXT\x10\x01\x12\x14\n\x10INPUT_TYPE_EVENT\x10\x07\x12\x14\n\x10INPUT_TYPE_AUDIO\x10\x02\x12\x14\n\x10INPUT_TYPE_IMAGE\x10\x03\x12\x13\n\x0fINPUT_TYPE_BLOB\x10\x04\x12\x1c\n\x18INPUT_TYPE_TOOL_RESPONSE\x10\x05\x12\x18\n\x14INPUT_TYPE_VARIABLES\x10\x06:\x93\x01\xea\x41\x8f\x01\n\x1f\x63\x65s.googleapis.com/Conversation\x12Oprojects/{project}/locations/{location}/apps/{app}/conversations/{conversation}*\rconversations2\x0c\x63onversationBa\n\x1b\x63om.google.cloud.ces.v1betaB\x11\x43onversationProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - Conversation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Conversation").msgclass - Conversation::Turn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Conversation.Turn").msgclass - Conversation::ChannelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Conversation.ChannelType").enummodule - Conversation::Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Conversation.Source").enummodule - Conversation::InputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Conversation.InputType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_pb.rb deleted file mode 100644 index cda9a1b50916..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/data_store.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/ces/v1beta/data_store.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x91\x05\n\tDataStore\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x04type\x18\x02 \x01(\x0e\x32\x30.google.cloud.ces.v1beta.DataStore.DataStoreTypeB\x03\xe0\x41\x03\x12`\n\x18\x64ocument_processing_mode\x18\x04 \x01(\x0e\x32\x39.google.cloud.ces.v1beta.DataStore.DocumentProcessingModeB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x10\x63onnector_config\x18\x07 \x01(\x0b\x32\x32.google.cloud.ces.v1beta.DataStore.ConnectorConfigB\x03\xe0\x41\x03\x1a[\n\x0f\x43onnectorConfig\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x1f\n\x17\x63ollection_display_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x61ta_source\x18\x03 \x01(\t\"j\n\rDataStoreType\x12\x1f\n\x1b\x44\x41TA_STORE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nPUBLIC_WEB\x10\x01\x12\x10\n\x0cUNSTRUCTURED\x10\x02\x12\x07\n\x03\x46\x41Q\x10\x03\x12\r\n\tCONNECTOR\x10\x04\"]\n\x16\x44ocumentProcessingMode\x12(\n$DOCUMENT_PROCESSING_MODE_UNSPECIFIED\x10\x00\x12\r\n\tDOCUMENTS\x10\x01\x12\n\n\x06\x43HUNKS\x10\x02\x42^\n\x1b\x63om.google.cloud.ces.v1betaB\x0e\x44\x61taStoreProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - DataStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStore").msgclass - DataStore::ConnectorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStore.ConnectorConfig").msgclass - DataStore::DataStoreType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStore.DataStoreType").enummodule - DataStore::DocumentProcessingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStore.DocumentProcessingMode").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb deleted file mode 100644 index 32ec69a33649..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/data_store_tool.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/ces/v1beta/common_pb' -require 'google/cloud/ces/v1beta/data_store_pb' - - -descriptor_data = "\n-google/cloud/ces/v1beta/data_store_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a(google/cloud/ces/v1beta/data_store.proto\"\xb6\x15\n\rDataStoreTool\x12X\n\x11\x64\x61ta_store_source\x18\x03 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.DataStoreTool.DataStoreSourceB\x03\xe0\x41\x01H\x00\x12Q\n\rengine_source\x18\x04 \x01(\x0b\x32\x33.google.cloud.ces.v1beta.DataStoreTool.EngineSourceB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\x0b\x62oost_specs\x18\x08 \x03(\x0b\x32\x31.google.cloud.ces.v1beta.DataStoreTool.BoostSpecsB\x03\xe0\x41\x01\x12T\n\x10modality_configs\x18\t \x03(\x0b\x32\x35.google.cloud.ces.v1beta.DataStoreTool.ModalityConfigB\x03\xe0\x41\x01\x12\x66\n\x19\x66ilter_parameter_behavior\x18\n \x01(\x0e\x32>.google.cloud.ces.v1beta.DataStoreTool.FilterParameterBehaviorB\x03\xe0\x41\x01\x1a\x81\x01\n\x0eRewriterConfig\x12\x43\n\x0emodel_settings\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.ModelSettingsB\x03\xe0\x41\x02\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x86\x01\n\x13SummarizationConfig\x12\x43\n\x0emodel_settings\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.ModelSettingsB\x03\xe0\x41\x01\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x46\n\x0fGroundingConfig\x12\x1c\n\x0fgrounding_level\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x63\n\x0f\x44\x61taStoreSource\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\ndata_store\x18\x04 \x01(\x0b\x32\".google.cloud.ces.v1beta.DataStoreB\x03\xe0\x41\x01\x1a\x91\x01\n\x0c\x45ngineSource\x12\x13\n\x06\x65ngine\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\x12\x64\x61ta_store_sources\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.DataStoreTool.DataStoreSourceB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1ak\n\nBoostSpecs\x12\x18\n\x0b\x64\x61ta_stores\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x43\n\x04spec\x18\x02 \x03(\x0b\x32\x30.google.cloud.ces.v1beta.DataStoreTool.BoostSpecB\x03\xe0\x41\x02\x1a\xc4\x07\n\tBoostSpec\x12g\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32\x43.google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpecB\x03\xe0\x41\x02\x1a\xcd\x06\n\x12\x43onditionBoostSpec\x12\x16\n\tcondition\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05\x62oost\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x12u\n\x12\x62oost_control_spec\x18\x04 \x01(\x0b\x32T.google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpecB\x03\xe0\x41\x01\x1a\x93\x05\n\x10\x42oostControlSpec\x12\x17\n\nfield_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x7f\n\x0e\x61ttribute_type\x18\x02 \x01(\x0e\x32\x62.google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeTypeB\x03\xe0\x41\x01\x12\x87\x01\n\x12interpolation_type\x18\x03 \x01(\x0e\x32\x66.google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationTypeB\x03\xe0\x41\x01\x12~\n\x0e\x63ontrol_points\x18\x04 \x03(\x0b\x32\x61.google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPointB\x03\xe0\x41\x01\x1aG\n\x0c\x43ontrolPoint\x12\x1c\n\x0f\x61ttribute_value\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x62oost_amount\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\"M\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNUMERICAL\x10\x01\x12\r\n\tFRESHNESS\x10\x02\"C\n\x11InterpolationType\x12\"\n\x1eINTERPOLATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06LINEAR\x10\x01\x1a\xbf\x03\n\x0eModalityConfig\x12^\n\rmodality_type\x18\x01 \x01(\x0e\x32\x42.google.cloud.ces.v1beta.DataStoreTool.ModalityConfig.ModalityTypeB\x03\xe0\x41\x02\x12S\n\x0frewriter_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.DataStoreTool.RewriterConfigB\x03\xe0\x41\x01\x12]\n\x14summarization_config\x18\x03 \x01(\x0b\x32:.google.cloud.ces.v1beta.DataStoreTool.SummarizationConfigB\x03\xe0\x41\x01\x12U\n\x10grounding_config\x18\x04 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.DataStoreTool.GroundingConfigB\x03\xe0\x41\x01\"B\n\x0cModalityType\x12\x1d\n\x19MODALITY_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\"k\n\x17\x46ilterParameterBehavior\x12)\n%FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41LWAYS_INCLUDE\x10\x02\x12\x11\n\rNEVER_INCLUDE\x10\x03\x42\x0f\n\rsearch_sourceBb\n\x1b\x63om.google.cloud.ces.v1betaB\x12\x44\x61taStoreToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - DataStoreTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool").msgclass - DataStoreTool::RewriterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.RewriterConfig").msgclass - DataStoreTool::SummarizationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.SummarizationConfig").msgclass - DataStoreTool::GroundingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.GroundingConfig").msgclass - DataStoreTool::DataStoreSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.DataStoreSource").msgclass - DataStoreTool::EngineSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.EngineSource").msgclass - DataStoreTool::BoostSpecs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpecs").msgclass - DataStoreTool::BoostSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec").msgclass - DataStoreTool::BoostSpec::ConditionBoostSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec").msgclass - DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec").msgclass - DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint").msgclass - DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType").enummodule - DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType").enummodule - DataStoreTool::ModalityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.ModalityConfig").msgclass - DataStoreTool::ModalityConfig::ModalityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.ModalityConfig.ModalityType").enummodule - DataStoreTool::FilterParameterBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.DataStoreTool.FilterParameterBehavior").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb deleted file mode 100644 index f9361d4e170c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/deployment_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/deployment.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/ces/v1beta/common_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/ces/v1beta/deployment.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x04\n\x10\x45xperimentConfig\x12V\n\x0fversion_release\x18\x01 \x01(\x0b\x32\x38.google.cloud.ces.v1beta.ExperimentConfig.VersionReleaseB\x03\xe0\x41\x01\x1a\xc7\x02\n\x0eVersionRelease\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32/.google.cloud.ces.v1beta.ExperimentConfig.StateB\x03\xe0\x41\x01\x12l\n\x13traffic_allocations\x18\x02 \x03(\x0b\x32J.google.cloud.ces.v1beta.ExperimentConfig.VersionRelease.TrafficAllocationB\x03\xe0\x41\x01\x1a\x81\x01\n\x11TrafficAllocation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12traffic_percentage\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12:\n\x0b\x61pp_version\x18\x03 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\"O\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0b\n\x07\x45XPIRED\x10\x04\"\x93\x04\n\nDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12:\n\x0b\x61pp_version\x18\x02 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12\x45\n\x0f\x63hannel_profile\x18\x03 \x01(\x0b\x32\'.google.cloud.ces.v1beta.ChannelProfileB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12I\n\x11\x65xperiment_config\x18\t \x01(\x0b\x32).google.cloud.ces.v1beta.ExperimentConfigB\x03\xe0\x41\x01:\x89\x01\xea\x41\x85\x01\n\x1d\x63\x65s.googleapis.com/Deployment\x12Kprojects/{project}/locations/{location}/apps/{app}/deployments/{deployment}*\x0b\x64\x65ployments2\ndeploymentBc\n\x1b\x63om.google.cloud.ces.v1betaB\x13\x43hannelProfileProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - ExperimentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig").msgclass - ExperimentConfig::VersionRelease = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig.VersionRelease").msgclass - ExperimentConfig::VersionRelease::TrafficAllocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig.VersionRelease.TrafficAllocation").msgclass - ExperimentConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExperimentConfig.State").enummodule - Deployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Deployment").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb deleted file mode 100644 index f8ffef53ac55..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_pb.rb +++ /dev/null @@ -1,99 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/evaluation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/ces/v1beta/app_pb' -require 'google/cloud/ces/v1beta/common_pb' -require 'google/cloud/ces/v1beta/evaluation_metrics_config_pb' -require 'google/cloud/ces/v1beta/example_pb' -require 'google/cloud/ces/v1beta/fakes_pb' -require 'google/cloud/ces/v1beta/golden_run_pb' -require 'google/cloud/ces/v1beta/session_service_pb' -require 'google/cloud/ces/v1beta/toolset_tool_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n(google/cloud/ces/v1beta/evaluation.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a!google/cloud/ces/v1beta/app.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a\x37google/cloud/ces/v1beta/evaluation_metrics_config.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a#google/cloud/ces/v1beta/fakes.proto\x1a(google/cloud/ces/v1beta/golden_run.proto\x1a-google/cloud/ces/v1beta/session_service.proto\x1a*google/cloud/ces/v1beta/toolset_tool.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xeb\r\n\x11\x41ggregatedMetrics\x12\x63\n\x16metrics_by_app_version\x18\x03 \x03(\x0b\x32>.google.cloud.ces.v1beta.AggregatedMetrics.MetricsByAppVersionB\x03\xe0\x41\x03\x1an\n\x0bToolMetrics\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x17\n\npass_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nfail_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x1aM\n\x12TurnLatencyMetrics\x12\x37\n\x0f\x61verage_latency\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x80\x01\n\x16ToolCallLatencyMetrics\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x37\n\x0f\x61verage_latency\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a/\n\x19SemanticSimilarityMetrics\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a*\n\x14HallucinationMetrics\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a\xb1\x05\n\x13MetricsByAppVersion\x12\x1b\n\x0e\x61pp_version_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12Q\n\x0ctool_metrics\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.AggregatedMetrics.ToolMetricsB\x03\xe0\x41\x03\x12n\n\x1bsemantic_similarity_metrics\x18\x03 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.AggregatedMetrics.SemanticSimilarityMetricsB\x03\xe0\x41\x03\x12\x63\n\x15hallucination_metrics\x18\x05 \x03(\x0b\x32?.google.cloud.ces.v1beta.AggregatedMetrics.HallucinationMetricsB\x03\xe0\x41\x03\x12i\n\x19tool_call_latency_metrics\x18\x06 \x03(\x0b\x32\x41.google.cloud.ces.v1beta.AggregatedMetrics.ToolCallLatencyMetricsB\x03\xe0\x41\x03\x12`\n\x14turn_latency_metrics\x18\x07 \x03(\x0b\x32=.google.cloud.ces.v1beta.AggregatedMetrics.TurnLatencyMetricsB\x03\xe0\x41\x03\x12\x17\n\npass_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nfail_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12V\n\x0fmetrics_by_turn\x18\x04 \x03(\x0b\x32\x38.google.cloud.ces.v1beta.AggregatedMetrics.MetricsByTurnB\x03\xe0\x41\x03\x1a\x9d\x04\n\rMetricsByTurn\x12\x17\n\nturn_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12Q\n\x0ctool_metrics\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.AggregatedMetrics.ToolMetricsB\x03\xe0\x41\x03\x12n\n\x1bsemantic_similarity_metrics\x18\x03 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.AggregatedMetrics.SemanticSimilarityMetricsB\x03\xe0\x41\x03\x12\x63\n\x15hallucination_metrics\x18\x04 \x03(\x0b\x32?.google.cloud.ces.v1beta.AggregatedMetrics.HallucinationMetricsB\x03\xe0\x41\x03\x12i\n\x19tool_call_latency_metrics\x18\x05 \x03(\x0b\x32\x41.google.cloud.ces.v1beta.AggregatedMetrics.ToolCallLatencyMetricsB\x03\xe0\x41\x03\x12`\n\x14turn_latency_metrics\x18\x06 \x03(\x0b\x32=.google.cloud.ces.v1beta.AggregatedMetrics.TurnLatencyMetricsB\x03\xe0\x41\x03\"\xeb\"\n\nEvaluation\x12\x41\n\x06golden\x18\x0b \x01(\x0b\x32*.google.cloud.ces.v1beta.Evaluation.GoldenB\x03\xe0\x41\x01H\x00\x12\x45\n\x08scenario\x18\x0c \x01(\x0b\x32,.google.cloud.ces.v1beta.Evaluation.ScenarioB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12I\n\x13\x65valuation_datasets\x18\x05 \x03(\tB,\xe0\x41\x03\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x0f\x65valuation_runs\x18\x0f \x03(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x03\x12K\n\x12\x61ggregated_metrics\x18\x10 \x01(\x0b\x32*.google.cloud.ces.v1beta.AggregatedMetricsB\x03\xe0\x41\x03\x12M\n\x15last_completed_result\x18\x11 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationResultB\x03\xe0\x41\x03\x12\x14\n\x07invalid\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12H\n\x10last_ten_results\x18\x13 \x03(\x0b\x32).google.cloud.ces.v1beta.EvaluationResultB\x03\xe0\x41\x03\x12h\n%evaluation_metrics_threshold_override\x18\x14 \x01(\x0b\x32\x34.google.cloud.ces.v1beta.EvaluationMetricsThresholdsB\x03\xe0\x41\x01\x12\x61\n\"evaluation_metrics_config_override\x18\x15 \x01(\x0b\x32\x30.google.cloud.ces.v1beta.EvaluationMetricsConfigB\x03\xe0\x41\x01\x1a\xc1\x08\n\x11GoldenExpectation\x12;\n\ttool_call\x18\x02 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x01H\x00\x12\x43\n\rtool_response\x18\x03 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x01H\x00\x12?\n\x0e\x61gent_response\x18\x04 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01H\x00\x12\x45\n\x0e\x61gent_transfer\x18\x05 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x01H\x00\x12\x39\n\x11updated_variables\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x00\x12H\n\x12mock_tool_response\x18\x07 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x01H\x00\x12\x1c\n\rno_tool_calls\x18\r \x01(\x08\x42\x03\xe0\x41\x01H\x00\x12\x11\n\x04note\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fskip_evaluation\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\xb4\x01\n-expectation_level_metrics_thresholds_override\x18\t \x01(\x0b\x32x.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholdsB\x03\xe0\x41\x01\x12\x99\x01\n:agent_response_semantic_similarity_metrics_config_override\x18\n \x01(\x0b\x32P.google.cloud.ces.v1beta.EvaluationMetricsConfig.SemanticSimilarityMetricsConfigB\x03\xe0\x41\x01\x12\x8e\x01\n4agent_response_hallucination_metrics_config_override\x18\x0b \x01(\x0b\x32K.google.cloud.ces.v1beta.EvaluationMetricsConfig.HallucinationMetricsConfigB\x03\xe0\x41\x01\x12]\n\x0f\x63omparison_type\x18\x0c \x01(\x0e\x32?.google.cloud.ces.v1beta.EvaluationMetricsConfig.ComparisonTypeB\x03\xe0\x41\x01\x42\x0b\n\tcondition\x1a\xea\x01\n\x04Step\x12@\n\nuser_input\x18\x01 \x01(\x0b\x32%.google.cloud.ces.v1beta.SessionInputB\x03\xe0\x41\x01H\x00\x12\x45\n\x0e\x61gent_transfer\x18\x02 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x01H\x00\x12Q\n\x0b\x65xpectation\x18\x03 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.GoldenExpectationB\x03\xe0\x41\x01H\x00\x42\x06\n\x04step\x1a\xb2\x03\n\nGoldenTurn\x12<\n\x05steps\x18\x01 \x03(\x0b\x32(.google.cloud.ces.v1beta.Evaluation.StepB\x03\xe0\x41\x02\x12\x35\n\troot_span\x18\x02 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\x03\xe0\x41\x01\x12\xa6\x01\n&turn_level_metrics_thresholds_override\x18\x03 \x01(\x0b\x32q.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholdsB\x03\xe0\x41\x01\x12\x85\x01\n&hallucination_metric_behavior_override\x18\x04 \x01(\x0e\x32P.google.cloud.ces.v1beta.EvaluationMetricsThresholds.HallucinationMetricBehaviorB\x03\xe0\x41\x01\x1a\x9f\x01\n\x06Golden\x12\x42\n\x05turns\x18\x02 \x03(\x0b\x32..google.cloud.ces.v1beta.Evaluation.GoldenTurnB\x03\xe0\x41\x02\x12Q\n\x17\x65valuation_expectations\x18\x03 \x03(\tB0\xe0\x41\x01\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x1a\xef\x02\n\x13ScenarioExpectation\x12h\n\x10tool_expectation\x18\x01 \x01(\x0b\x32G.google.cloud.ces.v1beta.Evaluation.ScenarioExpectation.ToolExpectationB\x03\xe0\x41\x01H\x00\x12?\n\x0e\x61gent_response\x18\x02 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01H\x00\x1a\x9d\x01\n\x0fToolExpectation\x12\x42\n\x12\x65xpected_tool_call\x18\x01 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x02\x12\x46\n\x12mock_tool_response\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x02\x42\r\n\x0b\x65xpectation\x1a\xda\x07\n\x08Scenario\x12\x11\n\x04task\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\nuser_facts\x18\x04 \x03(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.Scenario.UserFactB\x03\xe0\x41\x01\x12\x16\n\tmax_turns\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07rubrics\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12[\n\x15scenario_expectations\x18\x03 \x03(\x0b\x32\x37.google.cloud.ces.v1beta.Evaluation.ScenarioExpectationB\x03\xe0\x41\x02\x12\x38\n\x12variable_overrides\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12l\n\x18task_completion_behavior\x18\x07 \x01(\x0e\x32\x43.google.cloud.ces.v1beta.Evaluation.Scenario.TaskCompletionBehaviorB\x05\x18\x01\xe0\x41\x01\x12^\n\x12user_goal_behavior\x18\x08 \x01(\x0e\x32=.google.cloud.ces.v1beta.Evaluation.Scenario.UserGoalBehaviorB\x03\xe0\x41\x01\x12Q\n\x17\x65valuation_expectations\x18\n \x03(\tB0\xe0\x41\x01\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12g\n\x17scenario_execution_mode\x18\x0c \x01(\x0e\x32\x41.google.cloud.ces.v1beta.EvaluationSettings.ScenarioExecutionModeB\x03\xe0\x41\x01\x1a\x31\n\x08UserFact\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x16TaskCompletionBehavior\x12(\n$TASK_COMPLETION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x12\n\x0eTASK_SATISFIED\x10\x01\x12\x11\n\rTASK_REJECTED\x10\x02\"~\n\x10UserGoalBehavior\x12\"\n\x1eUSER_GOAL_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x17\n\x13USER_GOAL_SATISFIED\x10\x01\x12\x16\n\x12USER_GOAL_REJECTED\x10\x02\x12\x15\n\x11USER_GOAL_IGNORED\x10\x03:\x89\x01\xea\x41\x85\x01\n\x1d\x63\x65s.googleapis.com/Evaluation\x12Kprojects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}*\x0b\x65valuations2\nevaluationB\x08\n\x06inputs\"\xb0\x04\n\x11\x45valuationDataset\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12:\n\x0b\x65valuations\x18\x03 \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12K\n\x12\x61ggregated_metrics\x18\t \x01(\x0b\x32*.google.cloud.ces.v1beta.AggregatedMetricsB\x03\xe0\x41\x03:\xad\x01\xea\x41\xa9\x01\n$ces.googleapis.com/EvaluationDataset\x12Zprojects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluation_dataset}*\x12\x65valuationDatasets2\x11\x65valuationDataset\"\x95\x38\n\x10\x45valuationResult\x12T\n\rgolden_result\x18\x07 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.EvaluationResult.GoldenResultB\x03\xe0\x41\x03H\x00\x12X\n\x0fscenario_result\x18\x08 \x01(\x0b\x32\x38.google.cloud.ces.v1beta.EvaluationResult.ScenarioResultB\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x11\x65valuation_status\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12@\n\x0e\x65valuation_run\x18\x06 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12@\n\x07persona\x18\x11 \x01(\x0b\x32*.google.cloud.ces.v1beta.EvaluationPersonaB\x03\xe0\x41\x03\x12\x45\n\nerror_info\x18\x0f \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12(\n\x05\x65rror\x18\x0e \x01(\x0b\x32\x12.google.rpc.StatusB\x05\x18\x01\xe0\x41\x03\x12\x19\n\x0cinitiated_by\x18\t \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x61pp_version\x18\n \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12%\n\x18\x61pp_version_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x37\n\tchangelog\x18\x15 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\x12>\n\x15\x63hangelog_create_time\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x0f\x65xecution_state\x18\x0b \x01(\x0e\x32\x38.google.cloud.ces.v1beta.EvaluationResult.ExecutionStateB\x03\xe0\x41\x03\x12`\n\x1d\x65valuation_metrics_thresholds\x18\x0c \x01(\x0b\x32\x34.google.cloud.ces.v1beta.EvaluationMetricsThresholdsB\x03\xe0\x41\x03\x12>\n\x06\x63onfig\x18\x12 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x03\x12H\n\x11golden_run_method\x18\x13 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x03\x1a\xde\x07\n\x18GoldenExpectationOutcome\x12\x44\n\x12observed_tool_call\x18\x02 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x03H\x00\x12L\n\x16observed_tool_response\x18\x03 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x03H\x00\x12H\n\x17observed_agent_response\x18\x04 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x03H\x00\x12N\n\x17observed_agent_transfer\x18\x05 \x01(\x0b\x32&.google.cloud.ces.v1beta.AgentTransferB\x03\xe0\x41\x03H\x00\x12\x38\n\x10observed_payload\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03H\x00\x12O\n\x0b\x65xpectation\x18\x01 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.GoldenExpectationB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x06 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12m\n\x1asemantic_similarity_result\x18\x07 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResultB\x05\x18\x01\xe0\x41\x03\x12|\n\x16tool_invocation_result\x18\x08 \x01(\x0b\x32W.google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcome.ToolInvocationResultB\x03\xe0\x41\x03\x1a\xc8\x01\n\x14ToolInvocationResult\x12-\n\x1bparameter_correctness_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12G\n\x07outcome\x18\x02 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x1e\n\x1c_parameter_correctness_scoreB\x08\n\x06result\x1a\xe7\x01\n\x1b\x45valuationExpectationResult\x12P\n\x16\x65valuation_expectation\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x03 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\x91\t\n\x0cGoldenResult\x12i\n\x13turn_replay_results\x18\x01 \x03(\x0b\x32G.google.cloud.ces.v1beta.EvaluationResult.GoldenResult.TurnReplayResultB\x03\xe0\x41\x03\x12r\n\x1e\x65valuation_expectation_results\x18\x02 \x03(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.EvaluationExpectationResultB\x03\xe0\x41\x03\x1a\xa1\x07\n\x10TurnReplayResult\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x64\n\x13\x65xpectation_outcome\x18\x02 \x03(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcomeB\x03\xe0\x41\x03\x12`\n\x14hallucination_result\x18\x03 \x01(\x0b\x32=.google.cloud.ces.v1beta.EvaluationResult.HallucinationResultB\x03\xe0\x41\x03\x12$\n\x15tool_invocation_score\x18\x04 \x01(\x02\x42\x05\x18\x01\xe0\x41\x03\x12/\n\x1dtool_ordered_invocation_score\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x34\n\x0cturn_latency\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12[\n\x13tool_call_latencies\x18\x07 \x03(\x0b\x32\x39.google.cloud.ces.v1beta.EvaluationResult.ToolCallLatencyB\x03\xe0\x41\x03\x12k\n\x1asemantic_similarity_result\x18\x08 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResultB\x03\xe0\x41\x03\x12r\n\x1eoverall_tool_invocation_result\x18\t \x01(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.OverallToolInvocationResultB\x03\xe0\x41\x03\x12\x45\n\nerror_info\x18\n \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12R\n\x0espan_latencies\x18\x0b \x03(\x0b\x32\x35.google.cloud.ces.v1beta.EvaluationResult.SpanLatencyB\x03\xe0\x41\x03\x42 \n\x1e_tool_ordered_invocation_score\x1ao\n\x15ScenarioRubricOutcome\x12\x13\n\x06rubric\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\x05score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x11score_explanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\x99\x04\n\x1aScenarioExpectationOutcome\x12x\n\x12observed_tool_call\x18\x02 \x01(\x0b\x32U.google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcome.ObservedToolCallB\x03\xe0\x41\x03H\x00\x12H\n\x17observed_agent_response\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x03H\x00\x12Q\n\x0b\x65xpectation\x18\x01 \x01(\x0b\x32\x37.google.cloud.ces.v1beta.Evaluation.ScenarioExpectationB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x1a\x90\x01\n\x10ObservedToolCall\x12\x39\n\ttool_call\x18\x01 \x01(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x03\x12\x41\n\rtool_response\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x03\x42\x08\n\x06result\x1a\xdc\x08\n\x0eScenarioResult\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x11\n\x04task\x18\n \x01(\tB\x03\xe0\x41\x03\x12N\n\nuser_facts\x18\x0b \x03(\x0b\x32\x35.google.cloud.ces.v1beta.Evaluation.Scenario.UserFactB\x03\xe0\x41\x03\x12g\n\x14\x65xpectation_outcomes\x18\x02 \x03(\x0b\x32\x44.google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcomeB\x03\xe0\x41\x03\x12]\n\x0frubric_outcomes\x18\x03 \x03(\x0b\x32?.google.cloud.ces.v1beta.EvaluationResult.ScenarioRubricOutcomeB\x03\xe0\x41\x03\x12`\n\x14hallucination_result\x18\x04 \x03(\x0b\x32=.google.cloud.ces.v1beta.EvaluationResult.HallucinationResultB\x03\xe0\x41\x03\x12\x65\n\x16task_completion_result\x18\x05 \x01(\x0b\x32>.google.cloud.ces.v1beta.EvaluationResult.TaskCompletionResultB\x05\x18\x01\xe0\x41\x03\x12[\n\x13tool_call_latencies\x18\x06 \x03(\x0b\x32\x39.google.cloud.ces.v1beta.EvaluationResult.ToolCallLatencyB\x03\xe0\x41\x03\x12p\n\x1duser_goal_satisfaction_result\x18\x07 \x01(\x0b\x32\x44.google.cloud.ces.v1beta.EvaluationResult.UserGoalSatisfactionResultB\x03\xe0\x41\x03\x12,\n\x1a\x61ll_expectations_satisfied\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12 \n\x0etask_completed\x18\t \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12R\n\x0espan_latencies\x18\x0c \x03(\x0b\x32\x35.google.cloud.ces.v1beta.EvaluationResult.SpanLatencyB\x03\xe0\x41\x03\x12r\n\x1e\x65valuation_expectation_results\x18\r \x03(\x0b\x32\x45.google.cloud.ces.v1beta.EvaluationResult.EvaluationExpectationResultB\x03\xe0\x41\x03\x42\x1d\n\x1b_all_expectations_satisfiedB\x11\n\x0f_task_completed\x1a\x81\x04\n\x0bSpanLatency\x12\x17\n\x08resource\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12<\n\x07toolset\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x03H\x00\x12\x14\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x17\n\x08\x63\x61llback\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x12M\n\x04type\x18\x01 \x01(\x0e\x32:.google.cloud.ces.v1beta.EvaluationResult.SpanLatency.TypeB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x11\x65xecution_latency\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\"Q\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TOOL\x10\x01\x12\x11\n\rUSER_CALLBACK\x10\x02\x12\r\n\tGUARDRAIL\x10\x03\x12\x07\n\x03LLM\x10\x04\x42\x0c\n\nidentifier\x1a\xfe\x01\n\x0fToolCallLatency\x12-\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/Tool\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x11\x65xecution_latency\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x66\n\x13HallucinationResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1am\n\x1aUserGoalSatisfactionResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\xb4\x01\n\x18SemanticSimilarityResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12G\n\x07outcome\x18\x04 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x42\x08\n\x06_score\x1a\xa4\x01\n\x1bOverallToolInvocationResult\x12\"\n\x15tool_invocation_score\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12G\n\x07outcome\x18\x02 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\x42\x18\n\x16_tool_invocation_score\x1ag\n\x14TaskCompletionResult\x12\x17\n\x05score\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xplanation\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\"C\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x08\n\x04PASS\x10\x01\x12\x08\n\x04\x46\x41IL\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"s\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x05\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\r\n\tCANCELLED\x10\x04:\xb7\x01\xea\x41\xb3\x01\n#ces.googleapis.com/EvaluationResult\x12gprojects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result}*\x11\x65valuationResults2\x10\x65valuationResultB\x08\n\x06result\"\xfa\x11\n\rEvaluationRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12G\n\x12\x65valuation_results\x18\x03 \x03(\tB+\xe0\x41\x03\xfa\x41%\n#ces.googleapis.com/EvaluationResult\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0cinitiated_by\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12:\n\x0b\x61pp_version\x18\x06 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12%\n\x18\x61pp_version_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x37\n\tchangelog\x18\x16 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Changelog\x12>\n\x15\x63hangelog_create_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12:\n\x0b\x65valuations\x18\x07 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12H\n\x12\x65valuation_dataset\x18\x08 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12S\n\x0f\x65valuation_type\x18\t \x01(\x0e\x32\x35.google.cloud.ces.v1beta.EvaluationRun.EvaluationTypeB\x03\xe0\x41\x03\x12M\n\x05state\x18\n \x01(\x0e\x32\x39.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunStateB\x03\xe0\x41\x03\x12\x46\n\x08progress\x18\x0b \x01(\x0b\x32/.google.cloud.ces.v1beta.EvaluationRun.ProgressB\x03\xe0\x41\x03\x12>\n\x06\x63onfig\x18\x0c \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x03\x12(\n\x05\x65rror\x18\x0e \x01(\x0b\x32\x12.google.rpc.StatusB\x05\x18\x01\xe0\x41\x03\x12\x45\n\nerror_info\x18\x11 \x01(\x0b\x32,.google.cloud.ces.v1beta.EvaluationErrorInfoB\x03\xe0\x41\x03\x12i\n\x18\x65valuation_run_summaries\x18\x0f \x03(\x0b\x32\x42.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunSummariesEntryB\x03\xe0\x41\x03\x12\x43\n\x0elatency_report\x18\x19 \x01(\x0b\x32&.google.cloud.ces.v1beta.LatencyReportB\x03\xe0\x41\x03\x12\x16\n\trun_count\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x13persona_run_configs\x18\x12 \x03(\x0b\x32).google.cloud.ces.v1beta.PersonaRunConfigB\x03\xe0\x41\x03\x12M\n\x13optimization_config\x18\x13 \x01(\x0b\x32+.google.cloud.ces.v1beta.OptimizationConfigB\x03\xe0\x41\x01\x12S\n\x18scheduled_evaluation_run\x18\x14 \x01(\tB1\xe0\x41\x03\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12H\n\x11golden_run_method\x18\x15 \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x03\x12\x16\n\toperation\x18\x1a \x01(\tB\x03\xe0\x41\x03\x1a\xb0\x01\n\x08Progress\x12\x18\n\x0btotal_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65rror_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63ompleted_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cpassed_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63\x61ncelled_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x1a\x66\n\x14\x45valuationRunSummary\x12\x19\n\x0cpassed_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65rror_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x1az\n\x1b\x45valuationRunSummariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.ces.v1beta.EvaluationRun.EvaluationRunSummary:\x02\x38\x01\"V\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOLDEN\x10\x01\x12\x0c\n\x08SCENARIO\x10\x02\x12\t\n\x05MIXED\x10\x03\"|\n\x12\x45valuationRunState\x12$\n EVALUATION_RUN_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x05\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\r\n\tCANCELLED\x10\x04:\x99\x01\xea\x41\x95\x01\n ces.googleapis.com/EvaluationRun\x12Rprojects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}*\x0e\x65valuationRuns2\revaluationRun\"\xaa\n\n\rLatencyReport\x12R\n\x0etool_latencies\x18\x01 \x03(\x0b\x32\x32.google.cloud.ces.v1beta.LatencyReport.ToolLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12Z\n\x12\x63\x61llback_latencies\x18\x02 \x03(\x0b\x32\x36.google.cloud.ces.v1beta.LatencyReport.CallbackLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12\\\n\x13guardrail_latencies\x18\x03 \x03(\x0b\x32\x37.google.cloud.ces.v1beta.LatencyReport.GuardrailLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12Y\n\x12llm_call_latencies\x18\x04 \x03(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LlmCallLatencyB\x06\xe0\x41\x03\xe0\x41\x06\x12\x1a\n\rsession_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x1a\xc8\x01\n\x0eLatencyMetrics\x12\x33\n\x0bp50_latency\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x33\n\x0bp90_latency\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x33\n\x0bp99_latency\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x17\n\ncall_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x1a\x89\x02\n\x0bToolLatency\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x03\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x03H\x00\x12\x1e\n\x11tool_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x04 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x42\x11\n\x0ftool_identifier\x1az\n\x0f\x43\x61llbackLatency\x12\x12\n\x05stage\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x02 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x1a\xc5\x01\n\x10GuardrailLatency\x12\x37\n\tguardrail\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x63\x65s.googleapis.com/Guardrail\x12#\n\x16guardrail_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x03 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\x1ay\n\x0eLlmCallLatency\x12\x12\n\x05model\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0flatency_metrics\x18\x02 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.LatencyReport.LatencyMetricsB\x03\xe0\x41\x03\"\xa4\x04\n\x15\x45valuationExpectation\x12W\n\x0cllm_criteria\x18\x03 \x01(\x0b\x32:.google.cloud.ces.v1beta.EvaluationExpectation.LlmCriteriaB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04tags\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x1a\"\n\x0bLlmCriteria\x12\x13\n\x06prompt\x18\x01 \x01(\tB\x03\xe0\x41\x02:\xc1\x01\xea\x41\xbd\x01\n(ces.googleapis.com/EvaluationExpectation\x12\x62projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}*\x16\x65valuationExpectations2\x15\x65valuationExpectationB\n\n\x08\x63riteria\"\xb4\x03\n\x10\x45valuationConfig\x12L\n\x12input_audio_config\x18\x01 \x01(\x0b\x32).google.cloud.ces.v1beta.InputAudioConfigB\x05\x18\x01\xe0\x41\x01\x12N\n\x13output_audio_config\x18\x02 \x01(\x0b\x32*.google.cloud.ces.v1beta.OutputAudioConfigB\x05\x18\x01\xe0\x41\x01\x12\\\n\x12\x65valuation_channel\x18\x03 \x01(\x0e\x32;.google.cloud.ces.v1beta.EvaluationConfig.EvaluationChannelB\x03\xe0\x41\x01\x12V\n\x13tool_call_behaviour\x18\x04 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.EvaluationToolCallBehaviourB\x03\xe0\x41\x01\"L\n\x11\x45valuationChannel\x12\"\n\x1e\x45VALUATION_CHANNEL_UNSPECIFIED\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\"\x97\x03\n\x13\x45valuationErrorInfo\x12O\n\nerror_type\x18\x01 \x01(\x0e\x32\x36.google.cloud.ces.v1beta.EvaluationErrorInfo.ErrorTypeB\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsession_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19user_facing_error_message\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\tErrorType\x12\x1a\n\x16\x45RROR_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fRUNTIME_FAILURE\x10\x01\x12\"\n\x1e\x43ONVERSATION_RETRIEVAL_FAILURE\x10\x02\x12\x1e\n\x1aMETRIC_CALCULATION_FAILURE\x10\x03\x12\x1d\n\x19\x45VALUATION_UPDATE_FAILURE\x10\x04\x12\x13\n\x0fQUOTA_EXHAUSTED\x10\x05\x12\x1b\n\x17USER_SIMULATION_FAILURE\x10\x06\"\xec\x05\n\x14RunEvaluationRequest\x12+\n\x03\x61pp\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12:\n\x0b\x65valuations\x18\x02 \x03(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12H\n\x12\x65valuation_dataset\x18\x03 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12:\n\x0b\x61pp_version\x18\x06 \x01(\tB%\xe0\x41\x01\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/AppVersion\x12>\n\x06\x63onfig\x18\x08 \x01(\x0b\x32).google.cloud.ces.v1beta.EvaluationConfigB\x03\xe0\x41\x01\x12\x1b\n\trun_count\x18\t \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12K\n\x13persona_run_configs\x18\n \x03(\x0b\x32).google.cloud.ces.v1beta.PersonaRunConfigB\x03\xe0\x41\x01\x12M\n\x13optimization_config\x18\x0b \x01(\x0b\x32+.google.cloud.ces.v1beta.OptimizationConfigB\x03\xe0\x41\x01\x12S\n\x18scheduled_evaluation_run\x18\x0c \x01(\tB1\xe0\x41\x01\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12H\n\x11golden_run_method\x18\r \x01(\x0e\x32(.google.cloud.ces.v1beta.GoldenRunMethodB\x03\xe0\x41\x01\x12$\n\x17generate_latency_report\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x42\x0c\n\n_run_count\"\xe9\x08\n\x16ScheduledEvaluationRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07request\x18\x03 \x01(\x0b\x32-.google.cloud.ces.v1beta.RunEvaluationRequestB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12`\n\x11scheduling_config\x18\x05 \x01(\x0b\x32@.google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfigB\x03\xe0\x41\x02\x12\x13\n\x06\x61\x63tive\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\x12last_completed_run\x18\x07 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x1d\n\x10total_executions\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x46\n\x1dnext_scheduled_execution_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\ncreated_by\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0flast_updated_by\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0e \x01(\tB\x03\xe0\x41\x03\x1a\x9d\x02\n\x10SchedulingConfig\x12\x62\n\tfrequency\x18\x01 \x01(\x0e\x32J.google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfig.FrequencyB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x19\n\x0c\x64\x61ys_of_week\x18\x03 \x03(\x05\x42\x03\xe0\x41\x01\"U\n\tFrequency\x12\x19\n\x15\x46REQUENCY_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0c\n\x08\x42IWEEKLY\x10\x04:\xc7\x01\xea\x41\xc3\x01\n)ces.googleapis.com/ScheduledEvaluationRun\x12\x65projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}*\x17scheduledEvaluationRuns2\x16scheduledEvaluationRun\"A\n\x10PersonaRunConfig\x12\x14\n\x07persona\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ntask_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"\x9b\x03\n\x12OptimizationConfig\x12!\n\x14generate_loss_report\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11\x61ssistant_session\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0ereport_summary\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12should_suggest_fix\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12S\n\x06status\x18\x04 \x01(\x0e\x32>.google.cloud.ces.v1beta.OptimizationConfig.OptimizationStatusB\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x31\n\x0bloss_report\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\"`\n\x12OptimizationStatus\x12#\n\x1fOPTIMIZATION_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42_\n\x1b\x63om.google.cloud.ces.v1betaB\x0f\x45valuationProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - AggregatedMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics").msgclass - AggregatedMetrics::ToolMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.ToolMetrics").msgclass - AggregatedMetrics::TurnLatencyMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.TurnLatencyMetrics").msgclass - AggregatedMetrics::ToolCallLatencyMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.ToolCallLatencyMetrics").msgclass - AggregatedMetrics::SemanticSimilarityMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.SemanticSimilarityMetrics").msgclass - AggregatedMetrics::HallucinationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.HallucinationMetrics").msgclass - AggregatedMetrics::MetricsByAppVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.MetricsByAppVersion").msgclass - AggregatedMetrics::MetricsByTurn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AggregatedMetrics.MetricsByTurn").msgclass - Evaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation").msgclass - Evaluation::GoldenExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.GoldenExpectation").msgclass - Evaluation::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Step").msgclass - Evaluation::GoldenTurn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.GoldenTurn").msgclass - Evaluation::Golden = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Golden").msgclass - Evaluation::ScenarioExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.ScenarioExpectation").msgclass - Evaluation::ScenarioExpectation::ToolExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.ScenarioExpectation.ToolExpectation").msgclass - Evaluation::Scenario = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Scenario").msgclass - Evaluation::Scenario::UserFact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Scenario.UserFact").msgclass - Evaluation::Scenario::TaskCompletionBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Scenario.TaskCompletionBehavior").enummodule - Evaluation::Scenario::UserGoalBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Evaluation.Scenario.UserGoalBehavior").enummodule - EvaluationDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationDataset").msgclass - EvaluationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult").msgclass - EvaluationResult::GoldenExpectationOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcome").msgclass - EvaluationResult::GoldenExpectationOutcome::ToolInvocationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.GoldenExpectationOutcome.ToolInvocationResult").msgclass - EvaluationResult::EvaluationExpectationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.EvaluationExpectationResult").msgclass - EvaluationResult::GoldenResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.GoldenResult").msgclass - EvaluationResult::GoldenResult::TurnReplayResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.GoldenResult.TurnReplayResult").msgclass - EvaluationResult::ScenarioRubricOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ScenarioRubricOutcome").msgclass - EvaluationResult::ScenarioExpectationOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcome").msgclass - EvaluationResult::ScenarioExpectationOutcome::ObservedToolCall = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ScenarioExpectationOutcome.ObservedToolCall").msgclass - EvaluationResult::ScenarioResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ScenarioResult").msgclass - EvaluationResult::SpanLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.SpanLatency").msgclass - EvaluationResult::SpanLatency::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.SpanLatency.Type").enummodule - EvaluationResult::ToolCallLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ToolCallLatency").msgclass - EvaluationResult::HallucinationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.HallucinationResult").msgclass - EvaluationResult::UserGoalSatisfactionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.UserGoalSatisfactionResult").msgclass - EvaluationResult::SemanticSimilarityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.SemanticSimilarityResult").msgclass - EvaluationResult::OverallToolInvocationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.OverallToolInvocationResult").msgclass - EvaluationResult::TaskCompletionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.TaskCompletionResult").msgclass - EvaluationResult::Outcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.Outcome").enummodule - EvaluationResult::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationResult.ExecutionState").enummodule - EvaluationRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationRun").msgclass - EvaluationRun::Progress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationRun.Progress").msgclass - EvaluationRun::EvaluationRunSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationRun.EvaluationRunSummary").msgclass - EvaluationRun::EvaluationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationRun.EvaluationType").enummodule - EvaluationRun::EvaluationRunState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationRun.EvaluationRunState").enummodule - LatencyReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport").msgclass - LatencyReport::LatencyMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport.LatencyMetrics").msgclass - LatencyReport::ToolLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport.ToolLatency").msgclass - LatencyReport::CallbackLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport.CallbackLatency").msgclass - LatencyReport::GuardrailLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport.GuardrailLatency").msgclass - LatencyReport::LlmCallLatency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.LatencyReport.LlmCallLatency").msgclass - EvaluationExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationExpectation").msgclass - EvaluationExpectation::LlmCriteria = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationExpectation.LlmCriteria").msgclass - EvaluationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationConfig").msgclass - EvaluationConfig::EvaluationChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationConfig.EvaluationChannel").enummodule - EvaluationErrorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationErrorInfo").msgclass - EvaluationErrorInfo::ErrorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EvaluationErrorInfo.ErrorType").enummodule - RunEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RunEvaluationRequest").msgclass - ScheduledEvaluationRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ScheduledEvaluationRun").msgclass - ScheduledEvaluationRun::SchedulingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfig").msgclass - ScheduledEvaluationRun::SchedulingConfig::Frequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ScheduledEvaluationRun.SchedulingConfig.Frequency").enummodule - PersonaRunConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.PersonaRunConfig").msgclass - OptimizationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.OptimizationConfig").msgclass - OptimizationConfig::OptimizationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.OptimizationConfig.OptimizationStatus").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service.rb deleted file mode 100644 index 5ee4d4fdbd88..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/ces/v1beta/version" - -require "google/cloud/ces/v1beta/evaluation_service/credentials" -require "google/cloud/ces/v1beta/evaluation_service/paths" -require "google/cloud/ces/v1beta/evaluation_service/operations" -require "google/cloud/ces/v1beta/evaluation_service/client" -require "google/cloud/ces/v1beta/evaluation_service/rest" - -module Google - module Cloud - module Ces - module V1beta - ## - # EvaluationService exposes methods to perform evaluation for the CES app. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/ces/v1beta/evaluation_service" - # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/ces/v1beta/evaluation_service/rest" - # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - module EvaluationService - end - end - end - end -end - -helper_path = ::File.join __dir__, "evaluation_service", "helpers.rb" -require "google/cloud/ces/v1beta/evaluation_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb deleted file mode 100644 index e11d4a03ed5d..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/client.rb +++ /dev/null @@ -1,4048 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/evaluation_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module Ces - module V1beta - module EvaluationService - ## - # Client for the EvaluationService service. - # - # EvaluationService exposes methods to perform evaluation for the CES app. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :evaluation_service_stub - - ## - # Configure the EvaluationService Client class. - # - # See {::Google::Cloud::Ces::V1beta::EvaluationService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EvaluationService clients - # ::Google::Cloud::Ces::V1beta::EvaluationService::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", "Ces", "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 = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EvaluationService 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::Ces::V1beta::EvaluationService::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 - @evaluation_service_stub.universe_domain - end - - ## - # Create a new EvaluationService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EvaluationService 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/ces/v1beta/evaluation_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 - - @evaluation_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Ces::V1beta::EvaluationService::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 - ) - - @evaluation_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 = @evaluation_service_stub.endpoint - config.universe_domain = @evaluation_service_stub.universe_domain - config.logger = @evaluation_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationService::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 - @evaluation_service_stub.logger - end - - # Service calls - - ## - # Runs an evaluation of the app. - # - # @overload run_evaluation(request, options = nil) - # Pass arguments to `run_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RunEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_evaluation(app: nil, evaluations: nil, evaluation_dataset: nil, display_name: nil, app_version: nil, config: nil, run_count: nil, persona_run_configs: nil, optimization_config: nil, scheduled_evaluation_run: nil, golden_run_method: nil, generate_latency_report: nil) - # Pass arguments to `run_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param app [::String] - # Required. The app to evaluate. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param evaluations [::Array<::String>] - # Optional. List of evaluations to run. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @param evaluation_dataset [::String] - # Optional. An evaluation dataset to run. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` - # @param display_name [::String] - # Optional. The display name of the evaluation run. - # @param app_version [::String] - # Optional. The app version to evaluate. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # @param config [::Google::Cloud::Ces::V1beta::EvaluationConfig, ::Hash] - # Optional. The configuration to use for the run. - # @param run_count [::Integer] - # Optional. The number of times to run the evaluation. If not set, the - # default value is 1 per golden, and 5 per scenario. - # @param persona_run_configs [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig, ::Hash>] - # Optional. The configuration to use for the run per persona. - # @param optimization_config [::Google::Cloud::Ces::V1beta::OptimizationConfig, ::Hash] - # Optional. Configuration for running the optimization step after the - # evaluation run. If not set, the optimization step will not be run. - # @param scheduled_evaluation_run [::String] - # Optional. The resource name of the `ScheduledEvaluationRun` that is - # triggering this evaluation run. - # - # If this field is set, the `scheduled_evaluation_run` field on the created - # `EvaluationRun` resource will be populated from this value. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}` - # @param golden_run_method [::Google::Cloud::Ces::V1beta::GoldenRunMethod] - # Optional. The method to run the evaluation if it is a golden evaluation. If - # not set, default to STABLE. - # @param generate_latency_report [::Boolean] - # Optional. Whether to generate a latency report for the evaluation run. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RunEvaluationRequest.new - # - # # Call the run_evaluation method. - # result = client.run_evaluation 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 run_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.app - header_params["app"] = request.app - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :run_evaluation, 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 - - ## - # Uploads audio for use in Golden Evaluations. Stores the audio in the Cloud - # Storage bucket defined in - # 'App.logging_settings.evaluation_audio_recording_config.gcs_bucket' and - # returns a transcript. - # - # @overload upload_evaluation_audio(request, options = nil) - # Pass arguments to `upload_evaluation_audio` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload upload_evaluation_audio(name: nil, audio_content: nil, previous_audio_gcs_uri: nil) - # Pass arguments to `upload_evaluation_audio` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Evaluation for which to upload the - # evaluation audio. Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @param audio_content [::String] - # Required. The raw audio bytes. - # The format of the audio must be single-channel LINEAR16 with a sample - # rate of 16kHz (default InputAudioConfig). - # @param previous_audio_gcs_uri [::String] - # Optional. The Google Cloud Storage URI of the previously uploaded audio - # file to be deleted. Format: `gs:///` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new - # - # # Call the upload_evaluation_audio method. - # result = client.upload_evaluation_audio request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse. - # p result - # - def upload_evaluation_audio request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.upload_evaluation_audio.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.upload_evaluation_audio.timeout, - metadata: metadata, - retry_policy: @config.rpcs.upload_evaluation_audio.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :upload_evaluation_audio, 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 an evaluation. - # - # @overload create_evaluation(request, options = nil) - # Pass arguments to `create_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation(parent: nil, evaluation_id: nil, evaluation: nil) - # Pass arguments to `create_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The app to create the evaluation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param evaluation_id [::String] - # Optional. The ID to use for the evaluation, which will become the final - # component of the evaluation's resource name. If not provided, a unique ID - # will be automatically assigned for the evaluation. - # @param evaluation [::Google::Cloud::Ces::V1beta::Evaluation, ::Hash] - # Required. The evaluation to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Evaluation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new - # - # # Call the create_evaluation method. - # result = client.create_evaluation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. - # p result - # - def create_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest - - # Converts hash and nil to 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_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :create_evaluation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a golden evaluation from a conversation. - # - # @overload generate_evaluation(request, options = nil) - # Pass arguments to `generate_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload generate_evaluation(conversation: nil, source: nil) - # Pass arguments to `generate_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversation [::String] - # Required. The conversation to create the golden evaluation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` - # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, all sources - # will be searched. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new - # - # # Call the generate_evaluation method. - # result = client.generate_evaluation 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 generate_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.generate_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.conversation - header_params["conversation"] = request.conversation - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.generate_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :generate_evaluation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports evaluations into the app. - # - # @overload import_evaluations(request, options = nil) - # Pass arguments to `import_evaluations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_evaluations(conversation_list: nil, gcs_uri: nil, csv_content: nil, parent: nil, import_options: nil) - # Pass arguments to `import_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversation_list [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ConversationList, ::Hash] - # The conversations to import the evaluations from. - # - # Note: The following parameters are mutually exclusive: `conversation_list`, `gcs_uri`, `csv_content`. 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 gcs_uri [::String] - # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - # from which to import evaluations. The format of this URI must be - # `gs:///`. - # - # Note: The following parameters are mutually exclusive: `gcs_uri`, `conversation_list`, `csv_content`. 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 csv_content [::String] - # Raw bytes representing the csv file with the evaluations structure. - # - # Note: The following parameters are mutually exclusive: `csv_content`, `conversation_list`, `gcs_uri`. 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 parent [::String] - # Required. The app to import the evaluations into. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param import_options [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions, ::Hash] - # Optional. Options governing the import process for the evaluations. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new - # - # # Call the import_evaluations method. - # result = client.import_evaluations request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.import_evaluations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :import_evaluations, 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 - - ## - # Creates an evaluation dataset. - # - # @overload create_evaluation_dataset(request, options = nil) - # Pass arguments to `create_evaluation_dataset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_dataset(parent: nil, evaluation_dataset_id: nil, evaluation_dataset: nil) - # Pass arguments to `create_evaluation_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The app to create the evaluation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param evaluation_dataset_id [::String] - # Optional. The ID to use for the evaluation dataset, which will become the - # final component of the evaluation dataset's resource name. If not provided, - # a unique ID will be automatically assigned for the evaluation. - # @param evaluation_dataset [::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash] - # Required. The evaluation dataset to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new - # - # # Call the create_evaluation_dataset method. - # result = client.create_evaluation_dataset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. - # p result - # - def create_evaluation_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest - - # Converts hash and nil to 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_evaluation_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_evaluation_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :create_evaluation_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an evaluation. - # - # @overload update_evaluation(request, options = nil) - # Pass arguments to `update_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation(evaluation: nil, update_mask: nil) - # Pass arguments to `update_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param evaluation [::Google::Cloud::Ces::V1beta::Evaluation, ::Hash] - # Required. The evaluation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Evaluation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new - # - # # Call the update_evaluation method. - # result = client.update_evaluation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. - # p result - # - def update_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest - - # Converts hash and nil to 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_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.evaluation&.name - header_params["evaluation.name"] = request.evaluation.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_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :update_evaluation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an evaluation dataset. - # - # @overload update_evaluation_dataset(request, options = nil) - # Pass arguments to `update_evaluation_dataset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_dataset(evaluation_dataset: nil, update_mask: nil) - # Pass arguments to `update_evaluation_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param evaluation_dataset [::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash] - # Required. The evaluation dataset to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new - # - # # Call the update_evaluation_dataset method. - # result = client.update_evaluation_dataset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. - # p result - # - def update_evaluation_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest - - # Converts hash and nil to 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_evaluation_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.evaluation_dataset&.name - header_params["evaluation_dataset.name"] = request.evaluation_dataset.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_evaluation_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_evaluation_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :update_evaluation_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an evaluation. - # - # @overload delete_evaluation(request, options = nil) - # Pass arguments to `delete_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation(name: nil, force: nil, etag: nil) - # Pass arguments to `delete_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation to delete. - # @param force [::Boolean] - # Optional. Indicates whether to forcefully delete the evaluation, even if it - # is still referenced by evaluation datasets. - # - # * If `force = false`, the deletion will fail if any datasets still - # reference the evaluation. - # * If `force = true`, all existing references from datasets will be removed - # and the evaluation will be deleted. - # @param etag [::String] - # Optional. The current etag of the evaluation. If an etag is not provided, - # the deletion will overwrite any concurrent changes. If an etag is provided - # and does not match the current etag of the evaluation, deletion will be - # blocked and an ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new - # - # # Call the delete_evaluation method. - # result = client.delete_evaluation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest - - # Converts hash and nil to 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_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :delete_evaluation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an evaluation result. - # - # @overload delete_evaluation_result(request, options = nil) - # Pass arguments to `delete_evaluation_result` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_result(name: nil) - # Pass arguments to `delete_evaluation_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation result to delete. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new - # - # # Call the delete_evaluation_result method. - # result = client.delete_evaluation_result request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_evaluation_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest - - # Converts hash and nil to 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_evaluation_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_result.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_evaluation_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :delete_evaluation_result, 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 an evaluation dataset. - # - # @overload delete_evaluation_dataset(request, options = nil) - # Pass arguments to `delete_evaluation_dataset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_dataset(name: nil, etag: nil) - # Pass arguments to `delete_evaluation_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation dataset to delete. - # @param etag [::String] - # Optional. The current etag of the evaluation dataset. If an etag is not - # provided, the deletion will overwrite any concurrent changes. If an etag is - # provided and does not match the current etag of the evaluation dataset, - # deletion will be blocked and an ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new - # - # # Call the delete_evaluation_dataset method. - # result = client.delete_evaluation_dataset request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_evaluation_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest - - # Converts hash and nil to 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_evaluation_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_evaluation_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :delete_evaluation_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an evaluation run. - # - # @overload delete_evaluation_run(request, options = nil) - # Pass arguments to `delete_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_run(name: nil) - # Pass arguments to `delete_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation run to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new - # - # # Call the delete_evaluation_run method. - # result = client.delete_evaluation_run 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_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest - - # Converts hash and nil to 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_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :delete_evaluation_run, 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 details of the specified evaluation. - # - # @overload get_evaluation(request, options = nil) - # Pass arguments to `get_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation(name: nil) - # Pass arguments to `get_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::Evaluation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetEvaluationRequest.new - # - # # Call the get_evaluation method. - # result = client.get_evaluation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. - # p result - # - def get_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRequest - - # Converts hash and nil to 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_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :get_evaluation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified evaluation result. - # - # @overload get_evaluation_result(request, options = nil) - # Pass arguments to `get_evaluation_result` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_result(name: nil) - # Pass arguments to `get_evaluation_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation result to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationResult] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new - # - # # Call the get_evaluation_result method. - # result = client.get_evaluation_result request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationResult. - # p result - # - def get_evaluation_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest - - # Converts hash and nil to 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_evaluation_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_result.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_evaluation_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :get_evaluation_result, 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 the specified evaluation dataset. - # - # @overload get_evaluation_dataset(request, options = nil) - # Pass arguments to `get_evaluation_dataset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_dataset(name: nil) - # Pass arguments to `get_evaluation_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation dataset to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new - # - # # Call the get_evaluation_dataset method. - # result = client.get_evaluation_dataset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. - # p result - # - def get_evaluation_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest - - # Converts hash and nil to 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_evaluation_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_evaluation_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :get_evaluation_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified evaluation run. - # - # @overload get_evaluation_run(request, options = nil) - # Pass arguments to `get_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_run(name: nil) - # Pass arguments to `get_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation run to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new - # - # # Call the get_evaluation_run method. - # result = client.get_evaluation_run request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationRun. - # p result - # - def get_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest - - # Converts hash and nil to 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_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :get_evaluation_run, 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 evaluations in the given app. - # - # @overload list_evaluations(request, options = nil) - # Pass arguments to `list_evaluations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, evaluation_filter: nil, evaluation_run_filter: nil, order_by: nil, last_ten_results: nil) - # Pass arguments to `list_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list evaluations from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations} - # call. - # @param filter [::String] - # Optional. Deprecated: Use evaluation_filter and evaluation_run_filter - # instead. - # @param evaluation_filter [::String] - # Optional. Filter to be applied on the evaluation when listing the - # evaluations. See https://google.aip.dev/160 for more details. Supported - # fields: evaluation_datasets - # @param evaluation_run_filter [::String] - # Optional. Filter string for fields on the associated EvaluationRun - # resources. See https://google.aip.dev/160 for more details. Supported - # fields: create_time, initiated_by, app_version_display_name - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # @param last_ten_results [::Boolean] - # Optional. Whether to include the last 10 evaluation results for each - # evaluation in the response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new - # - # # Call the list_evaluations method. - # result = client.list_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Ces::V1beta::Evaluation. - # p item - # end - # - def list_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest - - # Converts hash and nil to 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_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :list_evaluations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all evaluation results for a given evaluation. - # - # @overload list_evaluation_results(request, options = nil) - # Pass arguments to `list_evaluation_results` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluation_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the evaluation to list evaluation results - # from. To filter by evaluation run, use `-` as the evaluation ID and specify - # the evaluation run ID in the filter. For example: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/-` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the evaluation results. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new - # - # # Call the list_evaluation_results method. - # result = client.list_evaluation_results 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::Ces::V1beta::EvaluationResult. - # p item - # end - # - def list_evaluation_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest - - # Converts hash and nil to 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_evaluation_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_results.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_evaluation_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :list_evaluation_results, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_results, 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 evaluation datasets in the given app. - # - # @overload list_evaluation_datasets(request, options = nil) - # Pass arguments to `list_evaluation_datasets` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluation_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list evaluation datasets from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the evaluation datasets. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new - # - # # Call the list_evaluation_datasets method. - # result = client.list_evaluation_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Ces::V1beta::EvaluationDataset. - # p item - # end - # - def list_evaluation_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest - - # Converts hash and nil to 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_evaluation_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_datasets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_evaluation_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :list_evaluation_datasets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_datasets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all evaluation runs in the given app. - # - # @overload list_evaluation_runs(request, options = nil) - # Pass arguments to `list_evaluation_runs` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluation_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list evaluation runs from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the evaluation runs. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new - # - # # Call the list_evaluation_runs method. - # result = client.list_evaluation_runs 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::Ces::V1beta::EvaluationRun. - # p item - # end - # - def list_evaluation_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest - - # Converts hash and nil to 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_evaluation_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_evaluation_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :list_evaluation_runs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_runs, 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 evaluation expectations in the given app. - # - # @overload list_evaluation_expectations(request, options = nil) - # Pass arguments to `list_evaluation_expectations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_expectations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluation_expectations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list evaluation expectations - # from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the evaluation expectations. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new - # - # # Call the list_evaluation_expectations method. - # result = client.list_evaluation_expectations 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::Ces::V1beta::EvaluationExpectation. - # p item - # end - # - def list_evaluation_expectations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest - - # Converts hash and nil to 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_evaluation_expectations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_expectations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_evaluation_expectations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :list_evaluation_expectations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_expectations, 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 the specified evaluation expectation. - # - # @overload get_evaluation_expectation(request, options = nil) - # Pass arguments to `get_evaluation_expectation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_expectation(name: nil) - # Pass arguments to `get_evaluation_expectation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation expectation to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new - # - # # Call the get_evaluation_expectation method. - # result = client.get_evaluation_expectation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. - # p result - # - def get_evaluation_expectation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest - - # Converts hash and nil to 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_evaluation_expectation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_evaluation_expectation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :get_evaluation_expectation, 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 an evaluation expectation. - # - # @overload create_evaluation_expectation(request, options = nil) - # Pass arguments to `create_evaluation_expectation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_expectation(parent: nil, evaluation_expectation_id: nil, evaluation_expectation: nil) - # Pass arguments to `create_evaluation_expectation` via keyword arguments. Note that at - # least one keyword argument is 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 app to create the evaluation expectation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param evaluation_expectation_id [::String] - # Optional. The ID to use for the evaluation expectation, which will become - # the final component of the evaluation expectation's resource name. If not - # provided, a unique ID will be automatically assigned for the evaluation - # expectation. - # @param evaluation_expectation [::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash] - # Required. The evaluation expectation to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new - # - # # Call the create_evaluation_expectation method. - # result = client.create_evaluation_expectation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. - # p result - # - def create_evaluation_expectation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest - - # Converts hash and nil to 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_evaluation_expectation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_evaluation_expectation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :create_evaluation_expectation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an evaluation expectation. - # - # @overload update_evaluation_expectation(request, options = nil) - # Pass arguments to `update_evaluation_expectation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_expectation(evaluation_expectation: nil, update_mask: nil) - # Pass arguments to `update_evaluation_expectation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param evaluation_expectation [::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash] - # Required. The evaluation expectation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new - # - # # Call the update_evaluation_expectation method. - # result = client.update_evaluation_expectation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. - # p result - # - def update_evaluation_expectation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest - - # Converts hash and nil to 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_evaluation_expectation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.evaluation_expectation&.name - header_params["evaluation_expectation.name"] = request.evaluation_expectation.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_evaluation_expectation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_evaluation_expectation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :update_evaluation_expectation, 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 an evaluation expectation. - # - # @overload delete_evaluation_expectation(request, options = nil) - # Pass arguments to `delete_evaluation_expectation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_expectation(name: nil, etag: nil) - # Pass arguments to `delete_evaluation_expectation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation expectation to delete. - # @param etag [::String] - # Optional. The current etag of the evaluation expectation. If an etag is not - # provided, the deletion will overwrite any concurrent changes. If an etag is - # provided and does not match the current etag of the evaluation expectation, - # deletion will be blocked and an ABORTED error will be returned. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new - # - # # Call the delete_evaluation_expectation method. - # result = client.delete_evaluation_expectation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_evaluation_expectation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest - - # Converts hash and nil to 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_evaluation_expectation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_evaluation_expectation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :delete_evaluation_expectation, 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 scheduled evaluation run. - # - # @overload create_scheduled_evaluation_run(request, options = nil) - # Pass arguments to `create_scheduled_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(parent: nil, scheduled_evaluation_run_id: nil, scheduled_evaluation_run: nil) - # Pass arguments to `create_scheduled_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is 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 app to create the scheduled evaluation run for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param scheduled_evaluation_run_id [::String] - # Optional. The ID to use for the scheduled evaluation run, which will become - # the final component of the scheduled evaluation run's resource name. If not - # provided, a unique ID will be automatically assigned. - # @param scheduled_evaluation_run [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash] - # Required. The scheduled evaluation run to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new - # - # # Call the create_scheduled_evaluation_run method. - # result = client.create_scheduled_evaluation_run request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. - # p result - # - def create_scheduled_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest - - # Converts hash and nil to 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_scheduled_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_scheduled_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :create_scheduled_evaluation_run, 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 the specified scheduled evaluation run. - # - # @overload get_scheduled_evaluation_run(request, options = nil) - # Pass arguments to `get_scheduled_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(name: nil) - # Pass arguments to `get_scheduled_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the scheduled evaluation run to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new - # - # # Call the get_scheduled_evaluation_run method. - # result = client.get_scheduled_evaluation_run request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. - # p result - # - def get_scheduled_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest - - # Converts hash and nil to 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_scheduled_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_scheduled_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :get_scheduled_evaluation_run, 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 scheduled evaluation runs in the given app. - # - # @overload list_scheduled_evaluation_runs(request, options = nil) - # Pass arguments to `list_scheduled_evaluation_runs` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scheduled_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_scheduled_evaluation_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list scheduled evaluation runs - # from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the scheduled evaluation runs. - # See https://google.aip.dev/160 for more details. - # Currently supports filtering by: - # * request.evaluations:evaluation_id - # * request.evaluation_dataset:evaluation_dataset_id - # @param order_by [::String] - # Optional. Field to sort by. Supported fields are: - # "name" (ascending), "create_time" (descending), "update_time" (descending), - # "next_scheduled_execution" (ascending), and - # "last_completed_run.create_time" (descending). - # If not included, "update_time" will be the default. - # See https://google.aip.dev/132#ordering for more details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new - # - # # Call the list_scheduled_evaluation_runs method. - # result = client.list_scheduled_evaluation_runs 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::Ces::V1beta::ScheduledEvaluationRun. - # p item - # end - # - def list_scheduled_evaluation_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest - - # Converts hash and nil to 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_scheduled_evaluation_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_scheduled_evaluation_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :list_scheduled_evaluation_runs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_scheduled_evaluation_runs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a scheduled evaluation run. - # - # @overload update_scheduled_evaluation_run(request, options = nil) - # Pass arguments to `update_scheduled_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(scheduled_evaluation_run: nil, update_mask: nil) - # Pass arguments to `update_scheduled_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param scheduled_evaluation_run [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash] - # Required. The scheduled evaluation run to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new - # - # # Call the update_scheduled_evaluation_run method. - # result = client.update_scheduled_evaluation_run request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. - # p result - # - def update_scheduled_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest - - # Converts hash and nil to 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_scheduled_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.scheduled_evaluation_run&.name - header_params["scheduled_evaluation_run.name"] = request.scheduled_evaluation_run.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_scheduled_evaluation_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_scheduled_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :update_scheduled_evaluation_run, 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 scheduled evaluation run. - # - # @overload delete_scheduled_evaluation_run(request, options = nil) - # Pass arguments to `delete_scheduled_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(name: nil, etag: nil) - # Pass arguments to `delete_scheduled_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the scheduled evaluation run to delete. - # @param etag [::String] - # Optional. The etag of the ScheduledEvaluationRun. - # If provided, it must match the server's etag. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new - # - # # Call the delete_scheduled_evaluation_run method. - # result = client.delete_scheduled_evaluation_run request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_scheduled_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest - - # Converts hash and nil to 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_scheduled_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_scheduled_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :delete_scheduled_evaluation_run, 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 - - ## - # Tests the voice of a persona. Also accepts a default persona. - # - # @overload test_persona_voice(request, options = nil) - # Pass arguments to `test_persona_voice` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_persona_voice(app: nil, persona_id: nil, text: nil) - # Pass arguments to `test_persona_voice` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param app [::String] - # Required. the resource name of the app to test the persona voice for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param persona_id [::String] - # Required. The persona ID to test the voice for. Also accepts "default". - # @param text [::String] - # Required. The text to test the voice for. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new - # - # # Call the test_persona_voice method. - # result = client.test_persona_voice request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse. - # p result - # - def test_persona_voice request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_persona_voice.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.app - header_params["app"] = request.app - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_persona_voice.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_persona_voice.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :test_persona_voice, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports evaluations. - # - # @overload export_evaluations(request, options = nil) - # Pass arguments to `export_evaluations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_evaluations(parent: nil, names: nil, export_options: nil, include_evaluation_results: nil, include_evaluations: nil) - # Pass arguments to `export_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to export evaluations from. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @param names [::Array<::String>] - # Required. The resource names of the evaluations to export. - # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] - # Optional. The export options for the evaluations. - # @param include_evaluation_results [::Boolean] - # Optional. Includes evaluation results in the export. At least one of - # include_evaluation_results or include_evaluations must be set. - # @param include_evaluations [::Boolean] - # Optional. Includes evaluations in the export. At least one of - # include_evaluation_results or include_evaluations must be set. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new - # - # # Call the export_evaluations method. - # result = client.export_evaluations request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.export_evaluations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :export_evaluations, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports evaluations runs. - # - # @overload export_evaluation_runs(request, options = nil) - # Pass arguments to `export_evaluation_runs` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_evaluation_runs(parent: nil, names: nil, export_options: nil) - # Pass arguments to `export_evaluation_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to export evaluation runs from. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @param names [::Array<::String>] - # Required. The resource names of the evaluation runs to export. - # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] - # Optional. The export options for the evaluation runs. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new - # - # # Call the export_evaluation_runs method. - # result = client.export_evaluation_runs request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluation_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_evaluation_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.export_evaluation_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_evaluation_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :export_evaluation_runs, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports evaluations results. - # - # @overload export_evaluation_results(request, options = nil) - # Pass arguments to `export_evaluation_results` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_evaluation_results(parent: nil, names: nil, export_options: nil) - # Pass arguments to `export_evaluation_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the evaluation to export evaluation results - # from. Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @param names [::Array<::String>] - # Required. The resource names of the evaluation results to export. - # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] - # Optional. The export options for the evaluation results. - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new - # - # # Call the export_evaluation_results method. - # result = client.export_evaluation_results request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluation_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_evaluation_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.export_evaluation_results.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_evaluation_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :export_evaluation_results, 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 - - ## - # Runs metrics on an existing evaluation result. - # - # @overload run_evaluation_result_metrics(request, options = nil) - # Pass arguments to `run_evaluation_result_metrics` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_evaluation_result_metrics(evaluation_result_id: nil) - # Pass arguments to `run_evaluation_result_metrics` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param evaluation_result_id [::String] - # Required. The evaluation result to run metrics for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}` - # - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new - # - # # Call the run_evaluation_result_metrics method. - # result = client.run_evaluation_result_metrics 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 run_evaluation_result_metrics request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_evaluation_result_metrics.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.evaluation_result_id - header_params["evaluation_result_id"] = request.evaluation_result_id - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_evaluation_result_metrics.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_evaluation_result_metrics.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.call_rpc :run_evaluation_result_metrics, 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 EvaluationService API. - # - # This class represents the configuration for EvaluationService, - # 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::Ces::V1beta::EvaluationService::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 - # # run_evaluation to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Ces::V1beta::EvaluationService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.run_evaluation.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.run_evaluation.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::Ces::V1beta::EvaluationService::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 = "ces.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 EvaluationService 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 `run_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :run_evaluation - ## - # RPC-specific configuration for `upload_evaluation_audio` - # @return [::Gapic::Config::Method] - # - attr_reader :upload_evaluation_audio - ## - # RPC-specific configuration for `create_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_evaluation - ## - # RPC-specific configuration for `generate_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_evaluation - ## - # RPC-specific configuration for `import_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :import_evaluations - ## - # RPC-specific configuration for `create_evaluation_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_evaluation_dataset - ## - # RPC-specific configuration for `update_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_evaluation - ## - # RPC-specific configuration for `update_evaluation_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_evaluation_dataset - ## - # RPC-specific configuration for `delete_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation - ## - # RPC-specific configuration for `delete_evaluation_result` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation_result - ## - # RPC-specific configuration for `delete_evaluation_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation_dataset - ## - # RPC-specific configuration for `delete_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation_run - ## - # RPC-specific configuration for `get_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation - ## - # RPC-specific configuration for `get_evaluation_result` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation_result - ## - # RPC-specific configuration for `get_evaluation_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation_dataset - ## - # RPC-specific configuration for `get_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation_run - ## - # RPC-specific configuration for `list_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluations - ## - # RPC-specific configuration for `list_evaluation_results` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluation_results - ## - # RPC-specific configuration for `list_evaluation_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluation_datasets - ## - # RPC-specific configuration for `list_evaluation_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluation_runs - ## - # RPC-specific configuration for `list_evaluation_expectations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluation_expectations - ## - # RPC-specific configuration for `get_evaluation_expectation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation_expectation - ## - # RPC-specific configuration for `create_evaluation_expectation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_evaluation_expectation - ## - # RPC-specific configuration for `update_evaluation_expectation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_evaluation_expectation - ## - # RPC-specific configuration for `delete_evaluation_expectation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation_expectation - ## - # RPC-specific configuration for `create_scheduled_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scheduled_evaluation_run - ## - # RPC-specific configuration for `get_scheduled_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scheduled_evaluation_run - ## - # RPC-specific configuration for `list_scheduled_evaluation_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scheduled_evaluation_runs - ## - # RPC-specific configuration for `update_scheduled_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scheduled_evaluation_run - ## - # RPC-specific configuration for `delete_scheduled_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scheduled_evaluation_run - ## - # RPC-specific configuration for `test_persona_voice` - # @return [::Gapic::Config::Method] - # - attr_reader :test_persona_voice - ## - # RPC-specific configuration for `export_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluations - ## - # RPC-specific configuration for `export_evaluation_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluation_runs - ## - # RPC-specific configuration for `export_evaluation_results` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluation_results - ## - # RPC-specific configuration for `run_evaluation_result_metrics` - # @return [::Gapic::Config::Method] - # - attr_reader :run_evaluation_result_metrics - - # @private - def initialize parent_rpcs = nil - run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation - @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config - upload_evaluation_audio_config = parent_rpcs.upload_evaluation_audio if parent_rpcs.respond_to? :upload_evaluation_audio - @upload_evaluation_audio = ::Gapic::Config::Method.new upload_evaluation_audio_config - create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation - @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config - generate_evaluation_config = parent_rpcs.generate_evaluation if parent_rpcs.respond_to? :generate_evaluation - @generate_evaluation = ::Gapic::Config::Method.new generate_evaluation_config - import_evaluations_config = parent_rpcs.import_evaluations if parent_rpcs.respond_to? :import_evaluations - @import_evaluations = ::Gapic::Config::Method.new import_evaluations_config - create_evaluation_dataset_config = parent_rpcs.create_evaluation_dataset if parent_rpcs.respond_to? :create_evaluation_dataset - @create_evaluation_dataset = ::Gapic::Config::Method.new create_evaluation_dataset_config - update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation - @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config - update_evaluation_dataset_config = parent_rpcs.update_evaluation_dataset if parent_rpcs.respond_to? :update_evaluation_dataset - @update_evaluation_dataset = ::Gapic::Config::Method.new update_evaluation_dataset_config - delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation - @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config - delete_evaluation_result_config = parent_rpcs.delete_evaluation_result if parent_rpcs.respond_to? :delete_evaluation_result - @delete_evaluation_result = ::Gapic::Config::Method.new delete_evaluation_result_config - delete_evaluation_dataset_config = parent_rpcs.delete_evaluation_dataset if parent_rpcs.respond_to? :delete_evaluation_dataset - @delete_evaluation_dataset = ::Gapic::Config::Method.new delete_evaluation_dataset_config - delete_evaluation_run_config = parent_rpcs.delete_evaluation_run if parent_rpcs.respond_to? :delete_evaluation_run - @delete_evaluation_run = ::Gapic::Config::Method.new delete_evaluation_run_config - get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation - @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config - get_evaluation_result_config = parent_rpcs.get_evaluation_result if parent_rpcs.respond_to? :get_evaluation_result - @get_evaluation_result = ::Gapic::Config::Method.new get_evaluation_result_config - get_evaluation_dataset_config = parent_rpcs.get_evaluation_dataset if parent_rpcs.respond_to? :get_evaluation_dataset - @get_evaluation_dataset = ::Gapic::Config::Method.new get_evaluation_dataset_config - get_evaluation_run_config = parent_rpcs.get_evaluation_run if parent_rpcs.respond_to? :get_evaluation_run - @get_evaluation_run = ::Gapic::Config::Method.new get_evaluation_run_config - list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations - @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config - list_evaluation_results_config = parent_rpcs.list_evaluation_results if parent_rpcs.respond_to? :list_evaluation_results - @list_evaluation_results = ::Gapic::Config::Method.new list_evaluation_results_config - list_evaluation_datasets_config = parent_rpcs.list_evaluation_datasets if parent_rpcs.respond_to? :list_evaluation_datasets - @list_evaluation_datasets = ::Gapic::Config::Method.new list_evaluation_datasets_config - list_evaluation_runs_config = parent_rpcs.list_evaluation_runs if parent_rpcs.respond_to? :list_evaluation_runs - @list_evaluation_runs = ::Gapic::Config::Method.new list_evaluation_runs_config - list_evaluation_expectations_config = parent_rpcs.list_evaluation_expectations if parent_rpcs.respond_to? :list_evaluation_expectations - @list_evaluation_expectations = ::Gapic::Config::Method.new list_evaluation_expectations_config - get_evaluation_expectation_config = parent_rpcs.get_evaluation_expectation if parent_rpcs.respond_to? :get_evaluation_expectation - @get_evaluation_expectation = ::Gapic::Config::Method.new get_evaluation_expectation_config - create_evaluation_expectation_config = parent_rpcs.create_evaluation_expectation if parent_rpcs.respond_to? :create_evaluation_expectation - @create_evaluation_expectation = ::Gapic::Config::Method.new create_evaluation_expectation_config - update_evaluation_expectation_config = parent_rpcs.update_evaluation_expectation if parent_rpcs.respond_to? :update_evaluation_expectation - @update_evaluation_expectation = ::Gapic::Config::Method.new update_evaluation_expectation_config - delete_evaluation_expectation_config = parent_rpcs.delete_evaluation_expectation if parent_rpcs.respond_to? :delete_evaluation_expectation - @delete_evaluation_expectation = ::Gapic::Config::Method.new delete_evaluation_expectation_config - create_scheduled_evaluation_run_config = parent_rpcs.create_scheduled_evaluation_run if parent_rpcs.respond_to? :create_scheduled_evaluation_run - @create_scheduled_evaluation_run = ::Gapic::Config::Method.new create_scheduled_evaluation_run_config - get_scheduled_evaluation_run_config = parent_rpcs.get_scheduled_evaluation_run if parent_rpcs.respond_to? :get_scheduled_evaluation_run - @get_scheduled_evaluation_run = ::Gapic::Config::Method.new get_scheduled_evaluation_run_config - list_scheduled_evaluation_runs_config = parent_rpcs.list_scheduled_evaluation_runs if parent_rpcs.respond_to? :list_scheduled_evaluation_runs - @list_scheduled_evaluation_runs = ::Gapic::Config::Method.new list_scheduled_evaluation_runs_config - update_scheduled_evaluation_run_config = parent_rpcs.update_scheduled_evaluation_run if parent_rpcs.respond_to? :update_scheduled_evaluation_run - @update_scheduled_evaluation_run = ::Gapic::Config::Method.new update_scheduled_evaluation_run_config - delete_scheduled_evaluation_run_config = parent_rpcs.delete_scheduled_evaluation_run if parent_rpcs.respond_to? :delete_scheduled_evaluation_run - @delete_scheduled_evaluation_run = ::Gapic::Config::Method.new delete_scheduled_evaluation_run_config - test_persona_voice_config = parent_rpcs.test_persona_voice if parent_rpcs.respond_to? :test_persona_voice - @test_persona_voice = ::Gapic::Config::Method.new test_persona_voice_config - export_evaluations_config = parent_rpcs.export_evaluations if parent_rpcs.respond_to? :export_evaluations - @export_evaluations = ::Gapic::Config::Method.new export_evaluations_config - export_evaluation_runs_config = parent_rpcs.export_evaluation_runs if parent_rpcs.respond_to? :export_evaluation_runs - @export_evaluation_runs = ::Gapic::Config::Method.new export_evaluation_runs_config - export_evaluation_results_config = parent_rpcs.export_evaluation_results if parent_rpcs.respond_to? :export_evaluation_results - @export_evaluation_results = ::Gapic::Config::Method.new export_evaluation_results_config - run_evaluation_result_metrics_config = parent_rpcs.run_evaluation_result_metrics if parent_rpcs.respond_to? :run_evaluation_result_metrics - @run_evaluation_result_metrics = ::Gapic::Config::Method.new run_evaluation_result_metrics_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/credentials.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/credentials.rb deleted file mode 100644 index 17912db6d86d..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/credentials.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Ces - module V1beta - module EvaluationService - # Credentials for the EvaluationService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/ces", - "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-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb deleted file mode 100644 index e0208688cc5a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Ces - module V1beta - module EvaluationService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the EvaluationService 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 EvaluationService 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::Ces::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::Ces::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::Ces::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::Ces::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::Ces::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 = "ces.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-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/paths.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/paths.rb deleted file mode 100644 index 152664329fa3..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/paths.rb +++ /dev/null @@ -1,306 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - module EvaluationService - # Path helper methods for the EvaluationService API. - module Paths - ## - # Create a fully-qualified Agent resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param agent [String] - # - # @return [::String] - def agent_path project:, location:, app:, agent: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/agents/#{agent}" - end - - ## - # Create a fully-qualified App resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # - # @return [::String] - def app_path project:, location:, app: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}" - end - - ## - # Create a fully-qualified AppVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param version [String] - # - # @return [::String] - def app_version_path project:, location:, app:, version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/versions/#{version}" - end - - ## - # Create a fully-qualified Changelog resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/changelogs/{changelog}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param changelog [String] - # - # @return [::String] - def changelog_path project:, location:, app:, changelog: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/changelogs/#{changelog}" - end - - ## - # Create a fully-qualified Conversation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param conversation [String] - # - # @return [::String] - def conversation_path project:, location:, app:, conversation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/conversations/#{conversation}" - end - - ## - # Create a fully-qualified Evaluation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param evaluation [String] - # - # @return [::String] - def evaluation_path project:, location:, app:, evaluation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/evaluations/#{evaluation}" - end - - ## - # Create a fully-qualified EvaluationDataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluation_dataset}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param evaluation_dataset [String] - # - # @return [::String] - def evaluation_dataset_path project:, location:, app:, evaluation_dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/evaluationDatasets/#{evaluation_dataset}" - end - - ## - # Create a fully-qualified EvaluationExpectation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param evaluation_expectation [String] - # - # @return [::String] - def evaluation_expectation_path project:, location:, app:, evaluation_expectation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/evaluationExpectations/#{evaluation_expectation}" - end - - ## - # Create a fully-qualified EvaluationResult resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param evaluation [String] - # @param evaluation_result [String] - # - # @return [::String] - def evaluation_result_path project:, location:, app:, evaluation:, evaluation_result: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - raise ::ArgumentError, "evaluation cannot contain /" if evaluation.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/evaluations/#{evaluation}/results/#{evaluation_result}" - end - - ## - # Create a fully-qualified EvaluationRun resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param evaluation_run [String] - # - # @return [::String] - def evaluation_run_path project:, location:, app:, evaluation_run: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/evaluationRuns/#{evaluation_run}" - end - - ## - # Create a fully-qualified ScheduledEvaluationRun resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param scheduled_evaluation_run [String] - # - # @return [::String] - def scheduled_evaluation_run_path project:, location:, app:, scheduled_evaluation_run: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/scheduledEvaluationRuns/#{scheduled_evaluation_run}" - end - - ## - # Create a fully-qualified Tool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param tool [String] - # - # @return [::String] - def tool_path project:, location:, app:, tool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/tools/#{tool}" - end - - ## - # Create a fully-qualified Toolset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param toolset [String] - # - # @return [::String] - def toolset_path project:, location:, app:, toolset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/toolsets/#{toolset}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest.rb deleted file mode 100644 index 5b2921fd15f6..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/ces/v1beta/version" -require "google/cloud/ces/v1beta/bindings_override" - -require "google/cloud/ces/v1beta/evaluation_service/credentials" -require "google/cloud/ces/v1beta/evaluation_service/paths" -require "google/cloud/ces/v1beta/evaluation_service/rest/operations" -require "google/cloud/ces/v1beta/evaluation_service/rest/client" - -module Google - module Cloud - module Ces - module V1beta - ## - # EvaluationService exposes methods to perform evaluation for the CES app. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/ces/v1beta/evaluation_service/rest" - # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - module EvaluationService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/ces/v1beta/evaluation_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb deleted file mode 100644 index 55a5efdb1de4..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb +++ /dev/null @@ -1,3768 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/evaluation_service_pb" -require "google/cloud/ces/v1beta/evaluation_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Ces - module V1beta - module EvaluationService - module Rest - ## - # REST client for the EvaluationService service. - # - # EvaluationService exposes methods to perform evaluation for the CES app. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :evaluation_service_stub - - ## - # Configure the EvaluationService Client class. - # - # See {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EvaluationService clients - # ::Google::Cloud::Ces::V1beta::EvaluationService::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", "Ces", "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 = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EvaluationService 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::Ces::V1beta::EvaluationService::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 - @evaluation_service_stub.universe_domain - end - - ## - # Create a new EvaluationService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EvaluationService 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::Ces::V1beta::EvaluationService::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 - - @evaluation_service_stub = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @evaluation_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 = @evaluation_service_stub.endpoint - config.universe_domain = @evaluation_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @evaluation_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationService::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 - @evaluation_service_stub.logger - end - - # Service calls - - ## - # Runs an evaluation of the app. - # - # @overload run_evaluation(request, options = nil) - # Pass arguments to `run_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RunEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_evaluation(app: nil, evaluations: nil, evaluation_dataset: nil, display_name: nil, app_version: nil, config: nil, run_count: nil, persona_run_configs: nil, optimization_config: nil, scheduled_evaluation_run: nil, golden_run_method: nil, generate_latency_report: nil) - # Pass arguments to `run_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param app [::String] - # Required. The app to evaluate. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param evaluations [::Array<::String>] - # Optional. List of evaluations to run. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @param evaluation_dataset [::String] - # Optional. An evaluation dataset to run. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` - # @param display_name [::String] - # Optional. The display name of the evaluation run. - # @param app_version [::String] - # Optional. The app version to evaluate. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # @param config [::Google::Cloud::Ces::V1beta::EvaluationConfig, ::Hash] - # Optional. The configuration to use for the run. - # @param run_count [::Integer] - # Optional. The number of times to run the evaluation. If not set, the - # default value is 1 per golden, and 5 per scenario. - # @param persona_run_configs [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig, ::Hash>] - # Optional. The configuration to use for the run per persona. - # @param optimization_config [::Google::Cloud::Ces::V1beta::OptimizationConfig, ::Hash] - # Optional. Configuration for running the optimization step after the - # evaluation run. If not set, the optimization step will not be run. - # @param scheduled_evaluation_run [::String] - # Optional. The resource name of the `ScheduledEvaluationRun` that is - # triggering this evaluation run. - # - # If this field is set, the `scheduled_evaluation_run` field on the created - # `EvaluationRun` resource will be populated from this value. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}` - # @param golden_run_method [::Google::Cloud::Ces::V1beta::GoldenRunMethod] - # Optional. The method to run the evaluation if it is a golden evaluation. If - # not set, default to STABLE. - # @param generate_latency_report [::Boolean] - # Optional. Whether to generate a latency report for the evaluation run. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RunEvaluationRequest.new - # - # # Call the run_evaluation method. - # result = client.run_evaluation 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 run_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.run_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.run_evaluation 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 - - ## - # Uploads audio for use in Golden Evaluations. Stores the audio in the Cloud - # Storage bucket defined in - # 'App.logging_settings.evaluation_audio_recording_config.gcs_bucket' and - # returns a transcript. - # - # @overload upload_evaluation_audio(request, options = nil) - # Pass arguments to `upload_evaluation_audio` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload upload_evaluation_audio(name: nil, audio_content: nil, previous_audio_gcs_uri: nil) - # Pass arguments to `upload_evaluation_audio` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Evaluation for which to upload the - # evaluation audio. Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @param audio_content [::String] - # Required. The raw audio bytes. - # The format of the audio must be single-channel LINEAR16 with a sample - # rate of 16kHz (default InputAudioConfig). - # @param previous_audio_gcs_uri [::String] - # Optional. The Google Cloud Storage URI of the previously uploaded audio - # file to be deleted. Format: `gs:///` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new - # - # # Call the upload_evaluation_audio method. - # result = client.upload_evaluation_audio request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse. - # p result - # - def upload_evaluation_audio request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.upload_evaluation_audio.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.upload_evaluation_audio.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.upload_evaluation_audio.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.upload_evaluation_audio 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 an evaluation. - # - # @overload create_evaluation(request, options = nil) - # Pass arguments to `create_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation(parent: nil, evaluation_id: nil, evaluation: nil) - # Pass arguments to `create_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The app to create the evaluation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param evaluation_id [::String] - # Optional. The ID to use for the evaluation, which will become the final - # component of the evaluation's resource name. If not provided, a unique ID - # will be automatically assigned for the evaluation. - # @param evaluation [::Google::Cloud::Ces::V1beta::Evaluation, ::Hash] - # Required. The evaluation to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Evaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new - # - # # Call the create_evaluation method. - # result = client.create_evaluation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. - # p result - # - def create_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest - - # Converts hash and nil to an 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_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.create_evaluation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a golden evaluation from a conversation. - # - # @overload generate_evaluation(request, options = nil) - # Pass arguments to `generate_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload generate_evaluation(conversation: nil, source: nil) - # Pass arguments to `generate_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversation [::String] - # Required. The conversation to create the golden evaluation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` - # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, all sources - # will be searched. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new - # - # # Call the generate_evaluation method. - # result = client.generate_evaluation 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 generate_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.generate_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.generate_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.generate_evaluation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports evaluations into the app. - # - # @overload import_evaluations(request, options = nil) - # Pass arguments to `import_evaluations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_evaluations(conversation_list: nil, gcs_uri: nil, csv_content: nil, parent: nil, import_options: nil) - # Pass arguments to `import_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param conversation_list [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ConversationList, ::Hash] - # The conversations to import the evaluations from. - # - # Note: The following parameters are mutually exclusive: `conversation_list`, `gcs_uri`, `csv_content`. 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 gcs_uri [::String] - # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - # from which to import evaluations. The format of this URI must be - # `gs:///`. - # - # Note: The following parameters are mutually exclusive: `gcs_uri`, `conversation_list`, `csv_content`. 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 csv_content [::String] - # Raw bytes representing the csv file with the evaluations structure. - # - # Note: The following parameters are mutually exclusive: `csv_content`, `conversation_list`, `gcs_uri`. 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 parent [::String] - # Required. The app to import the evaluations into. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param import_options [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions, ::Hash] - # Optional. Options governing the import process for the evaluations. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new - # - # # Call the import_evaluations method. - # result = client.import_evaluations request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.import_evaluations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.import_evaluations 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 - - ## - # Creates an evaluation dataset. - # - # @overload create_evaluation_dataset(request, options = nil) - # Pass arguments to `create_evaluation_dataset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_dataset(parent: nil, evaluation_dataset_id: nil, evaluation_dataset: nil) - # Pass arguments to `create_evaluation_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The app to create the evaluation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param evaluation_dataset_id [::String] - # Optional. The ID to use for the evaluation dataset, which will become the - # final component of the evaluation dataset's resource name. If not provided, - # a unique ID will be automatically assigned for the evaluation. - # @param evaluation_dataset [::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash] - # Required. The evaluation dataset to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new - # - # # Call the create_evaluation_dataset method. - # result = client.create_evaluation_dataset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. - # p result - # - def create_evaluation_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest - - # Converts hash and nil to an 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_evaluation_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_evaluation_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.create_evaluation_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an evaluation. - # - # @overload update_evaluation(request, options = nil) - # Pass arguments to `update_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation(evaluation: nil, update_mask: nil) - # Pass arguments to `update_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param evaluation [::Google::Cloud::Ces::V1beta::Evaluation, ::Hash] - # Required. The evaluation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Evaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new - # - # # Call the update_evaluation method. - # result = client.update_evaluation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. - # p result - # - def update_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest - - # Converts hash and nil to an 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_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.update_evaluation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an evaluation dataset. - # - # @overload update_evaluation_dataset(request, options = nil) - # Pass arguments to `update_evaluation_dataset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_dataset(evaluation_dataset: nil, update_mask: nil) - # Pass arguments to `update_evaluation_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param evaluation_dataset [::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash] - # Required. The evaluation dataset to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new - # - # # Call the update_evaluation_dataset method. - # result = client.update_evaluation_dataset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. - # p result - # - def update_evaluation_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest - - # Converts hash and nil to an 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_evaluation_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_evaluation_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.update_evaluation_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an evaluation. - # - # @overload delete_evaluation(request, options = nil) - # Pass arguments to `delete_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation(name: nil, force: nil, etag: nil) - # Pass arguments to `delete_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation to delete. - # @param force [::Boolean] - # Optional. Indicates whether to forcefully delete the evaluation, even if it - # is still referenced by evaluation datasets. - # - # * If `force = false`, the deletion will fail if any datasets still - # reference the evaluation. - # * If `force = true`, all existing references from datasets will be removed - # and the evaluation will be deleted. - # @param etag [::String] - # Optional. The current etag of the evaluation. If an etag is not provided, - # the deletion will overwrite any concurrent changes. If an etag is provided - # and does not match the current etag of the evaluation, deletion will be - # blocked and an ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new - # - # # Call the delete_evaluation method. - # result = client.delete_evaluation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest - - # Converts hash and nil to an 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_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.delete_evaluation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an evaluation result. - # - # @overload delete_evaluation_result(request, options = nil) - # Pass arguments to `delete_evaluation_result` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_result(name: nil) - # Pass arguments to `delete_evaluation_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation result to delete. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new - # - # # Call the delete_evaluation_result method. - # result = client.delete_evaluation_result request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_evaluation_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest - - # Converts hash and nil to an 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_evaluation_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_result.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_evaluation_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.delete_evaluation_result 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 an evaluation dataset. - # - # @overload delete_evaluation_dataset(request, options = nil) - # Pass arguments to `delete_evaluation_dataset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_dataset(name: nil, etag: nil) - # Pass arguments to `delete_evaluation_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation dataset to delete. - # @param etag [::String] - # Optional. The current etag of the evaluation dataset. If an etag is not - # provided, the deletion will overwrite any concurrent changes. If an etag is - # provided and does not match the current etag of the evaluation dataset, - # deletion will be blocked and an ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new - # - # # Call the delete_evaluation_dataset method. - # result = client.delete_evaluation_dataset request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_evaluation_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest - - # Converts hash and nil to an 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_evaluation_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_evaluation_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.delete_evaluation_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an evaluation run. - # - # @overload delete_evaluation_run(request, options = nil) - # Pass arguments to `delete_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_run(name: nil) - # Pass arguments to `delete_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation run to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new - # - # # Call the delete_evaluation_run method. - # result = client.delete_evaluation_run 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_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest - - # Converts hash and nil to an 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_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.delete_evaluation_run 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 details of the specified evaluation. - # - # @overload get_evaluation(request, options = nil) - # Pass arguments to `get_evaluation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation(name: nil) - # Pass arguments to `get_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::Evaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetEvaluationRequest.new - # - # # Call the get_evaluation method. - # result = client.get_evaluation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. - # p result - # - def get_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRequest - - # Converts hash and nil to an 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_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.get_evaluation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified evaluation result. - # - # @overload get_evaluation_result(request, options = nil) - # Pass arguments to `get_evaluation_result` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_result(name: nil) - # Pass arguments to `get_evaluation_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation result to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationResult] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new - # - # # Call the get_evaluation_result method. - # result = client.get_evaluation_result request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationResult. - # p result - # - def get_evaluation_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest - - # Converts hash and nil to an 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_evaluation_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_result.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_evaluation_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.get_evaluation_result 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 the specified evaluation dataset. - # - # @overload get_evaluation_dataset(request, options = nil) - # Pass arguments to `get_evaluation_dataset` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_dataset(name: nil) - # Pass arguments to `get_evaluation_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation dataset to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new - # - # # Call the get_evaluation_dataset method. - # result = client.get_evaluation_dataset request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. - # p result - # - def get_evaluation_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest - - # Converts hash and nil to an 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_evaluation_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_evaluation_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.get_evaluation_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified evaluation run. - # - # @overload get_evaluation_run(request, options = nil) - # Pass arguments to `get_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_run(name: nil) - # Pass arguments to `get_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation run to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new - # - # # Call the get_evaluation_run method. - # result = client.get_evaluation_run request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationRun. - # p result - # - def get_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest - - # Converts hash and nil to an 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_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.get_evaluation_run 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 evaluations in the given app. - # - # @overload list_evaluations(request, options = nil) - # Pass arguments to `list_evaluations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, evaluation_filter: nil, evaluation_run_filter: nil, order_by: nil, last_ten_results: nil) - # Pass arguments to `list_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list evaluations from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluations EvaluationService.ListEvaluations} - # call. - # @param filter [::String] - # Optional. Deprecated: Use evaluation_filter and evaluation_run_filter - # instead. - # @param evaluation_filter [::String] - # Optional. Filter to be applied on the evaluation when listing the - # evaluations. See https://google.aip.dev/160 for more details. Supported - # fields: evaluation_datasets - # @param evaluation_run_filter [::String] - # Optional. Filter string for fields on the associated EvaluationRun - # resources. See https://google.aip.dev/160 for more details. Supported - # fields: create_time, initiated_by, app_version_display_name - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # @param last_ten_results [::Boolean] - # Optional. Whether to include the last 10 evaluation results for each - # evaluation in the response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new - # - # # Call the list_evaluations method. - # result = client.list_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Ces::V1beta::Evaluation. - # p item - # end - # - def list_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest - - # Converts hash and nil to an 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_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.list_evaluations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluations, "evaluations", 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 evaluation results for a given evaluation. - # - # @overload list_evaluation_results(request, options = nil) - # Pass arguments to `list_evaluation_results` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluation_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the evaluation to list evaluation results - # from. To filter by evaluation run, use `-` as the evaluation ID and specify - # the evaluation run ID in the filter. For example: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/-` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_results EvaluationService.ListEvaluationResults} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the evaluation results. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new - # - # # Call the list_evaluation_results method. - # result = client.list_evaluation_results 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::Ces::V1beta::EvaluationResult. - # p item - # end - # - def list_evaluation_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest - - # Converts hash and nil to an 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_evaluation_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_results.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_evaluation_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.list_evaluation_results request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_results, "evaluation_results", 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 evaluation datasets in the given app. - # - # @overload list_evaluation_datasets(request, options = nil) - # Pass arguments to `list_evaluation_datasets` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluation_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list evaluation datasets from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the evaluation datasets. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new - # - # # Call the list_evaluation_datasets method. - # result = client.list_evaluation_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Ces::V1beta::EvaluationDataset. - # p item - # end - # - def list_evaluation_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest - - # Converts hash and nil to an 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_evaluation_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_datasets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_evaluation_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.list_evaluation_datasets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_datasets, "evaluation_datasets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all evaluation runs in the given app. - # - # @overload list_evaluation_runs(request, options = nil) - # Pass arguments to `list_evaluation_runs` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluation_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list evaluation runs from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the evaluation runs. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new - # - # # Call the list_evaluation_runs method. - # result = client.list_evaluation_runs 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::Ces::V1beta::EvaluationRun. - # p item - # end - # - def list_evaluation_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest - - # Converts hash and nil to an 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_evaluation_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_evaluation_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.list_evaluation_runs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_runs, "evaluation_runs", 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 evaluation expectations in the given app. - # - # @overload list_evaluation_expectations(request, options = nil) - # Pass arguments to `list_evaluation_expectations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_expectations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_evaluation_expectations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list evaluation expectations - # from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the evaluation expectations. - # See https://google.aip.dev/160 for more details. - # @param order_by [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new - # - # # Call the list_evaluation_expectations method. - # result = client.list_evaluation_expectations 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::Ces::V1beta::EvaluationExpectation. - # p item - # end - # - def list_evaluation_expectations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest - - # Converts hash and nil to an 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_evaluation_expectations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_expectations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_evaluation_expectations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.list_evaluation_expectations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_expectations, "evaluation_expectations", 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 the specified evaluation expectation. - # - # @overload get_evaluation_expectation(request, options = nil) - # Pass arguments to `get_evaluation_expectation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_expectation(name: nil) - # Pass arguments to `get_evaluation_expectation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation expectation to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new - # - # # Call the get_evaluation_expectation method. - # result = client.get_evaluation_expectation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. - # p result - # - def get_evaluation_expectation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest - - # Converts hash and nil to an 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_evaluation_expectation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_evaluation_expectation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.get_evaluation_expectation 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 an evaluation expectation. - # - # @overload create_evaluation_expectation(request, options = nil) - # Pass arguments to `create_evaluation_expectation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_expectation(parent: nil, evaluation_expectation_id: nil, evaluation_expectation: nil) - # Pass arguments to `create_evaluation_expectation` via keyword arguments. Note that at - # least one keyword argument is 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 app to create the evaluation expectation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param evaluation_expectation_id [::String] - # Optional. The ID to use for the evaluation expectation, which will become - # the final component of the evaluation expectation's resource name. If not - # provided, a unique ID will be automatically assigned for the evaluation - # expectation. - # @param evaluation_expectation [::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash] - # Required. The evaluation expectation to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new - # - # # Call the create_evaluation_expectation method. - # result = client.create_evaluation_expectation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. - # p result - # - def create_evaluation_expectation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest - - # Converts hash and nil to an 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_evaluation_expectation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_evaluation_expectation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.create_evaluation_expectation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an evaluation expectation. - # - # @overload update_evaluation_expectation(request, options = nil) - # Pass arguments to `update_evaluation_expectation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_expectation(evaluation_expectation: nil, update_mask: nil) - # Pass arguments to `update_evaluation_expectation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param evaluation_expectation [::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash] - # Required. The evaluation expectation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new - # - # # Call the update_evaluation_expectation method. - # result = client.update_evaluation_expectation request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. - # p result - # - def update_evaluation_expectation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest - - # Converts hash and nil to an 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_evaluation_expectation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_evaluation_expectation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.update_evaluation_expectation 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 an evaluation expectation. - # - # @overload delete_evaluation_expectation(request, options = nil) - # Pass arguments to `delete_evaluation_expectation` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_evaluation_expectation(name: nil, etag: nil) - # Pass arguments to `delete_evaluation_expectation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the evaluation expectation to delete. - # @param etag [::String] - # Optional. The current etag of the evaluation expectation. If an etag is not - # provided, the deletion will overwrite any concurrent changes. If an etag is - # provided and does not match the current etag of the evaluation expectation, - # deletion will be blocked and an ABORTED error will be returned. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new - # - # # Call the delete_evaluation_expectation method. - # result = client.delete_evaluation_expectation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_evaluation_expectation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest - - # Converts hash and nil to an 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_evaluation_expectation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_evaluation_expectation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_evaluation_expectation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.delete_evaluation_expectation 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 scheduled evaluation run. - # - # @overload create_scheduled_evaluation_run(request, options = nil) - # Pass arguments to `create_scheduled_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(parent: nil, scheduled_evaluation_run_id: nil, scheduled_evaluation_run: nil) - # Pass arguments to `create_scheduled_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is 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 app to create the scheduled evaluation run for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param scheduled_evaluation_run_id [::String] - # Optional. The ID to use for the scheduled evaluation run, which will become - # the final component of the scheduled evaluation run's resource name. If not - # provided, a unique ID will be automatically assigned. - # @param scheduled_evaluation_run [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash] - # Required. The scheduled evaluation run to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new - # - # # Call the create_scheduled_evaluation_run method. - # result = client.create_scheduled_evaluation_run request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. - # p result - # - def create_scheduled_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest - - # Converts hash and nil to an 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_scheduled_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_scheduled_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.create_scheduled_evaluation_run 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 the specified scheduled evaluation run. - # - # @overload get_scheduled_evaluation_run(request, options = nil) - # Pass arguments to `get_scheduled_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(name: nil) - # Pass arguments to `get_scheduled_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the scheduled evaluation run to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new - # - # # Call the get_scheduled_evaluation_run method. - # result = client.get_scheduled_evaluation_run request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. - # p result - # - def get_scheduled_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest - - # Converts hash and nil to an 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_scheduled_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_scheduled_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.get_scheduled_evaluation_run 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 scheduled evaluation runs in the given app. - # - # @overload list_scheduled_evaluation_runs(request, options = nil) - # Pass arguments to `list_scheduled_evaluation_runs` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scheduled_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_scheduled_evaluation_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to list scheduled evaluation runs - # from. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns} - # call. - # @param filter [::String] - # Optional. Filter to be applied when listing the scheduled evaluation runs. - # See https://google.aip.dev/160 for more details. - # Currently supports filtering by: - # * request.evaluations:evaluation_id - # * request.evaluation_dataset:evaluation_dataset_id - # @param order_by [::String] - # Optional. Field to sort by. Supported fields are: - # "name" (ascending), "create_time" (descending), "update_time" (descending), - # "next_scheduled_execution" (ascending), and - # "last_completed_run.create_time" (descending). - # If not included, "update_time" will be the default. - # See https://google.aip.dev/132#ordering for more details. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new - # - # # Call the list_scheduled_evaluation_runs method. - # result = client.list_scheduled_evaluation_runs 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::Ces::V1beta::ScheduledEvaluationRun. - # p item - # end - # - def list_scheduled_evaluation_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest - - # Converts hash and nil to an 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_scheduled_evaluation_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_scheduled_evaluation_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.list_scheduled_evaluation_runs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_scheduled_evaluation_runs, "scheduled_evaluation_runs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a scheduled evaluation run. - # - # @overload update_scheduled_evaluation_run(request, options = nil) - # Pass arguments to `update_scheduled_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(scheduled_evaluation_run: nil, update_mask: nil) - # Pass arguments to `update_scheduled_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param scheduled_evaluation_run [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash] - # Required. The scheduled evaluation run to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new - # - # # Call the update_scheduled_evaluation_run method. - # result = client.update_scheduled_evaluation_run request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. - # p result - # - def update_scheduled_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest - - # Converts hash and nil to an 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_scheduled_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_scheduled_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.update_scheduled_evaluation_run 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 scheduled evaluation run. - # - # @overload delete_scheduled_evaluation_run(request, options = nil) - # Pass arguments to `delete_scheduled_evaluation_run` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scheduled_evaluation_run(name: nil, etag: nil) - # Pass arguments to `delete_scheduled_evaluation_run` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the scheduled evaluation run to delete. - # @param etag [::String] - # Optional. The etag of the ScheduledEvaluationRun. - # If provided, it must match the server's etag. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new - # - # # Call the delete_scheduled_evaluation_run method. - # result = client.delete_scheduled_evaluation_run request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_scheduled_evaluation_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest - - # Converts hash and nil to an 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_scheduled_evaluation_run.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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_scheduled_evaluation_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_scheduled_evaluation_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.delete_scheduled_evaluation_run 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 - - ## - # Tests the voice of a persona. Also accepts a default persona. - # - # @overload test_persona_voice(request, options = nil) - # Pass arguments to `test_persona_voice` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_persona_voice(app: nil, persona_id: nil, text: nil) - # Pass arguments to `test_persona_voice` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param app [::String] - # Required. the resource name of the app to test the persona voice for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @param persona_id [::String] - # Required. The persona ID to test the voice for. Also accepts "default". - # @param text [::String] - # Required. The text to test the voice for. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new - # - # # Call the test_persona_voice method. - # result = client.test_persona_voice request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse. - # p result - # - def test_persona_voice request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_persona_voice.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.test_persona_voice.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_persona_voice.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.test_persona_voice request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports evaluations. - # - # @overload export_evaluations(request, options = nil) - # Pass arguments to `export_evaluations` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_evaluations(parent: nil, names: nil, export_options: nil, include_evaluation_results: nil, include_evaluations: nil) - # Pass arguments to `export_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to export evaluations from. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @param names [::Array<::String>] - # Required. The resource names of the evaluations to export. - # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] - # Optional. The export options for the evaluations. - # @param include_evaluation_results [::Boolean] - # Optional. Includes evaluation results in the export. At least one of - # include_evaluation_results or include_evaluations must be set. - # @param include_evaluations [::Boolean] - # Optional. Includes evaluations in the export. At least one of - # include_evaluation_results or include_evaluations must be set. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new - # - # # Call the export_evaluations method. - # result = client.export_evaluations request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.export_evaluations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.export_evaluations request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports evaluations runs. - # - # @overload export_evaluation_runs(request, options = nil) - # Pass arguments to `export_evaluation_runs` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_evaluation_runs(parent: nil, names: nil, export_options: nil) - # Pass arguments to `export_evaluation_runs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the app to export evaluation runs from. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @param names [::Array<::String>] - # Required. The resource names of the evaluation runs to export. - # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] - # Optional. The export options for the evaluation runs. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new - # - # # Call the export_evaluation_runs method. - # result = client.export_evaluation_runs request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluation_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_evaluation_runs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.export_evaluation_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_evaluation_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.export_evaluation_runs request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports evaluations results. - # - # @overload export_evaluation_results(request, options = nil) - # Pass arguments to `export_evaluation_results` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_evaluation_results(parent: nil, names: nil, export_options: nil) - # Pass arguments to `export_evaluation_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the evaluation to export evaluation results - # from. Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @param names [::Array<::String>] - # Required. The resource names of the evaluation results to export. - # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash] - # Optional. The export options for the evaluation results. - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new - # - # # Call the export_evaluation_results method. - # result = client.export_evaluation_results request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluation_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_evaluation_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.export_evaluation_results.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_evaluation_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.export_evaluation_results 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 - - ## - # Runs metrics on an existing evaluation result. - # - # @overload run_evaluation_result_metrics(request, options = nil) - # Pass arguments to `run_evaluation_result_metrics` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_evaluation_result_metrics(evaluation_result_id: nil) - # Pass arguments to `run_evaluation_result_metrics` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param evaluation_result_id [::String] - # Required. The evaluation result to run metrics for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}` - # @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/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new - # - # # Call the run_evaluation_result_metrics method. - # result = client.run_evaluation_result_metrics 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 run_evaluation_result_metrics request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_evaluation_result_metrics.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.run_evaluation_result_metrics.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_evaluation_result_metrics.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @evaluation_service_stub.run_evaluation_result_metrics request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the EvaluationService REST API. - # - # This class represents the configuration for EvaluationService 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::Ces::V1beta::EvaluationService::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 - # # run_evaluation to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.run_evaluation.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.run_evaluation.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 = "ces.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 EvaluationService 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 `run_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :run_evaluation - ## - # RPC-specific configuration for `upload_evaluation_audio` - # @return [::Gapic::Config::Method] - # - attr_reader :upload_evaluation_audio - ## - # RPC-specific configuration for `create_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_evaluation - ## - # RPC-specific configuration for `generate_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_evaluation - ## - # RPC-specific configuration for `import_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :import_evaluations - ## - # RPC-specific configuration for `create_evaluation_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_evaluation_dataset - ## - # RPC-specific configuration for `update_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_evaluation - ## - # RPC-specific configuration for `update_evaluation_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_evaluation_dataset - ## - # RPC-specific configuration for `delete_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation - ## - # RPC-specific configuration for `delete_evaluation_result` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation_result - ## - # RPC-specific configuration for `delete_evaluation_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation_dataset - ## - # RPC-specific configuration for `delete_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation_run - ## - # RPC-specific configuration for `get_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation - ## - # RPC-specific configuration for `get_evaluation_result` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation_result - ## - # RPC-specific configuration for `get_evaluation_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation_dataset - ## - # RPC-specific configuration for `get_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation_run - ## - # RPC-specific configuration for `list_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluations - ## - # RPC-specific configuration for `list_evaluation_results` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluation_results - ## - # RPC-specific configuration for `list_evaluation_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluation_datasets - ## - # RPC-specific configuration for `list_evaluation_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluation_runs - ## - # RPC-specific configuration for `list_evaluation_expectations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_evaluation_expectations - ## - # RPC-specific configuration for `get_evaluation_expectation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_evaluation_expectation - ## - # RPC-specific configuration for `create_evaluation_expectation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_evaluation_expectation - ## - # RPC-specific configuration for `update_evaluation_expectation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_evaluation_expectation - ## - # RPC-specific configuration for `delete_evaluation_expectation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_evaluation_expectation - ## - # RPC-specific configuration for `create_scheduled_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scheduled_evaluation_run - ## - # RPC-specific configuration for `get_scheduled_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scheduled_evaluation_run - ## - # RPC-specific configuration for `list_scheduled_evaluation_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scheduled_evaluation_runs - ## - # RPC-specific configuration for `update_scheduled_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scheduled_evaluation_run - ## - # RPC-specific configuration for `delete_scheduled_evaluation_run` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scheduled_evaluation_run - ## - # RPC-specific configuration for `test_persona_voice` - # @return [::Gapic::Config::Method] - # - attr_reader :test_persona_voice - ## - # RPC-specific configuration for `export_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluations - ## - # RPC-specific configuration for `export_evaluation_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluation_runs - ## - # RPC-specific configuration for `export_evaluation_results` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluation_results - ## - # RPC-specific configuration for `run_evaluation_result_metrics` - # @return [::Gapic::Config::Method] - # - attr_reader :run_evaluation_result_metrics - - # @private - def initialize parent_rpcs = nil - run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation - @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config - upload_evaluation_audio_config = parent_rpcs.upload_evaluation_audio if parent_rpcs.respond_to? :upload_evaluation_audio - @upload_evaluation_audio = ::Gapic::Config::Method.new upload_evaluation_audio_config - create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation - @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config - generate_evaluation_config = parent_rpcs.generate_evaluation if parent_rpcs.respond_to? :generate_evaluation - @generate_evaluation = ::Gapic::Config::Method.new generate_evaluation_config - import_evaluations_config = parent_rpcs.import_evaluations if parent_rpcs.respond_to? :import_evaluations - @import_evaluations = ::Gapic::Config::Method.new import_evaluations_config - create_evaluation_dataset_config = parent_rpcs.create_evaluation_dataset if parent_rpcs.respond_to? :create_evaluation_dataset - @create_evaluation_dataset = ::Gapic::Config::Method.new create_evaluation_dataset_config - update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation - @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config - update_evaluation_dataset_config = parent_rpcs.update_evaluation_dataset if parent_rpcs.respond_to? :update_evaluation_dataset - @update_evaluation_dataset = ::Gapic::Config::Method.new update_evaluation_dataset_config - delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation - @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config - delete_evaluation_result_config = parent_rpcs.delete_evaluation_result if parent_rpcs.respond_to? :delete_evaluation_result - @delete_evaluation_result = ::Gapic::Config::Method.new delete_evaluation_result_config - delete_evaluation_dataset_config = parent_rpcs.delete_evaluation_dataset if parent_rpcs.respond_to? :delete_evaluation_dataset - @delete_evaluation_dataset = ::Gapic::Config::Method.new delete_evaluation_dataset_config - delete_evaluation_run_config = parent_rpcs.delete_evaluation_run if parent_rpcs.respond_to? :delete_evaluation_run - @delete_evaluation_run = ::Gapic::Config::Method.new delete_evaluation_run_config - get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation - @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config - get_evaluation_result_config = parent_rpcs.get_evaluation_result if parent_rpcs.respond_to? :get_evaluation_result - @get_evaluation_result = ::Gapic::Config::Method.new get_evaluation_result_config - get_evaluation_dataset_config = parent_rpcs.get_evaluation_dataset if parent_rpcs.respond_to? :get_evaluation_dataset - @get_evaluation_dataset = ::Gapic::Config::Method.new get_evaluation_dataset_config - get_evaluation_run_config = parent_rpcs.get_evaluation_run if parent_rpcs.respond_to? :get_evaluation_run - @get_evaluation_run = ::Gapic::Config::Method.new get_evaluation_run_config - list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations - @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config - list_evaluation_results_config = parent_rpcs.list_evaluation_results if parent_rpcs.respond_to? :list_evaluation_results - @list_evaluation_results = ::Gapic::Config::Method.new list_evaluation_results_config - list_evaluation_datasets_config = parent_rpcs.list_evaluation_datasets if parent_rpcs.respond_to? :list_evaluation_datasets - @list_evaluation_datasets = ::Gapic::Config::Method.new list_evaluation_datasets_config - list_evaluation_runs_config = parent_rpcs.list_evaluation_runs if parent_rpcs.respond_to? :list_evaluation_runs - @list_evaluation_runs = ::Gapic::Config::Method.new list_evaluation_runs_config - list_evaluation_expectations_config = parent_rpcs.list_evaluation_expectations if parent_rpcs.respond_to? :list_evaluation_expectations - @list_evaluation_expectations = ::Gapic::Config::Method.new list_evaluation_expectations_config - get_evaluation_expectation_config = parent_rpcs.get_evaluation_expectation if parent_rpcs.respond_to? :get_evaluation_expectation - @get_evaluation_expectation = ::Gapic::Config::Method.new get_evaluation_expectation_config - create_evaluation_expectation_config = parent_rpcs.create_evaluation_expectation if parent_rpcs.respond_to? :create_evaluation_expectation - @create_evaluation_expectation = ::Gapic::Config::Method.new create_evaluation_expectation_config - update_evaluation_expectation_config = parent_rpcs.update_evaluation_expectation if parent_rpcs.respond_to? :update_evaluation_expectation - @update_evaluation_expectation = ::Gapic::Config::Method.new update_evaluation_expectation_config - delete_evaluation_expectation_config = parent_rpcs.delete_evaluation_expectation if parent_rpcs.respond_to? :delete_evaluation_expectation - @delete_evaluation_expectation = ::Gapic::Config::Method.new delete_evaluation_expectation_config - create_scheduled_evaluation_run_config = parent_rpcs.create_scheduled_evaluation_run if parent_rpcs.respond_to? :create_scheduled_evaluation_run - @create_scheduled_evaluation_run = ::Gapic::Config::Method.new create_scheduled_evaluation_run_config - get_scheduled_evaluation_run_config = parent_rpcs.get_scheduled_evaluation_run if parent_rpcs.respond_to? :get_scheduled_evaluation_run - @get_scheduled_evaluation_run = ::Gapic::Config::Method.new get_scheduled_evaluation_run_config - list_scheduled_evaluation_runs_config = parent_rpcs.list_scheduled_evaluation_runs if parent_rpcs.respond_to? :list_scheduled_evaluation_runs - @list_scheduled_evaluation_runs = ::Gapic::Config::Method.new list_scheduled_evaluation_runs_config - update_scheduled_evaluation_run_config = parent_rpcs.update_scheduled_evaluation_run if parent_rpcs.respond_to? :update_scheduled_evaluation_run - @update_scheduled_evaluation_run = ::Gapic::Config::Method.new update_scheduled_evaluation_run_config - delete_scheduled_evaluation_run_config = parent_rpcs.delete_scheduled_evaluation_run if parent_rpcs.respond_to? :delete_scheduled_evaluation_run - @delete_scheduled_evaluation_run = ::Gapic::Config::Method.new delete_scheduled_evaluation_run_config - test_persona_voice_config = parent_rpcs.test_persona_voice if parent_rpcs.respond_to? :test_persona_voice - @test_persona_voice = ::Gapic::Config::Method.new test_persona_voice_config - export_evaluations_config = parent_rpcs.export_evaluations if parent_rpcs.respond_to? :export_evaluations - @export_evaluations = ::Gapic::Config::Method.new export_evaluations_config - export_evaluation_runs_config = parent_rpcs.export_evaluation_runs if parent_rpcs.respond_to? :export_evaluation_runs - @export_evaluation_runs = ::Gapic::Config::Method.new export_evaluation_runs_config - export_evaluation_results_config = parent_rpcs.export_evaluation_results if parent_rpcs.respond_to? :export_evaluation_results - @export_evaluation_results = ::Gapic::Config::Method.new export_evaluation_results_config - run_evaluation_result_metrics_config = parent_rpcs.run_evaluation_result_metrics if parent_rpcs.respond_to? :run_evaluation_result_metrics - @run_evaluation_result_metrics = ::Gapic::Config::Method.new run_evaluation_result_metrics_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb deleted file mode 100644 index f163054b6d8c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Ces - module V1beta - module EvaluationService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the EvaluationService 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 EvaluationService 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::Ces::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::Ces::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::Ces::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::Ces::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 = "ces.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-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb deleted file mode 100644 index b0a19ecc1815..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb +++ /dev/null @@ -1,2233 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/evaluation_service_pb" - -module Google - module Cloud - module Ces - module V1beta - module EvaluationService - module Rest - ## - # REST service stub for the EvaluationService 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 run_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 run_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_evaluation", - 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 upload_evaluation_audio REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::UploadEvaluationAudioResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse] - # A result object deserialized from the server's reply - def upload_evaluation_audio request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_upload_evaluation_audio_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "upload_evaluation_audio", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse.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_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Evaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # A result object deserialized from the server's reply - def create_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Evaluation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the generate_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 generate_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "generate_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_evaluations REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_evaluations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_evaluations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_evaluations", - 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 create_evaluation_dataset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::EvaluationDataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # A result object deserialized from the server's reply - def create_evaluation_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_evaluation_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_evaluation_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.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_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Evaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # A result object deserialized from the server's reply - def update_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Evaluation.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_evaluation_dataset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::EvaluationDataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # A result object deserialized from the server's reply - def update_evaluation_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_evaluation_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_evaluation_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.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_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_evaluation", - 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 delete_evaluation_result REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_evaluation_result request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_result_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_result", - 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 delete_evaluation_dataset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_evaluation_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_evaluation_dataset", - 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 delete_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_evaluation_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_run_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_run", - 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_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::Evaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # A result object deserialized from the server's reply - def get_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::Evaluation.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_evaluation_result REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::EvaluationResult] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult] - # A result object deserialized from the server's reply - def get_evaluation_result request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_result_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_result", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::EvaluationResult.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_evaluation_dataset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::EvaluationDataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # A result object deserialized from the server's reply - def get_evaluation_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_evaluation_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.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_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::EvaluationRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationRun] - # A result object deserialized from the server's reply - def get_evaluation_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_run_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::EvaluationRun.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_evaluations REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListEvaluationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListEvaluationsResponse] - # A result object deserialized from the server's reply - def list_evaluations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_evaluations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListEvaluationsResponse.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_evaluation_results REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListEvaluationResultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse] - # A result object deserialized from the server's reply - def list_evaluation_results request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluation_results_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_results", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse.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_evaluation_datasets REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListEvaluationDatasetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse] - # A result object deserialized from the server's reply - def list_evaluation_datasets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluation_datasets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_evaluation_datasets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse.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_evaluation_runs REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListEvaluationRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse] - # A result object deserialized from the server's reply - def list_evaluation_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluation_runs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse.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_evaluation_expectations REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListEvaluationExpectationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse] - # A result object deserialized from the server's reply - def list_evaluation_expectations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_evaluation_expectations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_expectations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse.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_evaluation_expectation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::EvaluationExpectation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # A result object deserialized from the server's reply - def get_evaluation_expectation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_evaluation_expectation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_expectation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.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_evaluation_expectation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::EvaluationExpectation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # A result object deserialized from the server's reply - def create_evaluation_expectation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_evaluation_expectation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_expectation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.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_evaluation_expectation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::EvaluationExpectation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # A result object deserialized from the server's reply - def update_evaluation_expectation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_evaluation_expectation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_expectation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.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_evaluation_expectation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_evaluation_expectation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_evaluation_expectation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_evaluation_expectation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_scheduled_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ScheduledEvaluationRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # A result object deserialized from the server's reply - def create_scheduled_evaluation_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_scheduled_evaluation_run_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_scheduled_evaluation_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.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_scheduled_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ScheduledEvaluationRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # A result object deserialized from the server's reply - def get_scheduled_evaluation_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_scheduled_evaluation_run_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_scheduled_evaluation_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.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_scheduled_evaluation_runs REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ListScheduledEvaluationRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse] - # A result object deserialized from the server's reply - def list_scheduled_evaluation_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_scheduled_evaluation_runs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_scheduled_evaluation_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse.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_scheduled_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ScheduledEvaluationRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # A result object deserialized from the server's reply - def update_scheduled_evaluation_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_scheduled_evaluation_run_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_scheduled_evaluation_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.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_scheduled_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_scheduled_evaluation_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_scheduled_evaluation_run_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_scheduled_evaluation_run", - 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 test_persona_voice REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::TestPersonaVoiceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse] - # A result object deserialized from the server's reply - def test_persona_voice request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_persona_voice_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_persona_voice", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_evaluations REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_evaluations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_evaluations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_evaluation_runs REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_evaluation_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluation_runs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_evaluation_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_evaluation_results REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_evaluation_results request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluation_results_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_evaluation_results", - 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 run_evaluation_result_metrics REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 run_evaluation_result_metrics request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_evaluation_result_metrics_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_evaluation_result_metrics", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the run_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{app}:runEvaluation", - body: "*", - matches: [ - ["app", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the upload_evaluation_audio REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_upload_evaluation_audio_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:uploadEvaluationAudio", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationRequest] - # 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_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/evaluations", - body: "evaluation", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_generate_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{conversation}:generateEvaluation", - body: "*", - matches: [ - ["conversation", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/conversations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_evaluations REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_evaluations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}:importEvaluations", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_evaluation_dataset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest] - # 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_evaluation_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/evaluationDatasets", - body: "evaluation_dataset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest] - # 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_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{evaluation.name}", - body: "evaluation", - matches: [ - ["evaluation.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_evaluation_dataset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest] - # 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_evaluation_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{evaluation_dataset.name}", - body: "evaluation_dataset", - matches: [ - ["evaluation_dataset.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationDatasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest] - # 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_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_evaluation_result REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest] - # 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_evaluation_result_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/results/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_evaluation_dataset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest] - # 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_evaluation_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationDatasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest] - # 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_evaluation_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_evaluation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationRequest] - # 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_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_evaluation_result REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest] - # 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_evaluation_result_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/results/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_evaluation_dataset REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest] - # 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_evaluation_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationDatasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest] - # 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_evaluation_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_evaluations REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationsRequest] - # 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_evaluations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/evaluations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_evaluation_results REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest] - # 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_evaluation_results_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/results", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_evaluation_datasets REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest] - # 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_evaluation_datasets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/evaluationDatasets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_evaluation_runs REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest] - # 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_evaluation_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/evaluationRuns", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_evaluation_expectations REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest] - # 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_evaluation_expectations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/evaluationExpectations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_evaluation_expectation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest] - # 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_evaluation_expectation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationExpectations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_evaluation_expectation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest] - # 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_evaluation_expectation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/evaluationExpectations", - body: "evaluation_expectation", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_evaluation_expectation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest] - # 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_evaluation_expectation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{evaluation_expectation.name}", - body: "evaluation_expectation", - matches: [ - ["evaluation_expectation.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationExpectations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_evaluation_expectation REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest] - # 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_evaluation_expectation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluationExpectations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_scheduled_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest] - # 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_scheduled_evaluation_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/scheduledEvaluationRuns", - body: "scheduled_evaluation_run", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_scheduled_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest] - # 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_scheduled_evaluation_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/scheduledEvaluationRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_scheduled_evaluation_runs REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest] - # 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_scheduled_evaluation_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/scheduledEvaluationRuns", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_scheduled_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest] - # 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_scheduled_evaluation_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{scheduled_evaluation_run.name}", - body: "scheduled_evaluation_run", - matches: [ - ["scheduled_evaluation_run.name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/scheduledEvaluationRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_scheduled_evaluation_run REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest] - # 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_scheduled_evaluation_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/scheduledEvaluationRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_persona_voice REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_persona_voice_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{app}:testPersonaVoice", - body: "*", - matches: [ - ["app", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_evaluations REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_evaluations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/evaluations:export", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_evaluation_runs REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_evaluation_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/evaluationRuns:export", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_evaluation_results REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_evaluation_results_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/results:export", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_evaluation_result_metrics REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_evaluation_result_metrics_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{evaluation_result_id}:runEvaluationResultMetrics", - body: "*", - matches: [ - ["evaluation_result_id", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/results/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb deleted file mode 100644 index de69e9e840e7..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb +++ /dev/null @@ -1,93 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/evaluation_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/ces/v1beta/agent_service_pb' -require 'google/cloud/ces/v1beta/conversation_pb' -require 'google/cloud/ces/v1beta/evaluation_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/ces/v1beta/evaluation_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/ces/v1beta/agent_service.proto\x1a*google/cloud/ces/v1beta/conversation.proto\x1a(google/cloud/ces/v1beta/evaluation.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"n\n!RunEvaluationResultMetricsRequest\x12I\n\x14\x65valuation_result_id\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\"l\n\"RunEvaluationResultMetricsResponse\x12\x46\n\x06status\x18\x01 \x01(\x0e\x32\x31.google.cloud.ces.v1beta.EvaluationResult.OutcomeB\x03\xe0\x41\x03\"V\n\x15RunEvaluationResponse\x12=\n\x0e\x65valuation_run\x18\x01 \x01(\tB%\xfa\x41\"\n ces.googleapis.com/EvaluationRun\"\xb9\x02\n\x1eRunEvaluationOperationMetadata\x12:\n\x0b\x65valuations\x18\x01 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12@\n\x0e\x65valuation_run\x18\x02 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\"%\n#GenerateEvaluationOperationMetadata\"&\n$DeleteEvaluationRunOperationMetadata\"\xa3\x01\n\x17\x43reateEvaluationRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x1a\n\revaluation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12<\n\nevaluation\x18\x03 \x01(\x0b\x32#.google.cloud.ces.v1beta.EvaluationB\x03\xe0\x41\x02\"\x9f\x01\n\x19GenerateEvaluationRequest\x12=\n\x0c\x63onversation\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63\x65s.googleapis.com/Conversation\x12\x43\n\x06source\x18\x02 \x01(\x0e\x32,.google.cloud.ces.v1beta.Conversation.SourceB\x05\x18\x01\xe0\x41\x01\"\xfb\x04\n\x18ImportEvaluationsRequest\x12_\n\x11\x63onversation_list\x18\x02 \x01(\x0b\x32\x42.google.cloud.ces.v1beta.ImportEvaluationsRequest.ConversationListH\x00\x12\x11\n\x07gcs_uri\x18\x03 \x01(\tH\x00\x12\x15\n\x0b\x63sv_content\x18\x04 \x01(\x0cH\x00\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\\\n\x0eimport_options\x18\x05 \x01(\x0b\x32?.google.cloud.ces.v1beta.ImportEvaluationsRequest.ImportOptionsB\x03\xe0\x41\x01\x1a.\n\x10\x43onversationList\x12\x1a\n\rconversations\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\x8b\x02\n\rImportOptions\x12\x85\x01\n\x1c\x63onflict_resolution_strategy\x18\x01 \x01(\x0e\x32Z.google.cloud.ces.v1beta.ImportEvaluationsRequest.ImportOptions.ConflictResolutionStrategyB\x03\xe0\x41\x01\"r\n\x1a\x43onflictResolutionStrategy\x12,\n(CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED\x10\x00\x12\r\n\tOVERWRITE\x10\x01\x12\x08\n\x04SKIP\x10\x02\x12\r\n\tDUPLICATE\x10\x03\x42\x08\n\x06source\"\xf5\x02\n\x19ImportEvaluationsResponse\x12\x38\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x12\x45\n\x12\x65valuation_results\x18\x04 \x03(\x0b\x32).google.cloud.ces.v1beta.EvaluationResult\x12?\n\x0f\x65valuation_runs\x18\x05 \x03(\x0b\x32&.google.cloud.ces.v1beta.EvaluationRun\x12\x1b\n\x0e\x65rror_messages\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x14import_failure_count\x18\x03 \x01(\x05\x12.\n&evaluation_result_import_failure_count\x18\x06 \x01(\x05\x12+\n#evaluation_run_import_failure_count\x18\x07 \x01(\x05\"\xaa\x01\n\"ImportEvaluationsOperationMetadata\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\x1b\n\x0estatus_message\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc1\x01\n\x1e\x43reateEvaluationDatasetRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\"\n\x15\x65valuation_dataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\x12\x65valuation_dataset\x18\x03 \x01(\x0b\x32*.google.cloud.ces.v1beta.EvaluationDatasetB\x03\xe0\x41\x02\"\x8d\x01\n\x17UpdateEvaluationRequest\x12<\n\nevaluation\x18\x01 \x01(\x0b\x32#.google.cloud.ces.v1beta.EvaluationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xa3\x01\n\x1eUpdateEvaluationDatasetRequest\x12K\n\x12\x65valuation_dataset\x18\x01 \x01(\x0b\x32*.google.cloud.ces.v1beta.EvaluationDatasetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"u\n\x17\x44\x65leteEvaluationRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Z\n\x1d\x44\x65leteEvaluationResultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\"o\n\x1e\x44\x65leteEvaluationDatasetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"T\n\x1a\x44\x65leteEvaluationRunRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\"K\n\x14GetEvaluationRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\"W\n\x1aGetEvaluationResultRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\"Y\n\x1bGetEvaluationDatasetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$ces.googleapis.com/EvaluationDataset\"Q\n\x17GetEvaluationRunRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\"\x91\x02\n\x16ListEvaluationsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63\x65s.googleapis.com/Evaluation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x06\x66ilter\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01\x12\x1e\n\x11\x65valuation_filter\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15\x65valuation_run_filter\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10last_ten_results\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xb8\x01\n\x1cListEvaluationResultsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#ces.googleapis.com/EvaluationResult\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\"\xba\x01\n\x1dListEvaluationDatasetsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$ces.googleapis.com/EvaluationDataset\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\"\xb2\x01\n\x19ListEvaluationRunsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 ces.googleapis.com/EvaluationRun\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\"l\n\x17ListEvaluationsResponse\x12\x38\n\x0b\x65valuations\x18\x01 \x03(\x0b\x32#.google.cloud.ces.v1beta.Evaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x7f\n\x1dListEvaluationResultsResponse\x12\x45\n\x12\x65valuation_results\x18\x01 \x03(\x0b\x32).google.cloud.ces.v1beta.EvaluationResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x01\n\x1eListEvaluationDatasetsResponse\x12G\n\x13\x65valuation_datasets\x18\x01 \x03(\x0b\x32*.google.cloud.ces.v1beta.EvaluationDataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"v\n\x1aListEvaluationRunsResponse\x12?\n\x0f\x65valuation_runs\x18\x01 \x03(\x0b\x32&.google.cloud.ces.v1beta.EvaluationRun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd7\x01\n#CreateScheduledEvaluationRunRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12(\n\x1bscheduled_evaluation_run_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12V\n\x18scheduled_evaluation_run\x18\x03 \x01(\x0b\x32/.google.cloud.ces.v1beta.ScheduledEvaluationRunB\x03\xe0\x41\x02\"c\n GetScheduledEvaluationRunRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\"\xc4\x01\n\"ListScheduledEvaluationRunsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)ces.googleapis.com/ScheduledEvaluationRun\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\"\x92\x01\n#ListScheduledEvaluationRunsResponse\x12R\n\x19scheduled_evaluation_runs\x18\x01 \x03(\x0b\x32/.google.cloud.ces.v1beta.ScheduledEvaluationRun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb3\x01\n#UpdateScheduledEvaluationRunRequest\x12V\n\x18scheduled_evaluation_run\x18\x01 \x01(\x0b\x32/.google.cloud.ces.v1beta.ScheduledEvaluationRunB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"y\n#DeleteScheduledEvaluationRunRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)ces.googleapis.com/ScheduledEvaluationRun\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n\x17TestPersonaVoiceRequest\x12+\n\x03\x61pp\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x17\n\npersona_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04text\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1cUploadEvaluationAudioRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x1a\n\raudio_content\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12#\n\x16previous_audio_gcs_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x1dUploadEvaluationAudioResponse\x12\x15\n\raudio_gcs_uri\x18\x01 \x01(\t\x12\x12\n\ntranscript\x18\x02 \x01(\t\x12+\n\x08\x64uration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\")\n\x18TestPersonaVoiceResponse\x12\r\n\x05\x61udio\x18\x01 \x01(\x0c\"\xd1\x01\n\"CreateEvaluationExpectationRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12&\n\x19\x65valuation_expectation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12S\n\x16\x65valuation_expectation\x18\x03 \x01(\x0b\x32..google.cloud.ces.v1beta.EvaluationExpectationB\x03\xe0\x41\x02\"\xaf\x01\n\"UpdateEvaluationExpectationRequest\x12S\n\x16\x65valuation_expectation\x18\x01 \x01(\x0b\x32..google.cloud.ces.v1beta.EvaluationExpectationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"w\n\"DeleteEvaluationExpectationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"a\n\x1fGetEvaluationExpectationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(ces.googleapis.com/EvaluationExpectation\"\xc2\x01\n!ListEvaluationExpectationsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(ces.googleapis.com/EvaluationExpectation\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\"\x8e\x01\n\"ListEvaluationExpectationsResponse\x12O\n\x17\x65valuation_expectations\x18\x01 \x03(\x0b\x32..google.cloud.ces.v1beta.EvaluationExpectation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb9\x01\n\rExportOptions\x12O\n\rexport_format\x18\x01 \x01(\x0e\x32\x33.google.cloud.ces.v1beta.ExportOptions.ExportFormatB\x03\xe0\x41\x01\x12\x14\n\x07gcs_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\"A\n\x0c\x45xportFormat\x12\x1d\n\x19\x45XPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x08\n\x04YAML\x10\x02\"\x90\x02\n\x18\x45xportEvaluationsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x34\n\x05names\x18\x02 \x03(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12\x43\n\x0e\x65xport_options\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ExportOptionsB\x03\xe0\x41\x01\x12\'\n\x1ainclude_evaluation_results\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13include_evaluations\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x02\n\x19\x45xportEvaluationsResponse\x12\x1d\n\x13\x65valuations_content\x18\x01 \x01(\x0cH\x00\x12\x19\n\x0f\x65valuations_uri\x18\x02 \x01(\tH\x00\x12j\n\x12\x66\x61iled_evaluations\x18\x03 \x03(\x0b\x32I.google.cloud.ces.v1beta.ExportEvaluationsResponse.FailedEvaluationsEntryB\x03\xe0\x41\x03\x1a\x38\n\x16\x46\x61iledEvaluationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x65valuations\"\xd8\x01\n\x1e\x45xportEvaluationResultsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Evaluation\x12:\n\x05names\x18\x02 \x03(\tB+\xe0\x41\x02\xfa\x41%\n#ces.googleapis.com/EvaluationResult\x12\x43\n\x0e\x65xport_options\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ExportOptionsB\x03\xe0\x41\x01\"\x7f\n\x1f\x45xportEvaluationResultsResponse\x12$\n\x1a\x65valuation_results_content\x18\x01 \x01(\x0cH\x00\x12 \n\x16\x65valuation_results_uri\x18\x02 \x01(\tH\x00\x42\x14\n\x12\x65valuation_results\"\xcb\x01\n\x1b\x45xportEvaluationRunsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12\x37\n\x05names\x18\x02 \x03(\tB(\xe0\x41\x02\xfa\x41\"\n ces.googleapis.com/EvaluationRun\x12\x43\n\x0e\x65xport_options\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ExportOptionsB\x03\xe0\x41\x01\"s\n\x1c\x45xportEvaluationRunsResponse\x12!\n\x17\x65valuation_runs_content\x18\x01 \x01(\x0cH\x00\x12\x1d\n\x13\x65valuation_runs_uri\x18\x02 \x01(\tH\x00\x42\x11\n\x0f\x65valuation_runs\"\'\n%ExportEvaluationRunsOperationMetadata\"*\n(ExportEvaluationResultsOperationMetadata\"-\n+RunEvaluationResultMetricsOperationMetadata2\xb9\x43\n\x11\x45valuationService\x12\xe4\x01\n\rRunEvaluation\x12-.google.cloud.ces.v1beta.RunEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\x37\n\x15RunEvaluationResponse\x12\x1eRunEvaluationOperationMetadata\xda\x41\x03\x61pp\x82\xd3\xe4\x93\x02>\"9/v1beta/{app=projects/*/locations/*/apps/*}:runEvaluation:\x01*\x12\xf8\x01\n\x15UploadEvaluationAudio\x12\x35.google.cloud.ces.v1beta.UploadEvaluationAudioRequest\x1a\x36.google.cloud.ces.v1beta.UploadEvaluationAudioResponse\"p\xda\x41\x12name,audio_content\x82\xd3\xe4\x93\x02U\"P/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}:uploadEvaluationAudio:\x01*\x12\xf0\x01\n\x10\x43reateEvaluation\x12\x30.google.cloud.ces.v1beta.CreateEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"\x84\x01\xda\x41\x1fparent,evaluation,evaluation_id\xda\x41\x11parent,evaluation\x82\xd3\xe4\x93\x02H\":/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations:\nevaluation\x12\x8f\x02\n\x12GenerateEvaluation\x12\x32.google.cloud.ces.v1beta.GenerateEvaluationRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41\x31\n\nEvaluation\x12#GenerateEvaluationOperationMetadata\xda\x41\x0c\x63onversation\x82\xd3\xe4\x93\x02\\\"W/v1beta/{conversation=projects/*/locations/*/apps/*/conversations/*}:generateEvaluation:\x01*\x12\xfe\x01\n\x11ImportEvaluations\x12\x31.google.cloud.ces.v1beta.ImportEvaluationsRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41?\n\x19ImportEvaluationsResponse\x12\"ImportEvaluationsOperationMetadata\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\"@/v1beta/{parent=projects/*/locations/*/apps/*}:importEvaluations:\x01*\x12\xac\x02\n\x17\x43reateEvaluationDataset\x12\x37.google.cloud.ces.v1beta.CreateEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"\xab\x01\xda\x41/parent,evaluation_dataset,evaluation_dataset_id\xda\x41\x19parent,evaluation_dataset\x82\xd3\xe4\x93\x02W\"A/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationDatasets:\x12\x65valuation_dataset\x12\xdd\x01\n\x10UpdateEvaluation\x12\x30.google.cloud.ces.v1beta.UpdateEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"r\xda\x41\x16\x65valuation,update_mask\x82\xd3\xe4\x93\x02S2E/v1beta/{evaluation.name=projects/*/locations/*/apps/*/evaluations/*}:\nevaluation\x12\x92\x02\n\x17UpdateEvaluationDataset\x12\x37.google.cloud.ces.v1beta.UpdateEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"\x91\x01\xda\x41\x1e\x65valuation_dataset,update_mask\x82\xd3\xe4\x93\x02j2T/v1beta/{evaluation_dataset.name=projects/*/locations/*/apps/*/evaluationDatasets/*}:\x12\x65valuation_dataset\x12\xa7\x01\n\x10\x44\x65leteEvaluation\x12\x30.google.cloud.ces.v1beta.DeleteEvaluationRequest\x1a\x16.google.protobuf.Empty\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}\x12\xbd\x01\n\x16\x44\x65leteEvaluationResult\x12\x36.google.cloud.ces.v1beta.DeleteEvaluationResultRequest\x1a\x16.google.protobuf.Empty\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*/results/*}\x12\xbc\x01\n\x17\x44\x65leteEvaluationDataset\x12\x37.google.cloud.ces.v1beta.DeleteEvaluationDatasetRequest\x1a\x16.google.protobuf.Empty\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43*A/v1beta/{name=projects/*/locations/*/apps/*/evaluationDatasets/*}\x12\xf8\x01\n\x13\x44\x65leteEvaluationRun\x12\x33.google.cloud.ces.v1beta.DeleteEvaluationRunRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41=\n\x15google.protobuf.Empty\x12$DeleteEvaluationRunOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1beta/{name=projects/*/locations/*/apps/*/evaluationRuns/*}\x12\xae\x01\n\rGetEvaluation\x12-.google.cloud.ces.v1beta.GetEvaluationRequest\x1a#.google.cloud.ces.v1beta.Evaluation\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}\x12\xca\x01\n\x13GetEvaluationResult\x12\x33.google.cloud.ces.v1beta.GetEvaluationResultRequest\x1a).google.cloud.ces.v1beta.EvaluationResult\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*/results/*}\x12\xca\x01\n\x14GetEvaluationDataset\x12\x34.google.cloud.ces.v1beta.GetEvaluationDatasetRequest\x1a*.google.cloud.ces.v1beta.EvaluationDataset\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta/{name=projects/*/locations/*/apps/*/evaluationDatasets/*}\x12\xba\x01\n\x10GetEvaluationRun\x12\x30.google.cloud.ces.v1beta.GetEvaluationRunRequest\x1a&.google.cloud.ces.v1beta.EvaluationRun\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1beta/{name=projects/*/locations/*/apps/*/evaluationRuns/*}\x12\xc1\x01\n\x0fListEvaluations\x12/.google.cloud.ces.v1beta.ListEvaluationsRequest\x1a\x30.google.cloud.ces.v1beta.ListEvaluationsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations\x12\xdd\x01\n\x15ListEvaluationResults\x12\x35.google.cloud.ces.v1beta.ListEvaluationResultsRequest\x1a\x36.google.cloud.ces.v1beta.ListEvaluationResultsResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1beta/{parent=projects/*/locations/*/apps/*/evaluations/*}/results\x12\xdd\x01\n\x16ListEvaluationDatasets\x12\x36.google.cloud.ces.v1beta.ListEvaluationDatasetsRequest\x1a\x37.google.cloud.ces.v1beta.ListEvaluationDatasetsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationDatasets\x12\xcd\x01\n\x12ListEvaluationRuns\x12\x32.google.cloud.ces.v1beta.ListEvaluationRunsRequest\x1a\x33.google.cloud.ces.v1beta.ListEvaluationRunsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationRuns\x12\xed\x01\n\x1aListEvaluationExpectations\x12:.google.cloud.ces.v1beta.ListEvaluationExpectationsRequest\x1a;.google.cloud.ces.v1beta.ListEvaluationExpectationsResponse\"V\xda\x41\x06parent\x82\xd3\xe4\x93\x02G\x12\x45/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationExpectations\x12\xda\x01\n\x18GetEvaluationExpectation\x12\x38.google.cloud.ces.v1beta.GetEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1beta/{name=projects/*/locations/*/apps/*/evaluationExpectations/*}\x12\xcc\x02\n\x1b\x43reateEvaluationExpectation\x12;.google.cloud.ces.v1beta.CreateEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"\xbf\x01\xda\x41\x37parent,evaluation_expectation,evaluation_expectation_id\xda\x41\x1dparent,evaluation_expectation\x82\xd3\xe4\x93\x02_\"E/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationExpectations:\x16\x65valuation_expectation\x12\xae\x02\n\x1bUpdateEvaluationExpectation\x12;.google.cloud.ces.v1beta.UpdateEvaluationExpectationRequest\x1a..google.cloud.ces.v1beta.EvaluationExpectation\"\xa1\x01\xda\x41\"evaluation_expectation,update_mask\x82\xd3\xe4\x93\x02v2\\/v1beta/{evaluation_expectation.name=projects/*/locations/*/apps/*/evaluationExpectations/*}:\x16\x65valuation_expectation\x12\xc8\x01\n\x1b\x44\x65leteEvaluationExpectation\x12;.google.cloud.ces.v1beta.DeleteEvaluationExpectationRequest\x1a\x16.google.protobuf.Empty\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G*E/v1beta/{name=projects/*/locations/*/apps/*/evaluationExpectations/*}\x12\xd8\x02\n\x1c\x43reateScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.CreateScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"\xc8\x01\xda\x41;parent,scheduled_evaluation_run,scheduled_evaluation_run_id\xda\x41\x1fparent,scheduled_evaluation_run\x82\xd3\xe4\x93\x02\x62\"F/v1beta/{parent=projects/*/locations/*/apps/*}/scheduledEvaluationRuns:\x18scheduled_evaluation_run\x12\xde\x01\n\x19GetScheduledEvaluationRun\x12\x39.google.cloud.ces.v1beta.GetScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1beta/{name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}\x12\xf1\x01\n\x1bListScheduledEvaluationRuns\x12;.google.cloud.ces.v1beta.ListScheduledEvaluationRunsRequest\x1a<.google.cloud.ces.v1beta.ListScheduledEvaluationRunsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1beta/{parent=projects/*/locations/*/apps/*}/scheduledEvaluationRuns\x12\xb8\x02\n\x1cUpdateScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.UpdateScheduledEvaluationRunRequest\x1a/.google.cloud.ces.v1beta.ScheduledEvaluationRun\"\xa8\x01\xda\x41$scheduled_evaluation_run,update_mask\x82\xd3\xe4\x93\x02{2_/v1beta/{scheduled_evaluation_run.name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}:\x18scheduled_evaluation_run\x12\xcb\x01\n\x1c\x44\x65leteScheduledEvaluationRun\x12<.google.cloud.ces.v1beta.DeleteScheduledEvaluationRunRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1beta/{name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}\x12\xc6\x01\n\x10TestPersonaVoice\x12\x30.google.cloud.ces.v1beta.TestPersonaVoiceRequest\x1a\x31.google.cloud.ces.v1beta.TestPersonaVoiceResponse\"M\xda\x41\x03\x61pp\x82\xd3\xe4\x93\x02\x41\"] - # Required. Inputs for the session. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::RunSessionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::RunSessionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::SessionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RunSessionRequest.new - # - # # Call the run_session method. - # result = client.run_session request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::RunSessionResponse. - # p result - # - def run_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.config&.session - header_params["config.session"] = request.config.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @session_service_stub.call_rpc :run_session, 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 - - ## - # Initiates a single-turn interaction with the CES agent. Uses server-side - # streaming to deliver incremental results and partial responses as they are - # generated. - # - # By default, complete responses (e.g., messages from callbacks or full LLM - # responses) are sent to the client as soon as they are available. To enable - # streaming individual text chunks directly from the model, set - # {::Google::Cloud::Ces::V1beta::SessionConfig#enable_text_streaming enable_text_streaming} - # to true. - # - # @overload stream_run_session(request, options = nil) - # Pass arguments to `stream_run_session` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RunSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RunSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload stream_run_session(config: nil, inputs: nil) - # Pass arguments to `stream_run_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Ces::V1beta::SessionConfig, ::Hash] - # Required. The configuration for the session. - # @param inputs [::Array<::Google::Cloud::Ces::V1beta::SessionInput, ::Hash>] - # Required. Inputs for the session. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Ces::V1beta::RunSessionResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Ces::V1beta::RunSessionResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::SessionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RunSessionRequest.new - # - # # Call the stream_run_session method to start streaming. - # output = client.stream_run_session request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Ces::V1beta::RunSessionResponse - # output.each do |current_response| - # p current_response - # end - # - def stream_run_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.stream_run_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.config&.session - header_params["config.session"] = request.config.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.stream_run_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.stream_run_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @session_service_stub.call_rpc :stream_run_session, 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 - - ## - # Establishes a bidirectional streaming connection with the CES agent. - # The agent processes continuous multimodal inputs (e.g., text, audio) and - # generates real-time multimodal output streams. - # - # --- Client Request Stream --- - # The client streams requests in the following order: - # - # 1. Initialization: - # The first message must contain - # {::Google::Cloud::Ces::V1beta::BidiSessionClientMessage#config SessionConfig}. - # For audio sessions, this should also include - # {::Google::Cloud::Ces::V1beta::SessionConfig#input_audio_config InputAudioConfig} - # and - # {::Google::Cloud::Ces::V1beta::SessionConfig#output_audio_config OutputAudioConfig} - # to define audio processing and synthesis parameters. - # - # 2. Interaction: - # Subsequent messages stream - # {::Google::Cloud::Ces::V1beta::BidiSessionClientMessage#realtime_input SessionInput} - # containing real-time user input data. - # - # 3. Termination: - # The client should half-close the stream when there is no more user - # input. It should also half-close upon receiving - # {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#end_session EndSession} - # or {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#go_away GoAway} - # from the agent. - # - # --- Server Response Stream --- - # For each interaction turn, the agent streams messages in the following - # sequence: - # - # 1. Speech Recognition (First N messages): - # Contains - # {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#recognition_result RecognitionResult} - # representing the concatenated user speech segments captured so far. - # This is only populated for audio sessions. - # - # 2. Response (Next M messages): - # Contains - # {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#session_output SessionOutput} - # delivering the agent's response in various modalities (e.g., text, - # audio). - # - # 3. Turn Completion (Final message of the turn): - # Contains - # {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#session_output SessionOutput} - # with - # {::Google::Cloud::Ces::V1beta::SessionOutput#turn_completed turn_completed} - # set to true. This signals the end of the current turn and includes - # {::Google::Cloud::Ces::V1beta::SessionOutput#diagnostic_info DiagnosticInfo} - # with execution details. - # - # --- Audio Best Practices --- - # 1. Streaming: - # Stream {::Google::Cloud::Ces::V1beta::SessionInput#audio audio data} - # **CONTINUOUSLY**, even during silence. Recommended chunk size: 40-120ms - # (balances latency vs. efficiency). - # - # 2. Playback & Interruption: - # Play {::Google::Cloud::Ces::V1beta::SessionOutput#audio audio responses} - # upon receipt. Stop playback immediately if an - # {::Google::Cloud::Ces::V1beta::BidiSessionServerMessage#interruption_signal InterruptionSignal} - # is received (e.g., user barge-in or new agent response). - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Ces::V1beta::BidiSessionClientMessage, ::Hash>] - # An enumerable of {::Google::Cloud::Ces::V1beta::BidiSessionClientMessage} instances. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Ces::V1beta::BidiSessionServerMessage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Ces::V1beta::BidiSessionServerMessage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::SessionService::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the bidi_run_session method to start streaming. - # output = client.bidi_run_session input - # - # # Send requests on the stream. For each request object, set fields by - # # passing keyword arguments. Be sure to close the stream when done. - # input << Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new - # input << Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage - # output.each do |current_response| - # p current_response - # end - # - def bidi_run_session request, options = nil - unless request.is_a? ::Enumerable - raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum - request = request.to_enum - end - - request = request.lazy.map do |req| - ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage - end - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.bidi_run_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.bidi_run_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bidi_run_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @session_service_stub.call_rpc :bidi_run_session, 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 SessionService API. - # - # This class represents the configuration for SessionService, - # 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::Ces::V1beta::SessionService::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 - # # run_session to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Ces::V1beta::SessionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.run_session.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.run_session.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::Ces::V1beta::SessionService::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 = "ces.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 SessionService 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 `run_session` - # @return [::Gapic::Config::Method] - # - attr_reader :run_session - ## - # RPC-specific configuration for `stream_run_session` - # @return [::Gapic::Config::Method] - # - attr_reader :stream_run_session - ## - # RPC-specific configuration for `bidi_run_session` - # @return [::Gapic::Config::Method] - # - attr_reader :bidi_run_session - - # @private - def initialize parent_rpcs = nil - run_session_config = parent_rpcs.run_session if parent_rpcs.respond_to? :run_session - @run_session = ::Gapic::Config::Method.new run_session_config - stream_run_session_config = parent_rpcs.stream_run_session if parent_rpcs.respond_to? :stream_run_session - @stream_run_session = ::Gapic::Config::Method.new stream_run_session_config - bidi_run_session_config = parent_rpcs.bidi_run_session if parent_rpcs.respond_to? :bidi_run_session - @bidi_run_session = ::Gapic::Config::Method.new bidi_run_session_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/credentials.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/credentials.rb deleted file mode 100644 index a1e0cd401764..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/credentials.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Ces - module V1beta - module SessionService - # Credentials for the SessionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/ces", - "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-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/paths.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/paths.rb deleted file mode 100644 index a3412c56e02d..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/paths.rb +++ /dev/null @@ -1,117 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - module SessionService - # Path helper methods for the SessionService API. - module Paths - ## - # Create a fully-qualified Agent resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param agent [String] - # - # @return [::String] - def agent_path project:, location:, app:, agent: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/agents/#{agent}" - end - - ## - # Create a fully-qualified Session resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/sessions/{session}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param session [String] - # - # @return [::String] - def session_path project:, location:, app:, session: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/sessions/#{session}" - end - - ## - # Create a fully-qualified Tool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param tool [String] - # - # @return [::String] - def tool_path project:, location:, app:, tool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/tools/#{tool}" - end - - ## - # Create a fully-qualified Toolset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param toolset [String] - # - # @return [::String] - def toolset_path project:, location:, app:, toolset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/toolsets/#{toolset}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest.rb deleted file mode 100644 index ad0b096fe0c9..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/ces/v1beta/version" -require "google/cloud/ces/v1beta/bindings_override" - -require "google/cloud/ces/v1beta/session_service/credentials" -require "google/cloud/ces/v1beta/session_service/paths" -require "google/cloud/ces/v1beta/session_service/rest/client" - -module Google - module Cloud - module Ces - module V1beta - ## - # Session service provides APIs for interacting with CES agents. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/ces/v1beta/session_service/rest" - # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new - # - module SessionService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/ces/v1beta/session_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/client.rb deleted file mode 100644 index 408f9bd8146e..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/client.rb +++ /dev/null @@ -1,560 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/session_service_pb" -require "google/cloud/ces/v1beta/session_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Ces - module V1beta - module SessionService - module Rest - ## - # REST client for the SessionService service. - # - # Session service provides APIs for interacting with CES agents. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :session_service_stub - - ## - # Configure the SessionService Client class. - # - # See {::Google::Cloud::Ces::V1beta::SessionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SessionService clients - # ::Google::Cloud::Ces::V1beta::SessionService::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", "Ces", "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 = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_session.timeout = 220.0 - default_config.rpcs.run_session.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SessionService 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::Ces::V1beta::SessionService::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 - @session_service_stub.universe_domain - end - - ## - # Create a new SessionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SessionService 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 - - @session_service_stub = ::Google::Cloud::Ces::V1beta::SessionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @session_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 = @session_service_stub.endpoint - config.universe_domain = @session_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @session_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 - @session_service_stub.logger - end - - # Service calls - - ## - # Initiates a single-turn interaction with the CES agent within a session. - # - # @overload run_session(request, options = nil) - # Pass arguments to `run_session` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RunSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RunSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_session(config: nil, inputs: nil) - # Pass arguments to `run_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Ces::V1beta::SessionConfig, ::Hash] - # Required. The configuration for the session. - # @param inputs [::Array<::Google::Cloud::Ces::V1beta::SessionInput, ::Hash>] - # Required. Inputs for the session. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::RunSessionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::RunSessionResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RunSessionRequest.new - # - # # Call the run_session method. - # result = client.run_session request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::RunSessionResponse. - # p result - # - def run_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.run_session.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @session_service_stub.run_session 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 - - ## - # Initiates a single-turn interaction with the CES agent. Uses server-side - # streaming to deliver incremental results and partial responses as they are - # generated. - # - # By default, complete responses (e.g., messages from callbacks or full LLM - # responses) are sent to the client as soon as they are available. To enable - # streaming individual text chunks directly from the model, set - # {::Google::Cloud::Ces::V1beta::SessionConfig#enable_text_streaming enable_text_streaming} - # to true. - # - # @overload stream_run_session(request, options = nil) - # Pass arguments to `stream_run_session` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RunSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RunSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload stream_run_session(config: nil, inputs: nil) - # Pass arguments to `stream_run_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Ces::V1beta::SessionConfig, ::Hash] - # Required. The configuration for the session. - # @param inputs [::Array<::Google::Cloud::Ces::V1beta::SessionInput, ::Hash>] - # Required. Inputs for the session. - # @return [::Enumerable<::Google::Cloud::Ces::V1beta::RunSessionResponse>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RunSessionRequest.new - # - # # Call the stream_run_session method to start streaming. - # output = client.stream_run_session request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Ces::V1beta::RunSessionResponse - # output.each do |current_response| - # p current_response - # end - # - def stream_run_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.stream_run_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.stream_run_session.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.stream_run_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - ::Gapic::Rest::ServerStream.new( - ::Google::Cloud::Ces::V1beta::RunSessionResponse, - ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| - @session_service_stub.stream_run_session 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 - - ## - # Configuration class for the SessionService REST API. - # - # This class represents the configuration for SessionService 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::Ces::V1beta::SessionService::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 - # # run_session to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.run_session.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.run_session.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 = "ces.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 SessionService 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 `run_session` - # @return [::Gapic::Config::Method] - # - attr_reader :run_session - ## - # RPC-specific configuration for `stream_run_session` - # @return [::Gapic::Config::Method] - # - attr_reader :stream_run_session - - # @private - def initialize parent_rpcs = nil - run_session_config = parent_rpcs.run_session if parent_rpcs.respond_to? :run_session - @run_session = ::Gapic::Config::Method.new run_session_config - stream_run_session_config = parent_rpcs.stream_run_session if parent_rpcs.respond_to? :stream_run_session - @stream_run_session = ::Gapic::Config::Method.new stream_run_session_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb deleted file mode 100644 index 0ad307b87168..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb +++ /dev/null @@ -1,199 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/session_service_pb" - -module Google - module Cloud - module Ces - module V1beta - module SessionService - module Rest - ## - # REST service stub for the SessionService 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 run_session REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RunSessionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::RunSessionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::RunSessionResponse] - # A result object deserialized from the server's reply - def run_session request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_session_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_session", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::RunSessionResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the stream_run_session REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RunSessionRequest] - # A 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 stream_run_session(request_pb, options = nil, &) - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_stream_run_session_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "stream_run_session", - options: options, - is_server_streaming: true, - & - ) - ::Gapic::Rest::TransportOperation.new response - end - - ## - # @private - # - # GRPC transcoding helper method for the run_session REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RunSessionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_session_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{config.session}:runSession", - body: "*", - matches: [ - ["config.session", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/sessions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the stream_run_session REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RunSessionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_stream_run_session_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{config.session}:streamRunSession", - body: "*", - matches: [ - ["config.session", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/sessions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_pb.rb deleted file mode 100644 index 94533eb378ae..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/session_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/ces/v1beta/common_pb' -require 'google/cloud/ces/v1beta/example_pb' -require 'google/cloud/ces/v1beta/mocks_pb' -require 'google/cloud/ces/v1beta/search_suggestions_pb' -require 'google/protobuf/any_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n-google/cloud/ces/v1beta/session_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a%google/cloud/ces/v1beta/example.proto\x1a#google/cloud/ces/v1beta/mocks.proto\x1a\x30google/cloud/ces/v1beta/search_suggestions.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xa6\x02\n\nMockConfig\x12G\n\x11mocked_tool_calls\x18\x01 \x03(\x0b\x32\'.google.cloud.ces.v1beta.MockedToolCallB\x03\xe0\x41\x01\x12h\n\x1cunmatched_tool_call_behavior\x18\x02 \x01(\x0e\x32=.google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehaviorB\x03\xe0\x41\x02\"e\n\x19UnmatchedToolCallBehavior\x12,\n(UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46\x41IL\x10\x01\x12\x10\n\x0cPASS_THROUGH\x10\x02\"\x9d\x01\n\x10InputAudioConfig\x12\x43\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32&.google.cloud.ces.v1beta.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12$\n\x17noise_suppression_level\x18\x06 \x01(\tB\x03\xe0\x41\x01\"x\n\x11OutputAudioConfig\x12\x43\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32&.google.cloud.ces.v1beta.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\x81\x07\n\rSessionConfig\x12\x33\n\x07session\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Session\x12J\n\x12input_audio_config\x18\x02 \x01(\x0b\x32).google.cloud.ces.v1beta.InputAudioConfigB\x03\xe0\x41\x01\x12L\n\x13output_audio_config\x18\x03 \x01(\x0b\x32*.google.cloud.ces.v1beta.OutputAudioConfigB\x03\xe0\x41\x01\x12\x42\n\x13historical_contexts\x18\x05 \x03(\x0b\x32 .google.cloud.ces.v1beta.MessageB\x03\xe0\x41\x01\x12\x35\n\x0b\x65ntry_agent\x18\x0c \x01(\tB \xe0\x41\x01\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x17\n\ndeployment\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0euse_tool_fakes\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x12w\n\"remote_dialogflow_query_parameters\x18\x0f \x01(\x0b\x32\x46.google.cloud.ces.v1beta.SessionConfig.RemoteDialogflowQueryParametersB\x03\xe0\x41\x01\x12\"\n\x15\x65nable_text_streaming\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xba\x02\n\x1fRemoteDialogflowQueryParameters\x12x\n\x0fwebhook_headers\x18\x01 \x03(\x0b\x32Z.google.cloud.ces.v1beta.SessionConfig.RemoteDialogflowQueryParameters.WebhookHeadersEntryB\x03\xe0\x41\x01\x12-\n\x07payload\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x37\n\x11\x65nd_user_metadata\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a\x35\n\x13WebhookHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"G\n\tToolCalls\x12:\n\ntool_calls\x18\x01 \x03(\x0b\x32!.google.cloud.ces.v1beta.ToolCallB\x03\xe0\x41\x01\"S\n\rToolResponses\x12\x42\n\x0etool_responses\x18\x01 \x03(\x0b\x32%.google.cloud.ces.v1beta.ToolResponseB\x03\xe0\x41\x01\"\xa6\x01\n\tCitations\x12\x43\n\x0c\x63ited_chunks\x18\x01 \x03(\x0b\x32-.google.cloud.ces.v1beta.Citations.CitedChunk\x1aT\n\nCitedChunk\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x1c\n\x14requires_attribution\x18\x04 \x01(\x08\"\x1b\n\x05\x45vent\x12\x12\n\x05\x65vent\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x92\x03\n\x0cSessionInput\x12\x13\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x13\n\x04\x64tmf\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x14\n\x05\x61udio\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x45\n\x0etool_responses\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1beta.ToolResponsesB\x03\xe0\x41\x01H\x00\x12\x34\n\x05image\x18\x04 \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.ImageB\x03\xe0\x41\x01H\x00\x12\x32\n\x04\x62lob\x18\x07 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.BlobB\x03\xe0\x41\x01H\x00\x12\x31\n\tvariables\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x00\x12\x34\n\x05\x65vent\x18\t \x01(\x0b\x32\x1e.google.cloud.ces.v1beta.EventB\x03\xe0\x41\x01H\x00\x12\x1a\n\rwill_continue\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0c\n\ninput_type\"\xea\x04\n\rSessionOutput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x0f\n\x05\x61udio\x18\x02 \x01(\x0cH\x00\x12\x38\n\ntool_calls\x18\x03 \x01(\x0b\x32\".google.cloud.ces.v1beta.ToolCallsH\x00\x12\x37\n\tcitations\x18\x08 \x01(\x0b\x32\".google.cloud.ces.v1beta.CitationsH\x00\x12U\n\x19google_search_suggestions\x18\n \x01(\x0b\x32\x30.google.cloud.ces.v1beta.GoogleSearchSuggestionsH\x00\x12:\n\x0b\x65nd_session\x18\t \x01(\x0b\x32#.google.cloud.ces.v1beta.EndSessionH\x00\x12*\n\x07payload\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x12\n\nturn_index\x18\x06 \x01(\x05\x12\x16\n\x0eturn_completed\x18\x04 \x01(\x08\x12S\n\x0f\x64iagnostic_info\x18\x07 \x01(\x0b\x32\x35.google.cloud.ces.v1beta.SessionOutput.DiagnosticInfoB\x03\xe0\x41\x01\x1av\n\x0e\x44iagnosticInfo\x12\x32\n\x08messages\x18\x01 \x03(\x0b\x32 .google.cloud.ces.v1beta.Message\x12\x30\n\troot_span\x18\x03 \x01(\x0b\x32\x1d.google.cloud.ces.v1beta.SpanB\r\n\x0boutput_type\",\n\x11RecognitionResult\x12\x17\n\ntranscript\x18\x01 \x01(\tB\x03\xe0\x41\x01\"&\n\x12InterruptionSignal\x12\x10\n\x08\x62\x61rge_in\x18\x01 \x01(\x08\"<\n\nEndSession\x12.\n\x08metadata\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\x08\n\x06GoAway\"\x8c\x01\n\x11RunSessionRequest\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.SessionConfigB\x03\xe0\x41\x02\x12:\n\x06inputs\x18\x03 \x03(\x0b\x32%.google.cloud.ces.v1beta.SessionInputB\x03\xe0\x41\x02\"M\n\x12RunSessionResponse\x12\x37\n\x07outputs\x18\x01 \x03(\x0b\x32&.google.cloud.ces.v1beta.SessionOutput\"\xaf\x01\n\x18\x42idiSessionClientMessage\x12=\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.SessionConfigB\x03\xe0\x41\x01H\x00\x12\x44\n\x0erealtime_input\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1beta.SessionInputB\x03\xe0\x41\x01H\x00\x42\x0e\n\x0cmessage_type\"\x8b\x03\n\x18\x42idiSessionServerMessage\x12\x45\n\x0esession_output\x18\x01 \x01(\x0b\x32&.google.cloud.ces.v1beta.SessionOutputB\x03\xe0\x41\x01H\x00\x12M\n\x12recognition_result\x18\x02 \x01(\x0b\x32*.google.cloud.ces.v1beta.RecognitionResultB\x03\xe0\x41\x01H\x00\x12O\n\x13interruption_signal\x18\x03 \x01(\x0b\x32+.google.cloud.ces.v1beta.InterruptionSignalB\x03\xe0\x41\x01H\x00\x12?\n\x0b\x65nd_session\x18\x05 \x01(\x0b\x32#.google.cloud.ces.v1beta.EndSessionB\x03\xe0\x41\x01H\x00\x12\x37\n\x07go_away\x18\x06 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.GoAwayB\x03\xe0\x41\x01H\x00\x42\x0e\n\x0cmessage_type*R\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\t\n\x05MULAW\x10\x02\x12\x08\n\x04\x41LAW\x10\x03\x32\x8a\x05\n\x0eSessionService\x12\xbe\x01\n\nRunSession\x12*.google.cloud.ces.v1beta.RunSessionRequest\x1a+.google.cloud.ces.v1beta.RunSessionResponse\"W\x82\xd3\xe4\x93\x02Q\"L/v1beta/{config.session=projects/*/locations/*/apps/*/sessions/*}:runSession:\x01*\x12\xcc\x01\n\x10StreamRunSession\x12*.google.cloud.ces.v1beta.RunSessionRequest\x1a+.google.cloud.ces.v1beta.RunSessionResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1beta/{config.session=projects/*/locations/*/apps/*/sessions/*}:streamRunSession:\x01*0\x01\x12|\n\x0e\x42idiRunSession\x12\x31.google.cloud.ces.v1beta.BidiSessionClientMessage\x1a\x31.google.cloud.ces.v1beta.BidiSessionServerMessage\"\x00(\x01\x30\x01\x1aj\xca\x41\x12\x63\x65s.googleapis.com\xd2\x41Rhttps://www.googleapis.com/auth/ces,https://www.googleapis.com/auth/cloud-platformB\xc9\x01\n\x1b\x63om.google.cloud.ces.v1betaB\x13SessionServiceProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespb\xea\x41\x63\n\x1a\x63\x65s.googleapis.com/Session\x12\x45projects/{project}/locations/{location}/apps/{app}/sessions/{session}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - MockConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.MockConfig").msgclass - MockConfig::UnmatchedToolCallBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.MockConfig.UnmatchedToolCallBehavior").enummodule - InputAudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.InputAudioConfig").msgclass - OutputAudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.OutputAudioConfig").msgclass - SessionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SessionConfig").msgclass - SessionConfig::RemoteDialogflowQueryParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SessionConfig.RemoteDialogflowQueryParameters").msgclass - ToolCalls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ToolCalls").msgclass - ToolResponses = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ToolResponses").msgclass - Citations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Citations").msgclass - Citations::CitedChunk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Citations.CitedChunk").msgclass - Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Event").msgclass - SessionInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SessionInput").msgclass - SessionOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SessionOutput").msgclass - SessionOutput::DiagnosticInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SessionOutput.DiagnosticInfo").msgclass - RecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RecognitionResult").msgclass - InterruptionSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.InterruptionSignal").msgclass - EndSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.EndSession").msgclass - GoAway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.GoAway").msgclass - RunSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RunSessionRequest").msgclass - RunSessionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RunSessionResponse").msgclass - BidiSessionClientMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.BidiSessionClientMessage").msgclass - BidiSessionServerMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.BidiSessionServerMessage").msgclass - AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.AudioEncoding").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_services_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_services_pb.rb deleted file mode 100644 index 382f0108a6c1..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/session_service_services_pb.rb +++ /dev/null @@ -1,120 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/ces/v1beta/session_service.proto for package 'google.cloud.ces.v1beta' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/ces/v1beta/session_service_pb' - -module Google - module Cloud - module Ces - module V1beta - module SessionService - # Session service provides APIs for interacting with CES agents. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.ces.v1beta.SessionService' - - # Initiates a single-turn interaction with the CES agent within a session. - rpc :RunSession, ::Google::Cloud::Ces::V1beta::RunSessionRequest, ::Google::Cloud::Ces::V1beta::RunSessionResponse - # Initiates a single-turn interaction with the CES agent. Uses server-side - # streaming to deliver incremental results and partial responses as they are - # generated. - # - # By default, complete responses (e.g., messages from callbacks or full LLM - # responses) are sent to the client as soon as they are available. To enable - # streaming individual text chunks directly from the model, set - # [enable_text_streaming][google.cloud.ces.v1beta.SessionConfig.enable_text_streaming] - # to true. - rpc :StreamRunSession, ::Google::Cloud::Ces::V1beta::RunSessionRequest, stream(::Google::Cloud::Ces::V1beta::RunSessionResponse) - # Establishes a bidirectional streaming connection with the CES agent. - # The agent processes continuous multimodal inputs (e.g., text, audio) and - # generates real-time multimodal output streams. - # - # --- Client Request Stream --- - # The client streams requests in the following order: - # - # 1. Initialization: - # The first message must contain - # [SessionConfig][google.cloud.ces.v1beta.BidiSessionClientMessage.config]. - # For audio sessions, this should also include - # [InputAudioConfig][google.cloud.ces.v1beta.SessionConfig.input_audio_config] - # and - # [OutputAudioConfig][google.cloud.ces.v1beta.SessionConfig.output_audio_config] - # to define audio processing and synthesis parameters. - # - # 2. Interaction: - # Subsequent messages stream - # [SessionInput][google.cloud.ces.v1beta.BidiSessionClientMessage.realtime_input] - # containing real-time user input data. - # - # 3. Termination: - # The client should half-close the stream when there is no more user - # input. It should also half-close upon receiving - # [EndSession][google.cloud.ces.v1beta.BidiSessionServerMessage.end_session] - # or [GoAway][google.cloud.ces.v1beta.BidiSessionServerMessage.go_away] - # from the agent. - # - # --- Server Response Stream --- - # For each interaction turn, the agent streams messages in the following - # sequence: - # - # 1. Speech Recognition (First N messages): - # Contains - # [RecognitionResult][google.cloud.ces.v1beta.BidiSessionServerMessage.recognition_result] - # representing the concatenated user speech segments captured so far. - # This is only populated for audio sessions. - # - # 2. Response (Next M messages): - # Contains - # [SessionOutput][google.cloud.ces.v1beta.BidiSessionServerMessage.session_output] - # delivering the agent's response in various modalities (e.g., text, - # audio). - # - # 3. Turn Completion (Final message of the turn): - # Contains - # [SessionOutput][google.cloud.ces.v1beta.BidiSessionServerMessage.session_output] - # with - # [turn_completed][google.cloud.ces.v1beta.SessionOutput.turn_completed] - # set to true. This signals the end of the current turn and includes - # [DiagnosticInfo][google.cloud.ces.v1beta.SessionOutput.diagnostic_info] - # with execution details. - # - # --- Audio Best Practices --- - # 1. Streaming: - # Stream [audio data][google.cloud.ces.v1beta.SessionInput.audio] - # **CONTINUOUSLY**, even during silence. Recommended chunk size: 40-120ms - # (balances latency vs. efficiency). - # - # 2. Playback & Interruption: - # Play [audio responses][google.cloud.ces.v1beta.SessionOutput.audio] - # upon receipt. Stop playback immediately if an - # [InterruptionSignal][google.cloud.ces.v1beta.BidiSessionServerMessage.interruption_signal] - # is received (e.g., user barge-in or new agent response). - rpc :BidiRunSession, stream(::Google::Cloud::Ces::V1beta::BidiSessionClientMessage), stream(::Google::Cloud::Ces::V1beta::BidiSessionServerMessage) - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/system_tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/system_tool_pb.rb deleted file mode 100644 index 32cba74afa38..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/system_tool_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/system_tool.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n)google/cloud/ces/v1beta/system_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"9\n\nSystemTool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42_\n\x1b\x63om.google.cloud.ces.v1betaB\x0fSystemToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - SystemTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.SystemTool").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_pb.rb deleted file mode 100644 index 43921b744f7c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/tool.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/ces/v1beta/agent_card_pb' -require 'google/cloud/ces/v1beta/agent_tool_pb' -require 'google/cloud/ces/v1beta/client_function_pb' -require 'google/cloud/ces/v1beta/common_pb' -require 'google/cloud/ces/v1beta/connector_tool_pb' -require 'google/cloud/ces/v1beta/data_store_tool_pb' -require 'google/cloud/ces/v1beta/fakes_pb' -require 'google/cloud/ces/v1beta/file_search_tool_pb' -require 'google/cloud/ces/v1beta/google_search_tool_pb' -require 'google/cloud/ces/v1beta/mcp_tool_pb' -require 'google/cloud/ces/v1beta/open_api_tool_pb' -require 'google/cloud/ces/v1beta/python_function_pb' -require 'google/cloud/ces/v1beta/system_tool_pb' -require 'google/cloud/ces/v1beta/widget_tool_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\"google/cloud/ces/v1beta/tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/ces/v1beta/agent_card.proto\x1a(google/cloud/ces/v1beta/agent_tool.proto\x1a-google/cloud/ces/v1beta/client_function.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a,google/cloud/ces/v1beta/connector_tool.proto\x1a-google/cloud/ces/v1beta/data_store_tool.proto\x1a#google/cloud/ces/v1beta/fakes.proto\x1a.google/cloud/ces/v1beta/file_search_tool.proto\x1a\x30google/cloud/ces/v1beta/google_search_tool.proto\x1a&google/cloud/ces/v1beta/mcp_tool.proto\x1a+google/cloud/ces/v1beta/open_api_tool.proto\x1a-google/cloud/ces/v1beta/python_function.proto\x1a)google/cloud/ces/v1beta/system_tool.proto\x1a)google/cloud/ces/v1beta/widget_tool.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\n\n\x04Tool\x12G\n\x0f\x63lient_function\x18\x02 \x01(\x0b\x32\'.google.cloud.ces.v1beta.ClientFunctionB\x03\xe0\x41\x01H\x00\x12\x42\n\ropen_api_tool\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.OpenApiToolB\x03\xe0\x41\x01H\x00\x12L\n\x12google_search_tool\x18\x05 \x01(\x0b\x32).google.cloud.ces.v1beta.GoogleSearchToolB\x03\xe0\x41\x01H\x00\x12\x45\n\x0e\x63onnector_tool\x18\x08 \x01(\x0b\x32&.google.cloud.ces.v1beta.ConnectorToolB\x03\xe0\x41\x01H\x00\x12\x46\n\x0f\x64\x61ta_store_tool\x18\n \x01(\x0b\x32&.google.cloud.ces.v1beta.DataStoreToolB\x03\xe0\x41\x01H\x00\x12G\n\x0fpython_function\x18\x0b \x01(\x0b\x32\'.google.cloud.ces.v1beta.PythonFunctionB\x03\xe0\x41\x01H\x00\x12\x39\n\x08mcp_tool\x18\x10 \x01(\x0b\x32 .google.cloud.ces.v1beta.McpToolB\x03\xe0\x41\x01H\x00\x12H\n\x10\x66ile_search_tool\x18\x11 \x01(\x0b\x32\'.google.cloud.ces.v1beta.FileSearchToolB\x03\xe0\x41\x01H\x00\x12?\n\x0bsystem_tool\x18\x12 \x01(\x0b\x32#.google.cloud.ces.v1beta.SystemToolB\x03\xe0\x41\x01H\x00\x12=\n\nagent_tool\x18\x17 \x01(\x0b\x32\".google.cloud.ces.v1beta.AgentToolB\x03\xe0\x41\x01H\x00\x12?\n\x0bwidget_tool\x18\x18 \x01(\x0b\x32#.google.cloud.ces.v1beta.WidgetToolB\x03\xe0\x41\x01H\x00\x12J\n\x11remote_agent_tool\x18\x19 \x01(\x0b\x32(.google.cloud.ces.v1beta.RemoteAgentToolB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x43\n\x0e\x65xecution_type\x18\x0c \x01(\x0e\x32&.google.cloud.ces.v1beta.ExecutionTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x16 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0e \x01(\t\x12\x1e\n\x11generated_summary\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x10tool_fake_config\x18\x14 \x01(\x0b\x32\'.google.cloud.ces.v1beta.ToolFakeConfigB\x03\xe0\x41\x01:j\xea\x41g\n\x17\x63\x65s.googleapis.com/Tool\x12?projects/{project}/locations/{location}/apps/{app}/tools/{tool}*\x05tools2\x04toolB\x0b\n\ttool_typeBY\n\x1b\x63om.google.cloud.ces.v1betaB\tToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - Tool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Tool").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service.rb deleted file mode 100644 index 3ee542aeda19..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/ces/v1beta/version" - -require "google/cloud/ces/v1beta/tool_service/credentials" -require "google/cloud/ces/v1beta/tool_service/paths" -require "google/cloud/ces/v1beta/tool_service/client" -require "google/cloud/ces/v1beta/tool_service/rest" - -module Google - module Cloud - module Ces - module V1beta - ## - # Tool service provides APIs for interacting with CES tools. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/ces/v1beta/tool_service" - # client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/ces/v1beta/tool_service/rest" - # client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new - # - module ToolService - end - end - end - end -end - -helper_path = ::File.join __dir__, "tool_service", "helpers.rb" -require "google/cloud/ces/v1beta/tool_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/client.rb deleted file mode 100644 index 900780da52ef..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/client.rb +++ /dev/null @@ -1,731 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/tool_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module Ces - module V1beta - module ToolService - ## - # Client for the ToolService service. - # - # Tool service provides APIs for interacting with CES tools. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :tool_service_stub - - ## - # Configure the ToolService Client class. - # - # See {::Google::Cloud::Ces::V1beta::ToolService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ToolService clients - # ::Google::Cloud::Ces::V1beta::ToolService::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", "Ces", "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 = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ToolService 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::Ces::V1beta::ToolService::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 - @tool_service_stub.universe_domain - end - - ## - # Create a new ToolService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ToolService 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/ces/v1beta/tool_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 - - @tool_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Ces::V1beta::ToolService::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 - ) - - @tool_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 = @tool_service_stub.endpoint - config.universe_domain = @tool_service_stub.universe_domain - config.logger = @tool_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 - @tool_service_stub.logger - end - - # Service calls - - ## - # Executes the given tool with the given arguments. - # - # @overload execute_tool(request, options = nil) - # Pass arguments to `execute_tool` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ExecuteToolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ExecuteToolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload execute_tool(tool: nil, toolset_tool: nil, variables: nil, context: nil, parent: nil, args: nil, mock_config: nil) - # Pass arguments to `execute_tool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tool [::String] - # Optional. The name of the tool to execute. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} - # - # Note: The following parameters are mutually exclusive: `tool`, `toolset_tool`. 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 toolset_tool [::Google::Cloud::Ces::V1beta::ToolsetTool, ::Hash] - # Optional. The toolset tool to execute. Only one tool should match the - # predicate from the toolset. Otherwise, an error will be returned. - # - # Note: The following parameters are mutually exclusive: `toolset_tool`, `tool`. 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 variables [::Google::Protobuf::Struct, ::Hash] - # Optional. The variables that are available for the tool execution. - # - # Note: The following parameters are mutually exclusive: `variables`, `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 context [::Google::Protobuf::Struct, ::Hash] - # Optional. The - # [ToolCallContext](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/python#environment - # for details) to be passed to the Python tool. - # - # Note: The following parameters are mutually exclusive: `context`, `variables`. 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 parent [::String] - # Required. The resource name of the app which the tool/toolset belongs to. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @param args [::Google::Protobuf::Struct, ::Hash] - # Optional. The input parameters and values for the tool in JSON object - # format. - # @param mock_config [::Google::Cloud::Ces::V1beta::MockConfig, ::Hash] - # Optional. Mock configuration for the tool execution. - # If this field is set, tools that call other tools will be - # mocked based on the provided patterns and responses. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::ExecuteToolResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::ExecuteToolResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::ToolService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ExecuteToolRequest.new - # - # # Call the execute_tool method. - # result = client.execute_tool request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::ExecuteToolResponse. - # p result - # - def execute_tool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExecuteToolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.execute_tool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.execute_tool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.execute_tool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tool_service_stub.call_rpc :execute_tool, 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 - - ## - # Retrieve the schema of the given tool. The schema is computed on the fly - # for the given instance of the tool. - # - # @overload retrieve_tool_schema(request, options = nil) - # Pass arguments to `retrieve_tool_schema` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retrieve_tool_schema(tool: nil, toolset_tool: nil, parent: nil) - # Pass arguments to `retrieve_tool_schema` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tool [::String] - # Optional. The name of the tool to retrieve the schema for. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} - # - # Note: The following parameters are mutually exclusive: `tool`, `toolset_tool`. 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 toolset_tool [::Google::Cloud::Ces::V1beta::ToolsetTool, ::Hash] - # Optional. The toolset tool to retrieve the schema for. Only one tool - # should match the predicate from the toolset. Otherwise, an error will be - # returned. - # - # Note: The following parameters are mutually exclusive: `toolset_tool`, `tool`. 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 parent [::String] - # Required. The resource name of the app which the tool/toolset belongs to. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::ToolService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new - # - # # Call the retrieve_tool_schema method. - # result = client.retrieve_tool_schema request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse. - # p result - # - def retrieve_tool_schema request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.retrieve_tool_schema.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.retrieve_tool_schema.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_tool_schema.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tool_service_stub.call_rpc :retrieve_tool_schema, 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 - - ## - # Retrieve the list of tools included in the specified toolset. - # - # @overload retrieve_tools(request, options = nil) - # Pass arguments to `retrieve_tools` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RetrieveToolsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RetrieveToolsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retrieve_tools(toolset: nil, tool_ids: nil, bypass_persistence_config: nil) - # Pass arguments to `retrieve_tools` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param toolset [::String] - # Required. The name of the toolset to retrieve the tools for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - # @param tool_ids [::Array<::String>] - # Optional. The identifiers of the tools to retrieve from the toolset. - # If empty, all tools in the toolset will be returned. - # @param bypass_persistence_config [::Boolean] - # Optional. If true, the returned tools will contain raw descriptions and - # schemas directly from the server, bypassing any stored persistence - # configurations (overrides/snapshots). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::ToolService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new - # - # # Call the retrieve_tools method. - # result = client.retrieve_tools request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolsResponse. - # p result - # - def retrieve_tools request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.retrieve_tools.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.toolset - header_params["toolset"] = request.toolset - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.retrieve_tools.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_tools.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tool_service_stub.call_rpc :retrieve_tools, 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 ToolService API. - # - # This class represents the configuration for ToolService, - # 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::Ces::V1beta::ToolService::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 - # # execute_tool to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Ces::V1beta::ToolService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.execute_tool.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.execute_tool.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::Ces::V1beta::ToolService::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 = "ces.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 ToolService 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 `execute_tool` - # @return [::Gapic::Config::Method] - # - attr_reader :execute_tool - ## - # RPC-specific configuration for `retrieve_tool_schema` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_tool_schema - ## - # RPC-specific configuration for `retrieve_tools` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_tools - - # @private - def initialize parent_rpcs = nil - execute_tool_config = parent_rpcs.execute_tool if parent_rpcs.respond_to? :execute_tool - @execute_tool = ::Gapic::Config::Method.new execute_tool_config - retrieve_tool_schema_config = parent_rpcs.retrieve_tool_schema if parent_rpcs.respond_to? :retrieve_tool_schema - @retrieve_tool_schema = ::Gapic::Config::Method.new retrieve_tool_schema_config - retrieve_tools_config = parent_rpcs.retrieve_tools if parent_rpcs.respond_to? :retrieve_tools - @retrieve_tools = ::Gapic::Config::Method.new retrieve_tools_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/credentials.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/credentials.rb deleted file mode 100644 index c8544cf74af6..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/credentials.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Ces - module V1beta - module ToolService - # Credentials for the ToolService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/ces", - "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-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/paths.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/paths.rb deleted file mode 100644 index 8d8c222375be..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/paths.rb +++ /dev/null @@ -1,94 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - module ToolService - # Path helper methods for the ToolService API. - module Paths - ## - # Create a fully-qualified App resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # - # @return [::String] - def app_path project:, location:, app: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}" - end - - ## - # Create a fully-qualified Tool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param tool [String] - # - # @return [::String] - def tool_path project:, location:, app:, tool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/tools/#{tool}" - end - - ## - # Create a fully-qualified Toolset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param toolset [String] - # - # @return [::String] - def toolset_path project:, location:, app:, toolset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/toolsets/#{toolset}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest.rb deleted file mode 100644 index 3eb91b8f49fd..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/ces/v1beta/version" -require "google/cloud/ces/v1beta/bindings_override" - -require "google/cloud/ces/v1beta/tool_service/credentials" -require "google/cloud/ces/v1beta/tool_service/paths" -require "google/cloud/ces/v1beta/tool_service/rest/client" - -module Google - module Cloud - module Ces - module V1beta - ## - # Tool service provides APIs for interacting with CES tools. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/ces/v1beta/tool_service/rest" - # client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new - # - module ToolService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/ces/v1beta/tool_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb deleted file mode 100644 index 5b1c53902719..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb +++ /dev/null @@ -1,675 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/tool_service_pb" -require "google/cloud/ces/v1beta/tool_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Ces - module V1beta - module ToolService - module Rest - ## - # REST client for the ToolService service. - # - # Tool service provides APIs for interacting with CES tools. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :tool_service_stub - - ## - # Configure the ToolService Client class. - # - # See {::Google::Cloud::Ces::V1beta::ToolService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ToolService clients - # ::Google::Cloud::Ces::V1beta::ToolService::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", "Ces", "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 = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ToolService 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::Ces::V1beta::ToolService::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 - @tool_service_stub.universe_domain - end - - ## - # Create a new ToolService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ToolService 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 - - @tool_service_stub = ::Google::Cloud::Ces::V1beta::ToolService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @tool_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 = @tool_service_stub.endpoint - config.universe_domain = @tool_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @tool_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 - @tool_service_stub.logger - end - - # Service calls - - ## - # Executes the given tool with the given arguments. - # - # @overload execute_tool(request, options = nil) - # Pass arguments to `execute_tool` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::ExecuteToolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::ExecuteToolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload execute_tool(tool: nil, toolset_tool: nil, variables: nil, context: nil, parent: nil, args: nil, mock_config: nil) - # Pass arguments to `execute_tool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tool [::String] - # Optional. The name of the tool to execute. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} - # - # Note: The following parameters are mutually exclusive: `tool`, `toolset_tool`. 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 toolset_tool [::Google::Cloud::Ces::V1beta::ToolsetTool, ::Hash] - # Optional. The toolset tool to execute. Only one tool should match the - # predicate from the toolset. Otherwise, an error will be returned. - # - # Note: The following parameters are mutually exclusive: `toolset_tool`, `tool`. 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 variables [::Google::Protobuf::Struct, ::Hash] - # Optional. The variables that are available for the tool execution. - # - # Note: The following parameters are mutually exclusive: `variables`, `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 context [::Google::Protobuf::Struct, ::Hash] - # Optional. The - # [ToolCallContext](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/python#environment - # for details) to be passed to the Python tool. - # - # Note: The following parameters are mutually exclusive: `context`, `variables`. 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 parent [::String] - # Required. The resource name of the app which the tool/toolset belongs to. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @param args [::Google::Protobuf::Struct, ::Hash] - # Optional. The input parameters and values for the tool in JSON object - # format. - # @param mock_config [::Google::Cloud::Ces::V1beta::MockConfig, ::Hash] - # Optional. Mock configuration for the tool execution. - # If this field is set, tools that call other tools will be - # mocked based on the provided patterns and responses. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::ExecuteToolResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ExecuteToolResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::ExecuteToolRequest.new - # - # # Call the execute_tool method. - # result = client.execute_tool request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::ExecuteToolResponse. - # p result - # - def execute_tool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExecuteToolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.execute_tool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.execute_tool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.execute_tool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tool_service_stub.execute_tool 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 - - ## - # Retrieve the schema of the given tool. The schema is computed on the fly - # for the given instance of the tool. - # - # @overload retrieve_tool_schema(request, options = nil) - # Pass arguments to `retrieve_tool_schema` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retrieve_tool_schema(tool: nil, toolset_tool: nil, parent: nil) - # Pass arguments to `retrieve_tool_schema` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tool [::String] - # Optional. The name of the tool to retrieve the schema for. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} - # - # Note: The following parameters are mutually exclusive: `tool`, `toolset_tool`. 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 toolset_tool [::Google::Cloud::Ces::V1beta::ToolsetTool, ::Hash] - # Optional. The toolset tool to retrieve the schema for. Only one tool - # should match the predicate from the toolset. Otherwise, an error will be - # returned. - # - # Note: The following parameters are mutually exclusive: `toolset_tool`, `tool`. 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 parent [::String] - # Required. The resource name of the app which the tool/toolset belongs to. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new - # - # # Call the retrieve_tool_schema method. - # result = client.retrieve_tool_schema request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse. - # p result - # - def retrieve_tool_schema request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.retrieve_tool_schema.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.retrieve_tool_schema.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retrieve_tool_schema.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tool_service_stub.retrieve_tool_schema 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 - - ## - # Retrieve the list of tools included in the specified toolset. - # - # @overload retrieve_tools(request, options = nil) - # Pass arguments to `retrieve_tools` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::RetrieveToolsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::RetrieveToolsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retrieve_tools(toolset: nil, tool_ids: nil, bypass_persistence_config: nil) - # Pass arguments to `retrieve_tools` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param toolset [::String] - # Required. The name of the toolset to retrieve the tools for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - # @param tool_ids [::Array<::String>] - # Optional. The identifiers of the tools to retrieve from the toolset. - # If empty, all tools in the toolset will be returned. - # @param bypass_persistence_config [::Boolean] - # Optional. If true, the returned tools will contain raw descriptions and - # schemas directly from the server, bypassing any stored persistence - # configurations (overrides/snapshots). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new - # - # # Call the retrieve_tools method. - # result = client.retrieve_tools request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolsResponse. - # p result - # - def retrieve_tools request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.retrieve_tools.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.retrieve_tools.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retrieve_tools.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tool_service_stub.retrieve_tools 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 ToolService REST API. - # - # This class represents the configuration for ToolService 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::Ces::V1beta::ToolService::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 - # # execute_tool to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.execute_tool.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.execute_tool.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 = "ces.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 ToolService 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 `execute_tool` - # @return [::Gapic::Config::Method] - # - attr_reader :execute_tool - ## - # RPC-specific configuration for `retrieve_tool_schema` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_tool_schema - ## - # RPC-specific configuration for `retrieve_tools` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_tools - - # @private - def initialize parent_rpcs = nil - execute_tool_config = parent_rpcs.execute_tool if parent_rpcs.respond_to? :execute_tool - @execute_tool = ::Gapic::Config::Method.new execute_tool_config - retrieve_tool_schema_config = parent_rpcs.retrieve_tool_schema if parent_rpcs.respond_to? :retrieve_tool_schema - @retrieve_tool_schema = ::Gapic::Config::Method.new retrieve_tool_schema_config - retrieve_tools_config = parent_rpcs.retrieve_tools if parent_rpcs.respond_to? :retrieve_tools - @retrieve_tools = ::Gapic::Config::Method.new retrieve_tools_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/service_stub.rb deleted file mode 100644 index 7ad87ef03ee5..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service/rest/service_stub.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/tool_service_pb" - -module Google - module Cloud - module Ces - module V1beta - module ToolService - module Rest - ## - # REST service stub for the ToolService 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 execute_tool REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ExecuteToolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::ExecuteToolResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::ExecuteToolResponse] - # A result object deserialized from the server's reply - def execute_tool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_execute_tool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "execute_tool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::ExecuteToolResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retrieve_tool_schema REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::RetrieveToolSchemaResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse] - # A result object deserialized from the server's reply - def retrieve_tool_schema request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_tool_schema_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "retrieve_tool_schema", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retrieve_tools REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RetrieveToolsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::RetrieveToolsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::RetrieveToolsResponse] - # A result object deserialized from the server's reply - def retrieve_tools request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_tools_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "retrieve_tools", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::RetrieveToolsResponse.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 execute_tool REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::ExecuteToolRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_execute_tool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}:executeTool", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retrieve_tool_schema REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retrieve_tool_schema_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}:retrieveToolSchema", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retrieve_tools REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::RetrieveToolsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retrieve_tools_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{toolset}:retrieveTools", - body: "*", - matches: [ - ["toolset", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/toolsets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb deleted file mode 100644 index 58e685734750..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/tool_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/ces/v1beta/schema_pb' -require 'google/cloud/ces/v1beta/search_suggestions_pb' -require 'google/cloud/ces/v1beta/session_service_pb' -require 'google/cloud/ces/v1beta/tool_pb' -require 'google/cloud/ces/v1beta/toolset_tool_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n*google/cloud/ces/v1beta/tool_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/schema.proto\x1a\x30google/cloud/ces/v1beta/search_suggestions.proto\x1a-google/cloud/ces/v1beta/session_service.proto\x1a\"google/cloud/ces/v1beta/tool.proto\x1a*google/cloud/ces/v1beta/toolset_tool.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xb4\x03\n\x12\x45xecuteToolRequest\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x01H\x00\x12\x31\n\tvariables\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x01\x12/\n\x07\x63ontext\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x01\x12.\n\x06parent\x18\x04 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/App\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12=\n\x0bmock_config\x18\x07 \x01(\x0b\x32#.google.cloud.ces.v1beta.MockConfigB\x03\xe0\x41\x01\x42\x11\n\x0ftool_identifierB\x18\n\x16tool_execution_context\"\xf7\x02\n\x13\x45xecuteToolResponse\x12,\n\x04tool\x18\x01 \x01(\tB\x1c\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12<\n\x0ctoolset_tool\x18\x03 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolH\x00\x12)\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12*\n\tvariables\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x35\n\tcitations\x18\x05 \x01(\x0b\x32\".google.cloud.ces.v1beta.Citations\x12S\n\x19google_search_suggestions\x18\x06 \x01(\x0b\x32\x30.google.cloud.ces.v1beta.GoogleSearchSuggestionsB\x11\n\x0ftool_identifier\"\xd2\x01\n\x19RetrieveToolSchemaRequest\x12/\n\x04tool\x18\x01 \x01(\tB\x1f\xe0\x41\x01\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12\x41\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolB\x03\xe0\x41\x01H\x00\x12.\n\x06parent\x18\x03 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16\x63\x65s.googleapis.com/AppB\x11\n\x0ftool_identifier\"\x8a\x02\n\x1aRetrieveToolSchemaResponse\x12,\n\x04tool\x18\x01 \x01(\tB\x1c\xfa\x41\x19\n\x17\x63\x65s.googleapis.com/ToolH\x00\x12<\n\x0ctoolset_tool\x18\x02 \x01(\x0b\x32$.google.cloud.ces.v1beta.ToolsetToolH\x00\x12\x35\n\x0cinput_schema\x18\x03 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.Schema\x12\x36\n\routput_schema\x18\x04 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x11\n\x0ftool_identifier\"\x8a\x01\n\x14RetrieveToolsRequest\x12\x33\n\x07toolset\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x15\n\x08tool_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12&\n\x19\x62ypass_persistence_config\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"E\n\x15RetrieveToolsResponse\x12,\n\x05tools\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1beta.Tool2\xbf\x05\n\x0bToolService\x12\xaf\x01\n\x0b\x45xecuteTool\x12+.google.cloud.ces.v1beta.ExecuteToolRequest\x1a,.google.cloud.ces.v1beta.ExecuteToolResponse\"E\x82\xd3\xe4\x93\x02?\":/v1beta/{parent=projects/*/locations/*/apps/*}:executeTool:\x01*\x12\xcb\x01\n\x12RetrieveToolSchema\x12\x32.google.cloud.ces.v1beta.RetrieveToolSchemaRequest\x1a\x33.google.cloud.ces.v1beta.RetrieveToolSchemaResponse\"L\x82\xd3\xe4\x93\x02\x46\"A/v1beta/{parent=projects/*/locations/*/apps/*}:retrieveToolSchema:\x01*\x12\xc3\x01\n\rRetrieveTools\x12-.google.cloud.ces.v1beta.RetrieveToolsRequest\x1a..google.cloud.ces.v1beta.RetrieveToolsResponse\"S\x82\xd3\xe4\x93\x02M\"H/v1beta/{toolset=projects/*/locations/*/apps/*/toolsets/*}:retrieveTools:\x01*\x1aj\xca\x41\x12\x63\x65s.googleapis.com\xd2\x41Rhttps://www.googleapis.com/auth/ces,https://www.googleapis.com/auth/cloud-platformB`\n\x1b\x63om.google.cloud.ces.v1betaB\x10ToolServiceProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - ExecuteToolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExecuteToolRequest").msgclass - ExecuteToolResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ExecuteToolResponse").msgclass - RetrieveToolSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RetrieveToolSchemaRequest").msgclass - RetrieveToolSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RetrieveToolSchemaResponse").msgclass - RetrieveToolsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RetrieveToolsRequest").msgclass - RetrieveToolsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.RetrieveToolsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_services_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_services_pb.rb deleted file mode 100644 index 40e5f4f58391..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/tool_service_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/ces/v1beta/tool_service.proto for package 'google.cloud.ces.v1beta' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/ces/v1beta/tool_service_pb' - -module Google - module Cloud - module Ces - module V1beta - module ToolService - # Tool service provides APIs for interacting with CES tools. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.ces.v1beta.ToolService' - - # Executes the given tool with the given arguments. - rpc :ExecuteTool, ::Google::Cloud::Ces::V1beta::ExecuteToolRequest, ::Google::Cloud::Ces::V1beta::ExecuteToolResponse - # Retrieve the schema of the given tool. The schema is computed on the fly - # for the given instance of the tool. - rpc :RetrieveToolSchema, ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest, ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse - # Retrieve the list of tools included in the specified toolset. - rpc :RetrieveTools, ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest, ::Google::Cloud::Ces::V1beta::RetrieveToolsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_pb.rb deleted file mode 100644 index a10bfe1fc93c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/toolset.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/ces/v1beta/common_pb' -require 'google/cloud/ces/v1beta/connector_toolset_pb' -require 'google/cloud/ces/v1beta/fakes_pb' -require 'google/cloud/ces/v1beta/mcp_toolset_pb' -require 'google/cloud/ces/v1beta/open_api_toolset_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n%google/cloud/ces/v1beta/toolset.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1beta/common.proto\x1a/google/cloud/ces/v1beta/connector_toolset.proto\x1a#google/cloud/ces/v1beta/fakes.proto\x1a)google/cloud/ces/v1beta/mcp_toolset.proto\x1a.google/cloud/ces/v1beta/open_api_toolset.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x05\n\x07Toolset\x12?\n\x0bmcp_toolset\x18\x06 \x01(\x0b\x32#.google.cloud.ces.v1beta.McpToolsetB\x03\xe0\x41\x01H\x00\x12H\n\x10open_api_toolset\x18\x07 \x01(\x0b\x32\'.google.cloud.ces.v1beta.OpenApiToolsetB\x03\xe0\x41\x01H\x00\x12K\n\x11\x63onnector_toolset\x18\x08 \x01(\x0b\x32).google.cloud.ces.v1beta.ConnectorToolsetB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x05 \x01(\t\x12\x43\n\x0e\x65xecution_type\x18\t \x01(\x0e\x32&.google.cloud.ces.v1beta.ExecutionTypeB\x03\xe0\x41\x01\x12\x46\n\x10tool_fake_config\x18\x0b \x01(\x0b\x32\'.google.cloud.ces.v1beta.ToolFakeConfigB\x03\xe0\x41\x01:y\xea\x41v\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x45projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}*\x08toolsets2\x07toolsetB\x0e\n\x0ctoolset_typeB\\\n\x1b\x63om.google.cloud.ces.v1betaB\x0cToolsetProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - Toolset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.Toolset").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb deleted file mode 100644 index 439e3eb813f5..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/toolset_tool.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n*google/cloud/ces/v1beta/toolset_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"X\n\x0bToolsetTool\x12\x33\n\x07toolset\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Toolset\x12\x14\n\x07tool_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42`\n\x1b\x63om.google.cloud.ces.v1betaB\x10ToolsetToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - ToolsetTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.ToolsetTool").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/version.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/version.rb deleted file mode 100644 index 6e883eff5255..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service.rb deleted file mode 100644 index 1418715e82e9..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/ces/v1beta/version" - -require "google/cloud/ces/v1beta/widget_service/credentials" -require "google/cloud/ces/v1beta/widget_service/paths" -require "google/cloud/ces/v1beta/widget_service/client" -require "google/cloud/ces/v1beta/widget_service/rest" - -module Google - module Cloud - module Ces - module V1beta - ## - # Provides APIs for widgets to interact with CES APIs. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/ces/v1beta/widget_service" - # client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/ces/v1beta/widget_service/rest" - # client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new - # - module WidgetService - end - end - end - end -end - -helper_path = ::File.join __dir__, "widget_service", "helpers.rb" -require "google/cloud/ces/v1beta/widget_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/client.rb deleted file mode 100644 index d76d2ede12a7..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/client.rb +++ /dev/null @@ -1,501 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/widget_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module Ces - module V1beta - module WidgetService - ## - # Client for the WidgetService service. - # - # Provides APIs for widgets to interact with CES APIs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :widget_service_stub - - ## - # Configure the WidgetService Client class. - # - # See {::Google::Cloud::Ces::V1beta::WidgetService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WidgetService clients - # ::Google::Cloud::Ces::V1beta::WidgetService::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", "Ces", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the WidgetService 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::Ces::V1beta::WidgetService::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 - @widget_service_stub.universe_domain - end - - ## - # Create a new WidgetService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WidgetService 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/ces/v1beta/widget_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 - - @widget_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Ces::V1beta::WidgetService::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 - ) - - @widget_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 = @widget_service_stub.endpoint - config.universe_domain = @widget_service_stub.universe_domain - config.logger = @widget_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 - @widget_service_stub.logger - end - - # Service calls - - ## - # Generates a session scoped token for chat widget to authenticate with - # Session APIs. - # - # @overload generate_chat_token(request, options = nil) - # Pass arguments to `generate_chat_token` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload generate_chat_token(name: nil, deployment: nil, recaptcha_token: nil, live_handoff_enabled: nil) - # Pass arguments to `generate_chat_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The session name to generate the chat token for. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/sessions/\\{session} - # @param deployment [::String] - # Required. The deployment of the app to use for the session. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/deployments/\\{deployment} - # @param recaptcha_token [::String] - # Optional. The reCAPTCHA token generated by the client-side chat widget. - # @param live_handoff_enabled [::Boolean] - # Optional. Indicates if live handoff is enabled for the session. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::WidgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new - # - # # Call the generate_chat_token method. - # result = client.generate_chat_token request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::GenerateChatTokenResponse. - # p result - # - def generate_chat_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.generate_chat_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.generate_chat_token.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_chat_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @widget_service_stub.call_rpc :generate_chat_token, 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 WidgetService API. - # - # This class represents the configuration for WidgetService, - # 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::Ces::V1beta::WidgetService::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 - # # generate_chat_token to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Ces::V1beta::WidgetService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.generate_chat_token.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.generate_chat_token.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::Ces::V1beta::WidgetService::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 = "ces.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 WidgetService 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 `generate_chat_token` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_chat_token - - # @private - def initialize parent_rpcs = nil - generate_chat_token_config = parent_rpcs.generate_chat_token if parent_rpcs.respond_to? :generate_chat_token - @generate_chat_token = ::Gapic::Config::Method.new generate_chat_token_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/credentials.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/credentials.rb deleted file mode 100644 index 42a9772de404..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/credentials.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Ces - module V1beta - module WidgetService - # Credentials for the WidgetService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/ces", - "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-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/paths.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/paths.rb deleted file mode 100644 index 2996550c7f46..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/paths.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - module WidgetService - # Path helper methods for the WidgetService API. - module Paths - ## - # Create a fully-qualified Deployment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param deployment [String] - # - # @return [::String] - def deployment_path project:, location:, app:, deployment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/deployments/#{deployment}" - end - - ## - # Create a fully-qualified Session resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apps/{app}/sessions/{session}` - # - # @param project [String] - # @param location [String] - # @param app [String] - # @param session [String] - # - # @return [::String] - def session_path project:, location:, app:, session: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apps/#{app}/sessions/#{session}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest.rb deleted file mode 100644 index 01b7a7f65454..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/ces/v1beta/version" -require "google/cloud/ces/v1beta/bindings_override" - -require "google/cloud/ces/v1beta/widget_service/credentials" -require "google/cloud/ces/v1beta/widget_service/paths" -require "google/cloud/ces/v1beta/widget_service/rest/client" - -module Google - module Cloud - module Ces - module V1beta - ## - # Provides APIs for widgets to interact with CES APIs. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/ces/v1beta/widget_service/rest" - # client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new - # - module WidgetService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/ces/v1beta/widget_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb deleted file mode 100644 index faa7017e9fd1..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb +++ /dev/null @@ -1,459 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/widget_service_pb" -require "google/cloud/ces/v1beta/widget_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Ces - module V1beta - module WidgetService - module Rest - ## - # REST client for the WidgetService service. - # - # Provides APIs for widgets to interact with CES APIs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :widget_service_stub - - ## - # Configure the WidgetService Client class. - # - # See {::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WidgetService clients - # ::Google::Cloud::Ces::V1beta::WidgetService::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", "Ces", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the WidgetService 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::Ces::V1beta::WidgetService::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 - @widget_service_stub.universe_domain - end - - ## - # Create a new WidgetService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WidgetService 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 - - @widget_service_stub = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @widget_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 = @widget_service_stub.endpoint - config.universe_domain = @widget_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @widget_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 - @widget_service_stub.logger - end - - # Service calls - - ## - # Generates a session scoped token for chat widget to authenticate with - # Session APIs. - # - # @overload generate_chat_token(request, options = nil) - # Pass arguments to `generate_chat_token` via a request object, either of type - # {::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload generate_chat_token(name: nil, deployment: nil, recaptcha_token: nil, live_handoff_enabled: nil) - # Pass arguments to `generate_chat_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The session name to generate the chat token for. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/sessions/\\{session} - # @param deployment [::String] - # Required. The deployment of the app to use for the session. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/deployments/\\{deployment} - # @param recaptcha_token [::String] - # Optional. The reCAPTCHA token generated by the client-side chat widget. - # @param live_handoff_enabled [::Boolean] - # Optional. Indicates if live handoff is enabled for the session. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/ces/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new - # - # # Call the generate_chat_token method. - # result = client.generate_chat_token request - # - # # The returned object is of type Google::Cloud::Ces::V1beta::GenerateChatTokenResponse. - # p result - # - def generate_chat_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.generate_chat_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Ces::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.generate_chat_token.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_chat_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @widget_service_stub.generate_chat_token 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 WidgetService REST API. - # - # This class represents the configuration for WidgetService 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::Ces::V1beta::WidgetService::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 - # # generate_chat_token to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.generate_chat_token.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.generate_chat_token.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 = "ces.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 WidgetService 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 `generate_chat_token` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_chat_token - - # @private - def initialize parent_rpcs = nil - generate_chat_token_config = parent_rpcs.generate_chat_token if parent_rpcs.respond_to? :generate_chat_token - @generate_chat_token = ::Gapic::Config::Method.new generate_chat_token_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/service_stub.rb deleted file mode 100644 index 09c07447925d..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service/rest/service_stub.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/widget_service_pb" - -module Google - module Cloud - module Ces - module V1beta - module WidgetService - module Rest - ## - # REST service stub for the WidgetService 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 generate_chat_token REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Ces::V1beta::GenerateChatTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse] - # A result object deserialized from the server's reply - def generate_chat_token request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_chat_token_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "generate_chat_token", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse.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 generate_chat_token REST call - # - # @param request_pb [::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_generate_chat_token_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:generateChatToken", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/sessions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_pb.rb deleted file mode 100644 index 707e75b85ccd..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/widget_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/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/ces/v1beta/widget_service.proto\x12\x17google.cloud.ces.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x01\n\x18GenerateChatTokenRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Session\x12\x39\n\ndeployment\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63\x65s.googleapis.com/Deployment\x12\x1c\n\x0frecaptcha_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14live_handoff_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"`\n\x19GenerateChatTokenResponse\x12\x12\n\nchat_token\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xce\x02\n\rWidgetService\x12\xd0\x01\n\x11GenerateChatToken\x12\x31.google.cloud.ces.v1beta.GenerateChatTokenRequest\x1a\x32.google.cloud.ces.v1beta.GenerateChatTokenResponse\"T\x82\xd3\xe4\x93\x02N\"I/v1beta/{name=projects/*/locations/*/apps/*/sessions/*}:generateChatToken:\x01*\x1aj\xca\x41\x12\x63\x65s.googleapis.com\xd2\x41Rhttps://www.googleapis.com/auth/ces,https://www.googleapis.com/auth/cloud-platformBb\n\x1b\x63om.google.cloud.ces.v1betaB\x12WidgetServiceProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - GenerateChatTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.GenerateChatTokenRequest").msgclass - GenerateChatTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.GenerateChatTokenResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_services_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_services_pb.rb deleted file mode 100644 index a34357fafa4c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_service_services_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/ces/v1beta/widget_service.proto for package 'google.cloud.ces.v1beta' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/ces/v1beta/widget_service_pb' - -module Google - module Cloud - module Ces - module V1beta - module WidgetService - # Provides APIs for widgets to interact with CES APIs. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.ces.v1beta.WidgetService' - - # Generates a session scoped token for chat widget to authenticate with - # Session APIs. - rpc :GenerateChatToken, ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest, ::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb b/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb deleted file mode 100644 index 42cf420a2cce..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/lib/google/cloud/ces/v1beta/widget_tool_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/ces/v1beta/widget_tool.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/ces/v1beta/python_function_pb' -require 'google/cloud/ces/v1beta/schema_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n)google/cloud/ces/v1beta/widget_tool.proto\x12\x17google.cloud.ces.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a-google/cloud/ces/v1beta/python_function.proto\x1a$google/cloud/ces/v1beta/schema.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xf4\n\n\nWidgetTool\x12:\n\nparameters\x18\x04 \x01(\x0b\x32\x1f.google.cloud.ces.v1beta.SchemaB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12H\n\x0bwidget_type\x18\x03 \x01(\x0e\x32..google.cloud.ces.v1beta.WidgetTool.WidgetTypeB\x03\xe0\x41\x01\x12/\n\tui_config\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12J\n\x0c\x64\x61ta_mapping\x18\x06 \x01(\x0b\x32/.google.cloud.ces.v1beta.WidgetTool.DataMappingB\x03\xe0\x41\x01\x12Y\n\x14text_response_config\x18\x07 \x01(\x0b\x32\x36.google.cloud.ces.v1beta.WidgetTool.TextResponseConfigB\x03\xe0\x41\x01\x1a\xed\x01\n\x12TextResponseConfig\x12N\n\x04type\x18\x01 \x01(\x0e\x32;.google.cloud.ces.v1beta.WidgetTool.TextResponseConfig.TypeB\x03\xe0\x41\x01\x12\x18\n\x0bstatic_text\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19text_response_instruction\x18\x03 \x01(\tB\x03\xe0\x41\x01\"E\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x11\n\rLLM_GENERATED\x10\x02\x12\n\n\x06STATIC\x10\x03\x1a\xb2\x03\n\x0b\x44\x61taMapping\x12\x1d\n\x10source_tool_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12_\n\x0e\x66ield_mappings\x18\x02 \x03(\x0b\x32\x42.google.cloud.ces.v1beta.WidgetTool.DataMapping.FieldMappingsEntryB\x03\xe0\x41\x01\x12\x45\n\x0fpython_function\x18\x05 \x01(\x0b\x32\'.google.cloud.ces.v1beta.PythonFunctionB\x03\xe0\x41\x01\x12G\n\x04mode\x18\x04 \x01(\x0e\x32\x34.google.cloud.ces.v1beta.WidgetTool.DataMapping.ModeB\x03\xe0\x41\x01\x12\x19\n\rpython_script\x18\x03 \x01(\tB\x02\x18\x01\x1a\x34\n\x12\x46ieldMappingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"B\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x11\n\rFIELD_MAPPING\x10\x01\x12\x11\n\rPYTHON_SCRIPT\x10\x02\"\xac\x02\n\nWidgetType\x12\x1b\n\x17WIDGET_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43USTOM\x10\x01\x12\x14\n\x10PRODUCT_CAROUSEL\x10\x02\x12\x13\n\x0fPRODUCT_DETAILS\x10\x03\x12\x11\n\rQUICK_ACTIONS\x10\x04\x12\x16\n\x12PRODUCT_COMPARISON\x10\x05\x12\x1c\n\x18\x41\x44VANCED_PRODUCT_DETAILS\x10\x06\x12\x0e\n\nSHORT_FORM\x10\x07\x12\x18\n\x14OVERALL_SATISFACTION\x10\x08\x12\x11\n\rORDER_SUMMARY\x10\t\x12\x17\n\x13\x41PPOINTMENT_DETAILS\x10\n\x12\x19\n\x15\x41PPOINTMENT_SCHEDULER\x10\x0b\x12\x10\n\x0c\x43ONTACT_FORM\x10\x0c\x42\x07\n\x05inputB_\n\x1b\x63om.google.cloud.ces.v1betaB\x0fWidgetToolProtoP\x01Z-cloud.google.com/go/ces/apiv1beta/cespb;cespbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Ces - module V1beta - WidgetTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool").msgclass - WidgetTool::TextResponseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.TextResponseConfig").msgclass - WidgetTool::TextResponseConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.TextResponseConfig.Type").enummodule - WidgetTool::DataMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.DataMapping").msgclass - WidgetTool::DataMapping::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode").enummodule - WidgetTool::WidgetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1beta.WidgetTool.WidgetType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/README.md deleted file mode 100644 index fc502f609293..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Gemini Enterprise for Customer Experience 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-ces-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb deleted file mode 100644 index a3e7ea2bfa89..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent.rb +++ /dev/null @@ -1,233 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # An agent acts as the fundamental building block that provides instructions to - # the Large Language Model (LLM) for executing specific tasks. - # @!attribute [rw] llm_agent - # @return [::Google::Cloud::Ces::V1beta::Agent::LlmAgent] - # Optional. The default agent type. - # - # Note: The following fields are mutually exclusive: `llm_agent`, `remote_dialogflow_agent`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] remote_dialogflow_agent - # @return [::Google::Cloud::Ces::V1beta::Agent::RemoteDialogflowAgent] - # Optional. The remote - # [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents) - # agent to be used for the agent execution. If this field is set, all other - # agent level properties will be ignored. - # - # Note: If the Dialogflow agent is in a different project from the app, you - # should grant `roles/dialogflow.client` to the CES service agent - # `service-@gcp-sa-ces.iam.gserviceaccount.com`. - # - # Note: The following fields are mutually exclusive: `remote_dialogflow_agent`, `llm_agent`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the agent. - # Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the agent. - # @!attribute [rw] description - # @return [::String] - # Optional. Human-readable description of the agent. - # @!attribute [rw] model_settings - # @return [::Google::Cloud::Ces::V1beta::ModelSettings] - # Optional. Configurations for the LLM model. - # @!attribute [rw] instruction - # @return [::String] - # Optional. Instructions for the LLM model to guide the agent's behavior. - # @!attribute [rw] tools - # @return [::Array<::String>] - # Optional. List of available tools for the agent. - # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # @!attribute [rw] child_agents - # @return [::Array<::String>] - # Optional. List of child agents in the agent tree. - # Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # @!attribute [rw] before_agent_callbacks - # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] - # Optional. The callbacks to execute before the agent is called. - # The provided callbacks are executed sequentially in the exact order they - # are given in the list. If a callback returns an overridden response, - # execution stops and any remaining callbacks are skipped. - # @!attribute [rw] after_agent_callbacks - # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] - # Optional. The callbacks to execute after the agent is called. - # The provided callbacks are executed sequentially in the exact order they - # are given in the list. If a callback returns an overridden response, - # execution stops and any remaining callbacks are skipped. - # @!attribute [rw] before_model_callbacks - # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] - # Optional. The callbacks to execute before the model is called. If there are - # multiple calls to the model, the callback will be executed multiple times. - # The provided callbacks are executed sequentially in the exact order they - # are given in the list. If a callback returns an overridden response, - # execution stops and any remaining callbacks are skipped. - # @!attribute [rw] after_model_callbacks - # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] - # Optional. The callbacks to execute after the model is called. If there are - # multiple calls to the model, the callback will be executed multiple times. - # The provided callbacks are executed sequentially in the exact order they - # are given in the list. If a callback returns an overridden response, - # execution stops and any remaining callbacks are skipped. - # @!attribute [rw] before_tool_callbacks - # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] - # Optional. The callbacks to execute before the tool is invoked. If there are - # multiple tool invocations, the callback will be executed multiple times. - # The provided callbacks are executed sequentially in the exact order they - # are given in the list. If a callback returns an overridden response, - # execution stops and any remaining callbacks are skipped. - # @!attribute [rw] after_tool_callbacks - # @return [::Array<::Google::Cloud::Ces::V1beta::Callback>] - # Optional. The callbacks to execute after the tool is invoked. If there are - # multiple tool invocations, the callback will be executed multiple times. - # The provided callbacks are executed sequentially in the exact order they - # are given in the list. If a callback returns an overridden response, - # execution stops and any remaining callbacks are skipped. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the agent was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the agent was last updated. - # @!attribute [rw] guardrails - # @return [::Array<::String>] - # Optional. List of guardrails for the agent. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` - # @!attribute [rw] etag - # @return [::String] - # Etag used to ensure the object hasn't changed during a read-modify-write - # operation. If the etag is empty, the update will overwrite any concurrent - # changes. - # @!attribute [rw] toolsets - # @return [::Array<::Google::Cloud::Ces::V1beta::Agent::AgentToolset>] - # Optional. List of toolsets for the agent. - # @!attribute [r] generated_summary - # @return [::String] - # Output only. If the agent is generated by the LLM assistant, this field - # contains a descriptive summary of the generation. - # @!attribute [rw] transfer_rules - # @return [::Array<::Google::Cloud::Ces::V1beta::TransferRule>] - # Optional. Agent transfer rules. - # If multiple rules match, the first one in the list will be used. - # @!attribute [r] validation_errors - # @return [::Array<::String>] - # Output only. Misconfigurations or errors in the agent that may affect agent - # quality. - class Agent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Default agent type. The agent uses instructions and callbacks specified in - # the agent to perform the task using a large language model. - class LlmAgent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The agent which will transfer execution to a remote - # [Dialogflow - # CX](https://docs.cloud.google.com/dialogflow/cx/docs/concept/agent) agent. - # The Dialogflow agent will process subsequent user queries until the session - # ends or flow ends, and the control is transferred back to the parent CES - # agent. - # @!attribute [rw] agent - # @return [::String] - # Required. The - # [Dialogflow](https://docs.cloud.google.com/dialogflow/cx/docs/concept/agent) - # agent resource name. - # Format: `projects/{project}/locations/{location}/agents/{agent}` - # @!attribute [rw] flow_id - # @return [::String] - # Optional. The flow ID of the flow in the Dialogflow agent. - # @!attribute [rw] environment_id - # @return [::String] - # Optional. The environment ID of the Dialogflow agent to be used for the - # agent execution. If not specified, the draft environment will be used. - # @!attribute [rw] input_variable_mapping - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The mapping of the app variables names to the Dialogflow - # session parameters names to be sent to the Dialogflow agent as input. - # @!attribute [rw] output_variable_mapping - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The mapping of the Dialogflow session parameters names to the - # app variables names to be sent back to the CES agent after the Dialogflow - # agent execution ends. - # @!attribute [rw] respect_response_interruption_settings - # @return [::Boolean] - # Optional. Indicates whether to respect the message-level interruption - # settings configured in the Dialogflow agent. - # - # * If false: all response messages from the Dialogflow agent follow the - # app-level barge-in settings. - # * If true: only response messages with - # [`allow_playback_interruption`](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#text) - # set to true will be interruptable, all other messages follow the - # app-level barge-in settings. - # @!attribute [rw] language_code_variable - # @return [::String] - # Optional. The name of the variable that contains the language code to be - # used for the Dialogflow session. If unspecified, the default language - # code of the Dialogflow agent will be used. - class RemoteDialogflowAgent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class InputVariableMappingEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class OutputVariableMappingEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A toolset with a selection of its tools. - # @!attribute [rw] toolset - # @return [::String] - # Required. The resource name of the toolset. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - # @!attribute [rw] tool_ids - # @return [::Array<::String>] - # Optional. The tools IDs to filter the toolset. - class AgentToolset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb deleted file mode 100644 index 9290691ca595..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_service.rb +++ /dev/null @@ -1,1682 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_apps AgentService.ListApps}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location to list apps from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListAppsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_apps AgentService.ListApps} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the apps. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - class ListAppsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_apps AgentService.ListApps}. - # @!attribute [rw] apps - # @return [::Array<::Google::Cloud::Ces::V1beta::App>] - # The list of apps. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListAppsRequest#page_token ListAppsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Locations that could not be reached. - class ListAppsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_app AgentService.GetApp}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the app to retrieve. - class GetAppRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_app AgentService.CreateApp}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location to create an app in. - # @!attribute [rw] app_id - # @return [::String] - # Optional. The ID to use for the app, which will become the final component - # of the app's resource name. If not provided, a unique ID will be - # automatically assigned for the app. - # @!attribute [rw] app - # @return [::Google::Cloud::Ces::V1beta::App] - # Required. The app to create. - class CreateAppRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_app AgentService.UpdateApp}. - # @!attribute [rw] app - # @return [::Google::Cloud::Ces::V1beta::App] - # Required. The app to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateAppRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_app AgentService.DeleteApp}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the app to delete. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the app. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the app, deletion will be blocked and an - # ABORTED error will be returned. - class DeleteAppRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#export_app AgentService.ExportApp}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the app to export. - # @!attribute [rw] export_format - # @return [::Google::Cloud::Ces::V1beta::ExportAppRequest::ExportFormat] - # Required. The format to export the app in. - # @!attribute [rw] gcs_uri - # @return [::String] - # Optional. The [Google Cloud - # Storage](https://cloud.google.com/storage/docs/) URI to which to export the - # app. The format of this URI must be `gs:///`. The - # exported app archive will be written directly to the specified GCS object. - # @!attribute [rw] app_version - # @return [::String] - # Optional. The resource name of the app version to export. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. - class ExportAppRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Export format for the app. - module ExportFormat - # The export format is unspecified. - EXPORT_FORMAT_UNSPECIFIED = 0 - - # The export format is JSON. - JSON = 1 - - # The export format is YAML. - YAML = 2 - end - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#export_app AgentService.ExportApp}. - # @!attribute [rw] app_content - # @return [::String] - # App folder compressed as a zip file. - # - # Note: The following fields are mutually exclusive: `app_content`, `app_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] app_uri - # @return [::String] - # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - # to which the app was exported. - # - # Note: The following fields are mutually exclusive: `app_uri`, `app_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExportAppResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#import_app AgentService.ImportApp}. - # @!attribute [rw] gcs_uri - # @return [::String] - # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - # from which to import app. The format of this URI must be - # `gs:///`. - # - # Note: The following fields are mutually exclusive: `gcs_uri`, `app_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] app_content - # @return [::String] - # Raw bytes representing the compressed zip file with the app folder - # structure. - # - # Note: The following fields are mutually exclusive: `app_content`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name with the location of the app to import. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the app to import. - # * If the app is created on import, and the display name is specified, - # the imported app will use this display name. If a conflict is detected - # with an existing app, a timestamp will be appended to the display name - # to make it unique. - # * If the app is a reimport, this field should not be set. Providing a - # display name during reimport will result in an INVALID_ARGUMENT error. - # @!attribute [rw] app_id - # @return [::String] - # Optional. The ID to use for the imported app. - # * If not specified, a unique ID will be automatically assigned for - # the app. - # * Otherwise, the imported app will use this ID as the final component of - # its resource name. If an app with the same ID already exists at the - # specified location in the project, the content of the existing app will be - # replaced. - # @!attribute [rw] import_options - # @return [::Google::Cloud::Ces::V1beta::ImportAppRequest::ImportOptions] - # Optional. Options governing the import process for the app. - # @!attribute [rw] ignore_app_lock - # @return [::Boolean] - # Optional. Flag for overriding the app lock during import. - # If set to true, the import process will ignore the app lock. - class ImportAppRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration options for the app import process. - # These options control how the import behaves, particularly when - # conflicts arise with existing app data. - # @!attribute [rw] conflict_resolution_strategy - # @return [::Google::Cloud::Ces::V1beta::ImportAppRequest::ImportOptions::ConflictResolutionStrategy] - # Optional. The strategy to use when resolving conflicts during import. - class ImportOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the strategy for handling conflicts when an app with the same ID - # already exists, or when imported resources (like Agents, Tools, etc.) - # have the same display names as existing resources within that app. - module ConflictResolutionStrategy - # The conflict resolution strategy is unspecified. - CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED = 0 - - # Replace existing data with imported data. - # If an app with the same `app_id` already exists, its content will be - # updated based on the imported app. - # - Resources (App, Agents, Tools, Examples, Guardrails, Toolsets) in the - # imported app that have the same display name as existing resources - # will overwrite the existing ones. - # - Imported resources with new display names will be created. - # - Existing resources that do not have a matching display name in the - # imported app will remain untouched. - REPLACE = 1 - - # Overwrite existing data with imported data. - # If an app with the same `app_id` already exists, its content will be - # overwritten with the imported app. - # - Existing resources (Agents, Tools, Examples, Guardrails, Toolsets) in - # the app will be deleted. - # - Imported resources will be created as new resources. - OVERWRITE = 2 - end - end - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#import_app AgentService.ImportApp}. - # @!attribute [rw] name - # @return [::String] - # The resource name of the app that was imported. - # @!attribute [rw] warnings - # @return [::Array<::String>] - # Warning messages generated during the import process. - # If errors occur for specific resources, they will not be included in the - # imported app and the error will be mentioned here. - class ImportAppResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_agents AgentService.ListAgents}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list agents from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListAgentsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_agents AgentService.ListAgents} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the agents. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - class ListAgentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_agents AgentService.ListAgents}. - # @!attribute [rw] agents - # @return [::Array<::Google::Cloud::Ces::V1beta::Agent>] - # The list of agents. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListAgentsRequest#page_token ListAgentsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListAgentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_agent AgentService.GetAgent}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the agent to retrieve. - class GetAgentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_agent AgentService.CreateAgent}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to create an agent in. - # @!attribute [rw] agent_id - # @return [::String] - # Optional. The ID to use for the agent, which will become the final - # component of the agent's resource name. If not provided, a unique ID will - # be automatically assigned for the agent. - # @!attribute [rw] agent - # @return [::Google::Cloud::Ces::V1beta::Agent] - # Required. The agent to create. - class CreateAgentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_agent AgentService.UpdateAgent}. - # @!attribute [rw] agent - # @return [::Google::Cloud::Ces::V1beta::Agent] - # Required. The agent to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateAgentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_agent AgentService.DeleteAgent}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the agent to delete. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. Indicates whether to forcefully delete the agent, even if it is - # still referenced by other app/agents/examples. - # - # * If `force = false`, the deletion fails if other agents/examples - # reference it. - # * If `force = true`, delete the agent and remove it from all referencing - # apps/agents/examples. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the agent. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the agent, deletion will be blocked and - # an ABORTED error will be returned. - class DeleteAgentRequest - 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] 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 - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, - # corresponding to `Code.CANCELLED`. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_examples AgentService.ListExamples}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list examples from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListExamplesResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_examples AgentService.ListExamples} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the examples. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - class ListExamplesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_examples AgentService.ListExamples}. - # @!attribute [rw] examples - # @return [::Array<::Google::Cloud::Ces::V1beta::Example>] - # The list of examples. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListExamplesRequest#page_token ListExamplesRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListExamplesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_example AgentService.GetExample}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the example to retrieve. - class GetExampleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_example AgentService.CreateExample}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to create an example in. - # @!attribute [rw] example_id - # @return [::String] - # Optional. The ID to use for the example, which will become the final - # component of the example's resource name. If not provided, a unique ID will - # be automatically assigned for the example. - # @!attribute [rw] example - # @return [::Google::Cloud::Ces::V1beta::Example] - # Required. The example to create. - class CreateExampleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_example AgentService.UpdateExample}. - # @!attribute [rw] example - # @return [::Google::Cloud::Ces::V1beta::Example] - # Required. The example to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateExampleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_example AgentService.DeleteExample}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the example to delete. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the example. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the example, deletion will be blocked - # and an ABORTED error will be returned. - class DeleteExampleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_tools AgentService.ListTools}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list tools from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListToolsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_tools AgentService.ListTools} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the tools. Use - # "include_system_tools=true" to include system tools in the response. See - # https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - class ListToolsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_tools AgentService.ListTools}. - # @!attribute [rw] tools - # @return [::Array<::Google::Cloud::Ces::V1beta::Tool>] - # The list of tools. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListToolsRequest#page_token ListToolsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListToolsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_tool AgentService.GetTool}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the tool to retrieve. - class GetToolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_tool AgentService.CreateTool}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to create a tool in. - # @!attribute [rw] tool_id - # @return [::String] - # Optional. The ID to use for the tool, which will become the final component - # of the tool's resource name. If not provided, a unique ID will be - # automatically assigned for the tool. - # @!attribute [rw] tool - # @return [::Google::Cloud::Ces::V1beta::Tool] - # Required. The tool to create. - class CreateToolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_tool AgentService.UpdateTool}. - # @!attribute [rw] tool - # @return [::Google::Cloud::Ces::V1beta::Tool] - # Required. The tool to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateToolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_tool AgentService.DeleteTool}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the tool to delete. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. Indicates whether to forcefully delete the tool, even if it is - # still referenced by agents/examples. - # - # * If `force = false`, the deletion will fail if any agents still - # reference the tool. - # * If `force = true`, all existing references from agents will be removed - # and the tool will be deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the tool. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the tool, deletion will be blocked and - # an ABORTED error will be returned. - class DeleteToolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations AgentService.ListConversations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list conversations from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListConversationsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations AgentService.ListConversations} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the conversations. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] source - # @return [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, Source.Live - # will be applied by default. Will be deprecated in favor of `sources` field. - # @!attribute [rw] sources - # @return [::Array<::Google::Cloud::Ces::V1beta::Conversation::Source>] - # Optional. Indicate the sources of the conversations. If not set, all - # available sources will be applied by default. - class ListConversationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations AgentService.ListConversations}. - # @!attribute [rw] conversations - # @return [::Array<::Google::Cloud::Ces::V1beta::Conversation>] - # The list of conversations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListConversationsRequest#page_token ListConversationsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListConversationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_conversation AgentService.GetConversation}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the conversation to retrieve. - # @!attribute [rw] source - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, all source - # will be searched. - class GetConversationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_conversation AgentService.DeleteConversation}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the conversation to delete. - # @!attribute [rw] source - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, Source.Live - # will be applied by default. - class DeleteConversationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#batch_delete_conversations AgentService.BatchDeleteConversations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to delete conversations from. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] conversations - # @return [::Array<::String>] - # Required. The resource names of the conversations to delete. - class BatchDeleteConversationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#batch_delete_conversations AgentService.BatchDeleteConversations}. - # @!attribute [rw] deleted_conversations - # @return [::Array<::String>] - # The list of conversations that were successfully deleted. - # @!attribute [rw] failed_conversations - # @return [::Array<::String>] - # The list of conversations that failed to be deleted. - # @!attribute [rw] error_messages - # @return [::Array<::String>] - # Optional. A list of error messages associated with conversations that - # failed to be deleted. - class BatchDeleteConversationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails AgentService.ListGuardrails}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list guardrails from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListGuardrailsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails AgentService.ListGuardrails} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the guardrails. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - class ListGuardrailsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails AgentService.ListGuardrails}. - # @!attribute [rw] guardrails - # @return [::Array<::Google::Cloud::Ces::V1beta::Guardrail>] - # The list of guardrails. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListGuardrailsRequest#page_token ListGuardrailsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListGuardrailsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_guardrail AgentService.GetGuardrail}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the guardrail to retrieve. - class GetGuardrailRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_guardrail AgentService.CreateGuardrail}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to create a guardrail in. - # @!attribute [rw] guardrail_id - # @return [::String] - # Optional. The ID to use for the guardrail, which will become the final - # component of the guardrail's resource name. If not provided, a unique ID - # will be automatically assigned for the guardrail. - # @!attribute [rw] guardrail - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # Required. The guardrail to create. - class CreateGuardrailRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_guardrail AgentService.UpdateGuardrail}. - # @!attribute [rw] guardrail - # @return [::Google::Cloud::Ces::V1beta::Guardrail] - # Required. The guardrail to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateGuardrailRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_guardrail AgentService.DeleteGuardrail}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the guardrail to delete. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. Indicates whether to forcefully delete the guardrail, even if it - # is still referenced by app/agents. - # - # * If `force = false`, the deletion fails if any apps/agents still - # reference the guardrail. - # * If `force = true`, all existing references from apps/agents will be - # removed and the guardrail will be deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the guardrail. If an etag is not provided, - # the deletion will overwrite any concurrent changes. If an etag is provided - # and does not match the current etag of the guardrail, deletion will be - # blocked and an ABORTED error will be returned. - class DeleteGuardrailRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_deployments AgentService.ListDeployments}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent app. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of deployments to return. The service may - # return fewer than this value. If unspecified, at most 50 deployments will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeployments` must - # match the call that provided the page token. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - class ListDeploymentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_deployments AgentService.ListDeployments}. - # @!attribute [rw] deployments - # @return [::Array<::Google::Cloud::Ces::V1beta::Deployment>] - # The list of deployments. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDeploymentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_deployment AgentService.GetDeployment}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - class GetDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_deployment AgentService.CreateDeployment}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent app. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] deployment_id - # @return [::String] - # Optional. The ID to use for the deployment, which will become the final - # component of the deployment's resource name. If not provided, a unique ID - # will be automatically assigned for the deployment. - # @!attribute [rw] deployment - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # Required. The deployment to create. - class CreateDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_deployment AgentService.UpdateDeployment}. - # @!attribute [rw] deployment - # @return [::Google::Cloud::Ces::V1beta::Deployment] - # Required. The deployment to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update. - class UpdateDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_deployment AgentService.DeleteDeployment}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to delete. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the deployment. - # If an etag is provided and does not match the current etag of the - # deployment, deletion will be blocked and an ABORTED error will be returned. - class DeleteDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets AgentService.ListToolsets}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list toolsets from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListToolsetsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets AgentService.ListToolsets} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the toolsets. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - class ListToolsetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets AgentService.ListToolsets}. - # @!attribute [rw] toolsets - # @return [::Array<::Google::Cloud::Ces::V1beta::Toolset>] - # The list of toolsets. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListToolsetsRequest#page_token ListToolsetsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListToolsetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_toolset AgentService.GetToolset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the toolset to retrieve. - class GetToolsetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_toolset AgentService.CreateToolset}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to create a toolset in. - # @!attribute [rw] toolset_id - # @return [::String] - # Optional. The ID to use for the toolset, which will become the final - # component of the toolset's resource name. If not provided, a unique ID will - # be automatically assigned for the toolset. - # @!attribute [rw] toolset - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # Required. The toolset to create. - class CreateToolsetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_toolset AgentService.UpdateToolset}. - # @!attribute [rw] toolset - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # Required. The toolset to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateToolsetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_toolset AgentService.DeleteToolset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the toolset to delete. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. Indicates whether to forcefully delete the toolset, even if it is - # still referenced by app/agents. - # - # * If `force = false`, the deletion fails if any agents still - # reference the toolset. - # * If `force = true`, all existing references from agents will be - # removed and the toolset will be deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the toolset. If an etag is not provided, the - # deletion will overwrite any concurrent changes. If an etag is provided and - # does not match the current etag of the toolset, deletion will be blocked - # and an ABORTED error will be returned. - class DeleteToolsetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions AgentService.ListAppVersions}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list app versions from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListAppVersionsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions AgentService.ListAppVersions} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the app versions. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - class ListAppVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions AgentService.ListAppVersions}. - # @!attribute [rw] app_versions - # @return [::Array<::Google::Cloud::Ces::V1beta::AppVersion>] - # The list of app versions. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListAppVersionsRequest#page_token ListAppVersionsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListAppVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_app_version AgentService.GetAppVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the app version to retrieve. - class GetAppVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#delete_app_version AgentService.DeleteAppVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the app version to delete. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the app version. If an etag is not provided, - # the deletion will overwrite any concurrent changes. If an etag is provided - # and does not match the current etag of the app version, deletion will be - # blocked and an ABORTED error will be returned. - class DeleteAppVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#create_app_version AgentService.CreateAppVersion} - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to create an app version in. - # @!attribute [rw] app_version_id - # @return [::String] - # Optional. The ID to use for the app version, which will become the final - # component of the app version's resource name. If not provided, a unique ID - # will be automatically assigned for the app version. - # @!attribute [rw] app_version - # @return [::Google::Cloud::Ces::V1beta::AppVersion] - # Required. The app version to create. - class CreateAppVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#restore_app_version AgentService.RestoreAppVersion} - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the app version to restore. - class RestoreAppVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#restore_app_version AgentService.RestoreAppVersion} - class RestoreAppVersionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource AgentService.GenerateAppResource}. - # @!attribute [rw] agent - # @return [::Google::Cloud::Ces::V1beta::Agent] - # The agent resource to be used by the LLM assistant, can be empty for - # generating a new agent. - # - # Note: The following fields are mutually exclusive: `agent`, `tool`, `toolset`, `app_version_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tool - # @return [::Google::Cloud::Ces::V1beta::Tool] - # The tool resource to be used by the LLM assistant, can be empty for - # generating a new tool. - # - # Note: The following fields are mutually exclusive: `tool`, `agent`, `toolset`, `app_version_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] toolset - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # The toolset resource to be used by the LLM assistant, can be empty for - # generating a new toolset. - # - # Note: The following fields are mutually exclusive: `toolset`, `agent`, `tool`, `app_version_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] app_version_context - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppVersionContext] - # The app version context specifying the base snapshot and target agent. - # - # Note: The following fields are mutually exclusive: `app_version_context`, `agent`, `tool`, `toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to generate the resource for. - # @!attribute [rw] refine_instructions - # @return [::Array<::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::RefineInstructions>] - # Optional. List of refine instructions to be used to refine the resource. - # @!attribute [rw] tool_generation_config - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig] - # Optional. The configuration to be used to generate the tool. - # @!attribute [rw] app_generation_config - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppGenerationConfig] - # Optional. The configuration to be used to generate the agents and tools. - # @!attribute [rw] evaluation_generation_config - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationGenerationConfig] - # Optional. The configuration to be used to generate the evaluations. - # @!attribute [rw] evaluation_personas_generation_config - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationPersonasGenerationConfig] - # Optional. The configuration to be used to generate the evaluation personas. - # @!attribute [rw] quality_report_generation_config - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::QualityReportGenerationConfig] - # Optional. The configuration to be used for quality report generation. - # @!attribute [rw] hill_climbing_fix_config - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::HillClimbingFixConfig] - # Optional. The configuration to be used for hill climbing fixes. - class GenerateAppResourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The app version context specifying the base snapshot and target agent. - # @!attribute [rw] app_version - # @return [::String] - # The resource name of the app version to be used by the LLM assistant. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # @!attribute [rw] agent_resource_name - # @return [::String] - # The resource name of the target agent to be used by the LLM assistant. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - class AppVersionContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The instructions to be used to refine a part of the resource. The part of - # the resource can be specified with a start index, end index and a field - # mask. For example, if you want to refine a part of the agent instructions - # you can specify the index of the first character of the instructions, the - # index of the last character of the instructions and the field mask as - # "instructions". - # @!attribute [rw] start_index - # @return [::Integer] - # Required. The first character (inclusive) of the text to refine. - # @!attribute [rw] end_index - # @return [::Integer] - # Required. The last character (inclusive) of the text to refine. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The field of the resource being refined. Only one field is - # allowed per RefineInstructions. If refining agent instructions, the field - # mask should be "instructions". - # @!attribute [rw] instructions - # @return [::String] - # Required. The instructions to refine the resource. - class RefineInstructions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration to be used to generate a tool. - # @!attribute [rw] context - # @return [::String] - # Optional. The context which describes the tool to be generated. This can - # be empty if the tool request & response are provided. - # @!attribute [rw] file_contexts - # @return [::Array<::Google::Cloud::Ces::V1beta::FileContext>] - # Optional. The files to be used as context. - # @!attribute [rw] open_api_toolset_generation_config - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig::OpenApiToolsetGenerationConfig] - # Optional. The configuration to be used to generate an Open API schema. - class ToolGenerationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration to be used to generate an Open API schema. - # @!attribute [rw] uri - # @return [::String] - # Required. The base uri of the tool. - # @!attribute [rw] operation_generation_configs - # @return [::Array<::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig::OpenApiToolsetGenerationConfig::OperationGenerationConfig>] - # Required. The list of operations to be added to the Open API schema. - class OpenApiToolsetGenerationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration to be used to generate an operation in the Open API - # schema. - # @!attribute [rw] method - # @return [::String] - # Required. The uri of the tool. This should include query and path - # parameters if any. - # @!attribute [rw] path - # @return [::String] - # Required. The path of the tool to be appended to the base uri. This - # should include query and path parameters if any. - # @!attribute [rw] request_json - # @return [::String] - # Required. A sample request to the tool in JSON format. Skip if the - # tool does not support request body. - # @!attribute [rw] response_json - # @return [::String] - # Required. A sample response from the tool in JSON format. - class OperationGenerationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # The configuration to be used to generate the app. - # @!attribute [rw] context - # @return [::String] - # Optional. The context which describes the requirements of the agents & - # tools to be generated. - # @!attribute [rw] file_contexts - # @return [::Array<::Google::Cloud::Ces::V1beta::FileContext>] - # Optional. The files to be used as context. - # @!attribute [rw] dataset_id - # @return [::String] - # Optional. The insights dataset to be used to fetch conversation data for - # generating the agents & tools. - # Format: - # `projects/{project}/locations/{location}/datasets/{dataset}`. - # @!attribute [rw] generate_evaluations - # @return [::Boolean] - # Optional. Whether to generate the evaluations for the app. If true, the - # provided context will be used to generate the evaluations data. - # @!attribute [rw] gcs_location - # @return [::String] - # Optional. The Cloud Storage location to store the generated question - # answer data to be used by the Datastore tool. This data is generated only - # when using conversation data as an input source. The location must be - # in the same project as the app. - # Format: `gs://...`. - class AppGenerationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration to be used to generate the evaluations. - # @!attribute [rw] dataset_id - # @return [::String] - # Optional. The insights dataset to be used to fetch conversation data for - # generating the evaluations. - # Format: - # `projects/{project}/locations/{location}/datasets/{dataset}`. - class EvaluationGenerationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration to be used to generate the evaluation personas. - class EvaluationPersonasGenerationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration to be used for quality report generation. - # @!attribute [rw] evaluation_run - # @return [::String] - # Required. The evaluation run used to inform quality report analysis. - class QualityReportGenerationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration to be used for hill climbing fixes. - # @!attribute [rw] quality_report - # @return [::Google::Cloud::Ces::V1beta::QualityReport] - # Required. The quality report used to inform the instruction following - # fix. - class HillClimbingFixConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource AgentService.GenerateAppResource}. - # @!attribute [rw] agent - # @return [::Google::Cloud::Ces::V1beta::Agent] - # Agent generated by the LLM assistant. - # - # Note: The following fields are mutually exclusive: `agent`, `toolset`, `app_snapshot`, `tools`, `evaluations`, `app_resources`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] toolset - # @return [::Google::Cloud::Ces::V1beta::Toolset] - # Toolset generated by the LLM assistant. Supports Open API toolset schema - # generation. - # - # Note: The following fields are mutually exclusive: `toolset`, `agent`, `app_snapshot`, `tools`, `evaluations`, `app_resources`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] app_snapshot - # @return [::Google::Cloud::Ces::V1beta::AppSnapshot] - # App snapshot generated by the LLM assistant. This snapshot contains the - # app, agents & tools generated by the LLM assistant. - # - # Note: The following fields are mutually exclusive: `app_snapshot`, `agent`, `toolset`, `tools`, `evaluations`, `app_resources`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tools - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceResponse::Tools] - # The list of tools generated by the LLM assistant. - # - # Note: The following fields are mutually exclusive: `tools`, `agent`, `toolset`, `app_snapshot`, `evaluations`, `app_resources`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] evaluations - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceResponse::Evaluations] - # Evaluations generated by the LLM assistant. - # - # Note: The following fields are mutually exclusive: `evaluations`, `agent`, `toolset`, `app_snapshot`, `tools`, `app_resources`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] app_resources - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceResponse::AppResources] - # The app resources generated by the LLM assistant. - # - # Note: The following fields are mutually exclusive: `app_resources`, `agent`, `toolset`, `app_snapshot`, `tools`, `evaluations`, `quality_report`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] quality_report - # @return [::Google::Cloud::Ces::V1beta::QualityReport] - # The quality report generated by the LLM assistant. - # - # Note: The following fields are mutually exclusive: `quality_report`, `agent`, `toolset`, `app_snapshot`, `tools`, `evaluations`, `app_resources`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] generate_result_info - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceResponse::GenerateResultInfo] - # Additional information about the generated result. - class GenerateAppResourceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of evaluations generated by the LLM assistant. - # @!attribute [rw] evaluations - # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation>] - # The list of generated evaluations. - class Evaluations - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The list of tools generated by the LLM assistant. - # @!attribute [rw] tools - # @return [::Array<::Google::Cloud::Ces::V1beta::Tool>] - # The list of tools generated by the LLM assistant. - class Tools - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The list of app resources generated by the LLM assistant. - # @!attribute [rw] app_snapshot - # @return [::Google::Cloud::Ces::V1beta::AppSnapshot] - # The app snapshot generated by the LLM assistant. This snapshot contains - # the app, agents & tools generated by the LLM assistant. - # @!attribute [rw] evaluations - # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation>] - # The list of evaluations generated by the LLM assistant. - class AppResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This provides additional information about the generated result. - # @!attribute [rw] explanation - # @return [::String] - # An explanation of the changes in the generated resource. - class GenerateResultInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The report describing any identified quality issues in the app. - # @!attribute [rw] issues - # @return [::Array<::Google::Cloud::Ces::V1beta::QualityReport::AgentIssues>] - # Optional. The issues grouped by agent. - # @!attribute [rw] evaluation_runs - # @return [::Array<::String>] - # Optional. A list of evaluation runs used to generate the quality report. - # Format: - # `projects/{project}/locations/{location}/evaluationRuns/{evaluationRun}`. - # @!attribute [rw] general_issues - # @return [::Array<::Google::Cloud::Ces::V1beta::QualityReport::Issue>] - # Optional. General issues not specific to any agent. - class QualityReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The issue identified. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the issue found. - # @!attribute [rw] occurrence_count - # @return [::Integer] - # Optional. How many times this issue occurred. - # @!attribute [rw] proposed_solution - # @return [::String] - # Optional. Proposed solution to fix the issue by modifying instructions or - # tools. - class Issue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Issues identified for a single agent. - # @!attribute [rw] agent - # @return [::String] - # Optional. The name of the agent to which the issues are related. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # @!attribute [rw] issues - # @return [::Array<::Google::Cloud::Ces::V1beta::QualityReport::Issue>] - # Optional. List of issues found for this agent. - class AgentIssues - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Operation metadata for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource AgentService.GenerateAppResource}. - # @!attribute [r] generation_type - # @return [::Google::Cloud::Ces::V1beta::GenerateAppResourceOperationMetadata::GenerationType] - # Output only. The type of the operation. - # @!attribute [r] message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!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. The resource name of the app that the operation is associated - # with. Format: `projects/{project}/locations/{location}/apps/{app}`. - # @!attribute [r] partial_errors - # @return [::Array<::Google::Rpc::Status>] - # Output only. Error messages from the resource generation process. - class GenerateAppResourceOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the generation operation. - module GenerationType - # Unspecified operation type. - GENERATION_TYPE_UNSPECIFIED = 0 - - # Agent instruction restructure type. - AGENT_RESTRUCTURE = 1 - - # Agent instruction refinement type. - AGENT_REFINE = 2 - - # Agent creation from type. - AGENT_CREATE = 3 - - # Tool creation type. - TOOL_CREATE = 4 - - # Scenario creation type. - SCENARIO_CREATE = 5 - - # Scenario creation from transcripts type. - SCENARIO_CREATE_FROM_TRANSCRIPTS = 7 - - # Evaluation persona generation type. - EVALUATION_PERSONA_CREATE = 6 - - # Quality report generation type. - QUALITY_REPORT_CREATE = 8 - - # Instruction following fix type (used for hill climbing fixes). - INSTRUCTION_FOLLOWING_FIX = 9 - end - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs AgentService.ListChangelogs}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list changelogs from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListChangelogsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs AgentService.ListChangelogs} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the changelogs. - # See https://google.aip.dev/160 for more details. - # - # The filter string can be used to filter by `action`, `resource_type`, - # `resource_name`, `author`, and `create_time`. - # The `:` comparator can be used for case-insensitive partial matching on - # string fields, while `=` performs an exact case-sensitive match. - # - # Examples: - # * `action:update` (case-insensitive partial match) - # * `action="Create"` (case-sensitive exact match) - # * `resource_type:agent` - # * `resource_name:my-agent` - # * `author:me@example.com` - # * `create_time > "2025-01-01T00:00:00Z"` - # * `create_time <= "2025-01-01T00:00:00Z" AND resource_type:tool` - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time" is supported. - # See https://google.aip.dev/132#ordering for more details. - class ListChangelogsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs AgentService.ListChangelogs}. - # @!attribute [rw] changelogs - # @return [::Array<::Google::Cloud::Ces::V1beta::Changelog>] - # The list of changelogs. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListChangelogsRequest#page_token ListChangelogsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListChangelogsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_changelog AgentService.GetChangelog}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the changelog to retrieve. - class GetChangelogRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#get_security_settings AgentService.GetSecuritySettings}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the security settings to retrieve. - # Format: `projects/{project}/locations/{location}/securitySettings` - class GetSecuritySettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::AgentService::Client#update_security_settings AgentService.UpdateSecuritySettings}. - # @!attribute [rw] security_settings - # @return [::Google::Cloud::Ces::V1beta::SecuritySettings] - # Required. The security settings to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateSecuritySettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_tool.rb deleted file mode 100644 index 862c7b0e038f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_tool.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # Represents a tool that allows the agent to call another agent. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the agent tool. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the tool's purpose. - # @!attribute [rw] root_agent - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. Deprecated: Use `agent` instead. - # The resource name of the root agent that is the entry point of the tool. - # Format: `projects/{project}/locations/{location}/agents/{agent}` - # @!attribute [rw] agent - # @return [::String] - # Optional. The resource name of the agent that is the entry point of the - # tool. Format: `projects/{project}/locations/{location}/agents/{agent}` - class AgentTool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_transfers.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_transfers.rb deleted file mode 100644 index 22e4ddb01a65..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/agent_transfers.rb +++ /dev/null @@ -1,111 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Expression condition based on session state. - # @!attribute [rw] expression - # @return [::String] - # Required. The string representation of cloud.api.Expression condition. - class ExpressionCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Python code block to evaluate the condition. - # @!attribute [rw] python_code - # @return [::String] - # Required. The python code to execute. - class PythonCodeCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Rule for transferring to a specific agent. - # @!attribute [rw] deterministic_transfer - # @return [::Google::Cloud::Ces::V1beta::TransferRule::DeterministicTransfer] - # Optional. A rule that immediately transfers to the target agent when the - # condition is met. - # - # Note: The following fields are mutually exclusive: `deterministic_transfer`, `disable_planner_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disable_planner_transfer - # @return [::Google::Cloud::Ces::V1beta::TransferRule::DisablePlannerTransfer] - # Optional. Rule that prevents the planner from transferring to the target - # agent. - # - # Note: The following fields are mutually exclusive: `disable_planner_transfer`, `deterministic_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] child_agent - # @return [::String] - # Required. The resource name of the child agent the rule applies to. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # @!attribute [rw] direction - # @return [::Google::Cloud::Ces::V1beta::TransferRule::Direction] - # Required. The direction of the transfer. - class TransferRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Deterministic transfer rule. When the condition evaluates to true, the - # transfer occurs. - # @!attribute [rw] expression_condition - # @return [::Google::Cloud::Ces::V1beta::ExpressionCondition] - # Optional. A rule that evaluates a session state condition. - # If the condition evaluates to true, the transfer occurs. - # - # Note: The following fields are mutually exclusive: `expression_condition`, `python_code_condition`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] python_code_condition - # @return [::Google::Cloud::Ces::V1beta::PythonCodeCondition] - # Optional. A rule that uses Python code block to evaluate the - # conditions. If the condition evaluates to true, the transfer occurs. - # - # Note: The following fields are mutually exclusive: `python_code_condition`, `expression_condition`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DeterministicTransfer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A rule that prevents the planner from transferring to the target agent. - # @!attribute [rw] expression_condition - # @return [::Google::Cloud::Ces::V1beta::ExpressionCondition] - # Required. If the condition evaluates to true, planner will not be allowed - # to transfer to the target agent. - class DisablePlannerTransfer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The direction of the transfer. - module Direction - # Unspecified direction. - DIRECTION_UNSPECIFIED = 0 - - # Transfer from the parent agent to the child agent. - PARENT_TO_CHILD = 1 - - # Transfer from the child agent to the parent agent. - CHILD_TO_PARENT = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb deleted file mode 100644 index bc4fbb0dcbdc..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app.rb +++ /dev/null @@ -1,883 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # An app serves as a top-level container for a group of agents, including the - # root agent and its sub-agents, along with their associated configurations. - # These agents work together to achieve specific goals within the app's - # context. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the app. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the app. - # @!attribute [rw] description - # @return [::String] - # Optional. Human-readable description of the app. - # @!attribute [rw] pinned - # @return [::Boolean] - # Optional. Whether the app is pinned in the app list. - # @!attribute [rw] root_agent - # @return [::String] - # Optional. The root agent is the entry point of the app. - # Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # @!attribute [rw] language_settings - # @return [::Google::Cloud::Ces::V1beta::LanguageSettings] - # Optional. Language settings of the app. - # @!attribute [rw] time_zone_settings - # @return [::Google::Cloud::Ces::V1beta::TimeZoneSettings] - # Optional. TimeZone settings of the app. - # @!attribute [rw] audio_processing_config - # @return [::Google::Cloud::Ces::V1beta::AudioProcessingConfig] - # Optional. Audio processing configuration of the app. - # @!attribute [rw] logging_settings - # @return [::Google::Cloud::Ces::V1beta::LoggingSettings] - # Optional. Logging settings of the app. - # @!attribute [rw] error_handling_settings - # @return [::Google::Cloud::Ces::V1beta::ErrorHandlingSettings] - # Optional. Error handling settings of the app. - # @!attribute [rw] model_settings - # @return [::Google::Cloud::Ces::V1beta::ModelSettings] - # Optional. The default LLM model settings for the app. - # Individual resources (e.g. agents, guardrails) can override these - # configurations as needed. - # @!attribute [rw] tool_execution_mode - # @return [::Google::Cloud::Ces::V1beta::App::ToolExecutionMode] - # Optional. The tool execution mode for the app. If not provided, will - # default to PARALLEL. - # @!attribute [rw] evaluation_metrics_thresholds - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds] - # Optional. The evaluation thresholds for the app. - # @!attribute [rw] variable_declarations - # @return [::Array<::Google::Cloud::Ces::V1beta::App::VariableDeclaration>] - # Optional. The declarations of the variables. - # @!attribute [r] predefined_variable_declarations - # @return [::Array<::Google::Cloud::Ces::V1beta::App::VariableDeclaration>] - # Output only. The declarations of predefined variables for the app. - # @!attribute [rw] global_instruction - # @return [::String] - # Optional. Instructions for all the agents in the app. - # You can use this instruction to set up a stable identity or personality - # across all the agents. - # @!attribute [rw] guardrails - # @return [::Array<::String>] - # Optional. List of guardrails for the app. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` - # @!attribute [rw] data_store_settings - # @return [::Google::Cloud::Ces::V1beta::DataStoreSettings] - # Optional. The data store settings for the app. - # @!attribute [rw] default_channel_profile - # @return [::Google::Cloud::Ces::V1beta::ChannelProfile] - # Optional. The default channel profile used by the app. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Metadata about the app. This field can be used to store - # additional information relevant to the app's details or intended usages. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the app was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the app was last updated. - # @!attribute [r] etag - # @return [::String] - # Output only. Etag used to ensure the object hasn't changed during a - # read-modify-write operation. If the etag is empty, the update will - # overwrite any concurrent changes. - # @!attribute [r] deployment_count - # @return [::Integer] - # Output only. Number of deployments in the app. - # @!attribute [rw] client_certificate_settings - # @return [::Google::Cloud::Ces::V1beta::ClientCertificateSettings] - # Optional. The default client certificate settings for the app. - # @!attribute [rw] vpc_sc_settings - # @return [::Google::Cloud::Ces::V1beta::VpcScSettings] - # Optional. VPC-SC settings for the app. - # @!attribute [rw] locked - # @return [::Boolean] - # Optional. Indicates whether the app is locked for changes. If the app is - # locked, modifications to the app resources will be rejected. - # @!attribute [rw] evaluation_personas - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationPersona>] - # Optional. The evaluation personas for the app. This field is used to define - # the personas that can be used for evaluation. Maximum of 30 personas can be - # defined. - # @!attribute [rw] evaluation_settings - # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings] - # Optional. The evaluation settings for the app. - # @!attribute [r] validation_errors - # @return [::Array<::String>] - # Output only. Misconfigurations or warnings in the app. - class App - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the structure and metadata for a variable. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the variable. The name must start with a letter or - # underscore and contain only letters, numbers, or underscores. - # @!attribute [rw] description - # @return [::String] - # Required. The description of the variable. - # @!attribute [rw] schema - # @return [::Google::Cloud::Ces::V1beta::Schema] - # Required. The schema of the variable. - class VariableDeclaration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the tool execution behavior if there are **multiple** tools being - # selected by the agent **at the same time**. - module ToolExecutionMode - # Unspecified tool execution mode. Default to PARALLEL. - TOOL_EXECUTION_MODE_UNSPECIFIED = 0 - - # If there are multiple tools being selected, they will be executed in - # parallel, with the same - # [ToolContext](https://google.github.io/adk-docs/context/#the-different-types-of-context). - PARALLEL = 1 - - # If there are multiple tools being selected, they will be executed - # sequentially. The next tool will only be executed after the previous tool - # completes and it can see updated - # [ToolContext](https://google.github.io/adk-docs/context/#the-different-types-of-context) - # from the previous tool. - SEQUENTIAL = 2 - end - end - - # TimeZone settings of the app. - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The time zone of the app from the [time zone - # database](https://www.iana.org/time-zones), e.g., America/Los_Angeles, - # Europe/Paris. - class TimeZoneSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Language settings of the app. - # @!attribute [rw] default_language_code - # @return [::String] - # Optional. The default language code of the app. - # @!attribute [rw] supported_language_codes - # @return [::Array<::String>] - # Optional. List of languages codes supported by the app, in addition to the - # `default_language_code`. - # @!attribute [rw] enable_multilingual_support - # @return [::Boolean] - # Optional. Enables multilingual support. If true, agents in the app will use - # pre-built instructions to improve handling of multilingual input. - # @!attribute [rw] fallback_action - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. Deprecated: This feature is no longer supported. Use - # `enable_multilingual_support` instead to improve handling of multilingual - # input. - # The action to perform when an agent receives input in an unsupported - # language. - # - # This can be a predefined action or a custom tool call. - # Valid values are: - # - A tool's full resource name, which triggers a specific tool execution. - # - A predefined system action, such as "escalate" or "exit", which triggers - # an {::Google::Cloud::Ces::V1beta::EndSession EndSession} signal with - # corresponding {::Google::Cloud::Ces::V1beta::EndSession#metadata metadata} to - # terminate the conversation. - class LanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for how the input and output audio should be processed and - # delivered. - # @!attribute [rw] synthesize_speech_configs - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::SynthesizeSpeechConfig}] - # Optional. Configuration of how the agent response should be synthesized, - # mapping from the language code to - # {::Google::Cloud::Ces::V1beta::SynthesizeSpeechConfig SynthesizeSpeechConfig}. - # - # If the configuration for the specified language code is not found, the - # configuration for the root language code will be used. For example, if the - # map contains "en-us" and "en", and the specified language code is "en-gb", - # then "en" configuration will be used. - # - # Note: Language code is case-insensitive. - # @!attribute [rw] barge_in_config - # @return [::Google::Cloud::Ces::V1beta::BargeInConfig] - # Optional. Configures the agent behavior for the user barge-in activities. - # @!attribute [rw] inactivity_timeout - # @return [::Google::Protobuf::Duration] - # Optional. The duration of user inactivity (no speech or interaction) before - # the agent prompts the user for reengagement. If not set, the agent will not - # prompt the user for reengagement. - # @!attribute [rw] ambient_sound_config - # @return [::Google::Cloud::Ces::V1beta::AmbientSoundConfig] - # Optional. Configuration for the ambient sound to be played with the - # synthesized agent response, to enhance the naturalness of the conversation. - class AudioProcessingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Ces::V1beta::SynthesizeSpeechConfig] - class SynthesizeSpeechConfigsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for the ambient sound to be played with the synthesized agent - # response, to enhance the naturalness of the conversation. - # @!attribute [rw] prebuilt_ambient_noise - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::AmbientSoundConfig::PrebuiltAmbientNoise] - # Optional. Deprecated: `prebuilt_ambient_noise` is deprecated in favor of - # `prebuilt_ambient_sound`. - # - # Note: The following fields are mutually exclusive: `prebuilt_ambient_noise`, `gcs_uri`, `prebuilt_ambient_sound`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcs_uri - # @return [::String] - # Optional. Ambient noise as a mono-channel, 16kHz WAV file stored in - # [Cloud Storage](https://cloud.google.com/storage). - # - # Note: Please make sure the CES service agent - # `service-@gcp-sa-ces.iam.gserviceaccount.com` has - # `storage.objects.get` permission to the Cloud Storage object. - # - # Note: The following fields are mutually exclusive: `gcs_uri`, `prebuilt_ambient_noise`, `prebuilt_ambient_sound`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] prebuilt_ambient_sound - # @return [::String] - # Optional. Name of the prebuilt ambient sound. - # Valid values are: - # - "coffee_shop" - # - "keyboard" - # - "keypad" - # - "hum" - # - "office_1" - # - "office_2" - # - "office_3" - # - "room_1" - # - "room_2" - # - "room_3" - # - "room_4" - # - "room_5" - # - "air_conditioner" - # - # Note: The following fields are mutually exclusive: `prebuilt_ambient_sound`, `prebuilt_ambient_noise`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] volume_gain_db - # @return [::Float] - # Optional. Volume gain (in dB) of the normal native volume supported by - # ambient noise, in the range [-96.0, 16.0]. If unset, or set to a value of - # 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) - # will play at approximately half the amplitude of the normal native signal - # amplitude. A value of +6.0 (dB) will play at approximately twice the - # amplitude of the normal native signal amplitude. We strongly recommend not - # to exceed +10 (dB) as there's usually no effective increase in loudness for - # any value greater than that. - class AmbientSoundConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Prebuilt ambient noise. - module PrebuiltAmbientNoise - # Not specified. - PREBUILT_AMBIENT_NOISE_UNSPECIFIED = 0 - - # Ambient noise of a retail store. - RETAIL_STORE = 1 - - # Ambient noise of a convention hall. - CONVENTION_HALL = 2 - - # Ambient noise of a street. - OUTDOOR = 3 - end - end - - # Configuration for how the user barge-in activities should be handled. - # @!attribute [rw] disable_barge_in - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Optional. Disables user barge-in while the agent is speaking. If true, user - # input during agent response playback will be ignored. - # - # Deprecated: `disable_barge_in` is deprecated in favor of - # {::Google::Cloud::Ces::V1beta::ChannelProfile#disable_barge_in_control `disable_barge_in_control`} - # in ChannelProfile. - # @!attribute [rw] barge_in_awareness - # @return [::Boolean] - # Optional. If enabled, the agent will adapt its next response based on the - # assumption that the user hasn't heard the full preceding agent message. - # This should not be used in scenarios where agent responses are displayed - # visually. - class BargeInConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for how the agent response should be synthesized. - # @!attribute [rw] voice - # @return [::String] - # Optional. The name of the voice. If not set, the service will choose a - # voice based on the other parameters such as language_code. - # - # For the list of available voices, please refer to [Supported voices and - # languages](https://cloud.google.com/text-to-speech/docs/voices) from Cloud - # Text-to-Speech. - # @!attribute [rw] speaking_rate - # @return [::Float] - # Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the - # normal native speed supported by the specific voice. 2.0 is twice as fast, - # and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will - # return an error. - class SynthesizeSpeechConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings to describe the conversation data collection behaviors for LLM - # analysis metrics pipeline. - # @!attribute [rw] llm_metrics_opted_out - # @return [::Boolean] - # Optional. Whether to collect conversation data for llm analysis metrics. If - # true, conversation data will not be collected for llm analysis metrics; - # otherwise, conversation data will be collected. - class MetricAnalysisSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings to describe the logging behaviors for the app. - # @!attribute [rw] redaction_config - # @return [::Google::Cloud::Ces::V1beta::RedactionConfig] - # Optional. Configuration for how sensitive data should be redacted. - # @!attribute [rw] audio_recording_config - # @return [::Google::Cloud::Ces::V1beta::AudioRecordingConfig] - # Optional. Configuration for how audio interactions should be recorded. The - # audio is subject to redaction as configured in - # {::Google::Cloud::Ces::V1beta::LoggingSettings#redaction_config RedactionConfig}. - # @!attribute [rw] unredacted_audio_recording_config - # @return [::Google::Cloud::Ces::V1beta::AudioRecordingConfig] - # Optional. Configures an additional recording of unredacted audio. This can - # be used to maintain a raw audio copy when audio redaction is - # {::Google::Cloud::Ces::V1beta::RedactionConfig#enable_redaction enabled}, - # typically for auditing or monitoring purposes. - # @!attribute [rw] bigquery_export_settings - # @return [::Google::Cloud::Ces::V1beta::BigQueryExportSettings] - # Optional. Configures the BigQuery export behaviors for the app. The - # conversation data is subject to redaction as configured in - # {::Google::Cloud::Ces::V1beta::LoggingSettings#redaction_config RedactionConfig}. - # @!attribute [rw] cloud_logging_settings - # @return [::Google::Cloud::Ces::V1beta::CloudLoggingSettings] - # Optional. Settings to describe the Cloud Logging behaviors for the app. - # @!attribute [rw] conversation_logging_settings - # @return [::Google::Cloud::Ces::V1beta::ConversationLoggingSettings] - # Optional. Settings to describe the conversation logging behaviors for the - # app. - # @!attribute [rw] evaluation_audio_recording_config - # @return [::Google::Cloud::Ces::V1beta::AudioRecordingConfig] - # Optional. Configuration for how audio interactions should be recorded for - # the evaluation. By default, audio recording is not enabled for evaluation - # sessions. - # @!attribute [rw] metric_analysis_settings - # @return [::Google::Cloud::Ces::V1beta::MetricAnalysisSettings] - # Optional. Settings to describe the conversation data collection behaviors - # for the LLM analysis pipeline for the app. - class LoggingSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings to describe how errors should be handled in the app. - # @!attribute [rw] error_handling_strategy - # @return [::Google::Cloud::Ces::V1beta::ErrorHandlingSettings::ErrorHandlingStrategy] - # Optional. The strategy to use for error handling. - # @!attribute [rw] fallback_response_config - # @return [::Google::Cloud::Ces::V1beta::ErrorHandlingSettings::FallbackResponseConfig] - # Optional. Configuration for handling fallback responses. - # @!attribute [rw] end_session_config - # @return [::Google::Cloud::Ces::V1beta::ErrorHandlingSettings::EndSessionConfig] - # Optional. Configuration for ending the session in case of system errors - # (e.g. LLM errors). - class ErrorHandlingSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for handling fallback responses. - # @!attribute [rw] custom_fallback_messages - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The fallback messages in case of system errors (e.g. LLM - # errors), mapped by [supported language - # code](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/reference/language). - # @!attribute [rw] max_fallback_attempts - # @return [::Integer] - # Optional. The maximum number of fallback attempts to make before the - # agent emitting {::Google::Cloud::Ces::V1beta::EndSession EndSession} Signal. - class FallbackResponseConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class CustomFallbackMessagesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for ending the session in case of system errors (e.g. LLM - # errors). - # @!attribute [rw] escalate_session - # @return [::Boolean] - # Optional. Whether to escalate the session in - # {::Google::Cloud::Ces::V1beta::EndSession EndSession}. If session is - # escalated, [metadata in - # EndSession][google.cloud.ces.v1beta.EndSession.metadata] will contain - # `session_escalated = true`. See - # https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/deploy/google-telephony-platform#transfer_a_call_to_a_human_agent - # for details. - class EndSessionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the strategy for handling errors. - module ErrorHandlingStrategy - # Unspecified error handling strategy. - ERROR_HANDLING_STRATEGY_UNSPECIFIED = 0 - - # No specific handling is enabled. - NONE = 1 - - # A fallback message will be returned to the user in case of - # system errors (e.g. LLM errors). - FALLBACK_RESPONSE = 2 - - # An {::Google::Cloud::Ces::V1beta::EndSession EndSession} signal will be - # emitted in case of system errors (e.g. LLM errors). - END_SESSION = 3 - end - end - - # Threshold settings for metrics in an Evaluation. - # @!attribute [rw] golden_evaluation_metrics_thresholds - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds] - # Optional. The golden evaluation metrics thresholds. - # @!attribute [rw] hallucination_metric_behavior - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::HallucinationMetricBehavior] - # Optional. Deprecated: Use `golden_hallucination_metric_behavior` instead. - # The hallucination metric behavior is currently used for golden evaluations. - # @!attribute [rw] golden_hallucination_metric_behavior - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::HallucinationMetricBehavior] - # Optional. The hallucination metric behavior for golden evaluations. - # @!attribute [rw] scenario_hallucination_metric_behavior - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::HallucinationMetricBehavior] - # Optional. The hallucination metric behavior for scenario evaluations. - class EvaluationMetricsThresholds - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for golden evaluations. - # @!attribute [rw] turn_level_metrics_thresholds - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds] - # Optional. The turn level metrics thresholds. - # @!attribute [rw] expectation_level_metrics_thresholds - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds] - # Optional. The expectation level metrics thresholds. - # @!attribute [rw] tool_matching_settings - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::ToolMatchingSettings] - # Optional. The tool matching settings. An - # extra tool call is a tool call that is present in the execution but does - # not match any tool call in the golden expectation. - class GoldenEvaluationMetricsThresholds - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Turn level metrics thresholds. - # @!attribute [rw] semantic_similarity_success_threshold - # @return [::Integer] - # Optional. The success threshold for semantic similarity. Must be an - # integer between 0 and 4. Default is >= 3. - # @!attribute [rw] overall_tool_invocation_correctness_threshold - # @return [::Float] - # Optional. The success threshold for overall tool invocation - # correctness. Must be a float between 0 and 1. Default is 1.0. - # @!attribute [rw] semantic_similarity_channel - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds::SemanticSimilarityChannel] - # Optional. The semantic similarity channel to use for evaluation. - class TurnLevelMetricsThresholds - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Semantic similarity channel to use. - module SemanticSimilarityChannel - # Metric unspecified. Defaults to TEXT. - SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED = 0 - - # Use text semantic similarity. - TEXT = 1 - - # Use audio semantic similarity. - AUDIO = 2 - end - end - - # Expectation level metrics thresholds. - # @!attribute [rw] tool_invocation_parameter_correctness_threshold - # @return [::Float] - # Optional. The success threshold for individual tool invocation - # parameter correctness. Must be a float between 0 and 1. Default is 1.0. - class ExpectationLevelMetricsThresholds - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for matching tool calls. - # @!attribute [rw] extra_tool_call_behavior - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::ToolMatchingSettings::ExtraToolCallBehavior] - # Optional. Behavior for extra tool calls. - # Defaults to FAIL. - class ToolMatchingSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the behavior when an extra tool call is encountered. An extra - # tool call is a tool call that is present in the execution but does not - # match any tool call in the golden expectation. - module ExtraToolCallBehavior - # Unspecified behavior. Defaults to FAIL. - EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0 - - # Fail the evaluation if an extra tool call is encountered. - FAIL = 1 - - # Allow the extra tool call. - ALLOW = 2 - end - end - - # The hallucination metric behavior. Regardless of the behavior, the metric - # will always be calculated. The difference is that when disabled, the - # metric is not used to calculate the overall evaluation score. - module HallucinationMetricBehavior - # Unspecified hallucination metric behavior. - HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED = 0 - - # Disable hallucination metric. - DISABLED = 1 - - # Enable hallucination metric. - ENABLED = 2 - end - end - - # Settings for evaluation. - # @!attribute [rw] scenario_conversation_initiator - # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings::ScenarioConversationInitiator] - # Optional. Who starts the conversation in a scenario evaluation. - # @!attribute [rw] golden_run_method - # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod] - # Optional. The default method used to run golden evaluations. This will be - # used if no golden_run_method is specified in the RunEvaluationRequest. - # @!attribute [rw] golden_evaluation_tool_call_behaviour - # @return [::Google::Cloud::Ces::V1beta::EvaluationToolCallBehaviour] - # Optional. Configures the default tool call behaviour for golden - # evaluations. - # @!attribute [rw] scenario_evaluation_tool_call_behaviour - # @return [::Google::Cloud::Ces::V1beta::EvaluationToolCallBehaviour] - # Optional. Configures the default tool call behaviour for scenario - # evaluations. - # @!attribute [rw] metrics_config - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig] - # Optional. Configures the default metrics for evaluations. - # @!attribute [rw] scenario_execution_mode - # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings::ScenarioExecutionMode] - # Optional. The execution mode for scenario evaluations. If not provided, - # will default to QUALITY_OPTIMIZED. - class EvaluationSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Determines who starts the conversation in a scenario evaluation session. - module ScenarioConversationInitiator - # Unspecified. Defaults to USER. - SCENARIO_CONVERSATION_INITIATOR_UNSPECIFIED = 0 - - # The user starts the conversation. - USER = 1 - - # The agent starts the conversation. - AGENT = 2 - end - - # The execution mode for scenario evaluations. - module ScenarioExecutionMode - # Unspecified execution mode. Defaults to QUALITY_OPTIMIZED. - SCENARIO_EXECUTION_MODE_UNSPECIFIED = 0 - - # Quality optimized mode. - QUALITY_OPTIMIZED = 1 - - # Speed optimized mode. - SPEED_OPTIMIZED = 2 - end - end - - # Settings for custom client certificates. - # @!attribute [rw] tls_certificate - # @return [::String] - # Required. The TLS certificate encoded in PEM format. This string must - # include the begin header and end footer lines. - # @!attribute [rw] private_key - # @return [::String] - # Required. The name of the SecretManager secret version resource storing the - # private key encoded in PEM format. - # Format: `projects/{project}/secrets/{secret}/versions/{version}` - # @!attribute [rw] passphrase - # @return [::String] - # Optional. The name of the SecretManager secret version resource storing the - # passphrase to decrypt the private key. Should be left unset if the private - # key is not encrypted. - # Format: `projects/{project}/secrets/{secret}/versions/{version}` - class ClientCertificateSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # VPC-SC settings for the app. - # @!attribute [rw] allowed_origins - # @return [::Array<::String>] - # Optional. The allowed HTTP(s) origins that OpenAPI tools in the App are - # able to directly call when VPC Service Controls are enabled. These strings - # must match the origin exactly, including the port if specified. For - # example, "https://example.com" or "https://example.com:443". This list does - # not yet apply to Python tools that may make direct HTTP calls. - class VpcScSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings to describe the conversation logging behaviors for the app. - # @!attribute [rw] disable_conversation_logging - # @return [::Boolean] - # Optional. Whether to disable conversation logging for the sessions. - # @!attribute [rw] retention_window - # @return [::Google::Protobuf::Duration] - # Optional. Controls the retention window for the conversation. - # If not set, the conversation will be retained for 365 days. - class ConversationLoggingSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings to describe the Cloud Logging behaviors for the app. - # @!attribute [rw] enable_cloud_logging - # @return [::Boolean] - # Optional. Whether to enable Cloud Logging for the sessions. - class CloudLoggingSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for how the audio interactions should be recorded. - # @!attribute [rw] gcs_bucket - # @return [::String] - # Optional. The [Cloud Storage](https://cloud.google.com/storage) bucket to - # store the session audio recordings. The URI must start with "gs://". - # - # Please choose a bucket location that meets your data residency - # requirements. - # - # Note: If the Cloud Storage bucket is in a different project from the app, - # you should grant `storage.objects.create` permission to the CES service - # agent `service-@gcp-sa-ces.iam.gserviceaccount.com`. - # @!attribute [rw] gcs_path_prefix - # @return [::String] - # Optional. The Cloud Storage path prefix for audio recordings. - # - # This prefix can include the following placeholders, which will be - # dynamically substituted at serving time: - # - $project: project ID - # - $location: app location - # - $app: app ID - # - $date: session date in YYYY-MM-DD format - # - $session: session ID - # - # If the path prefix is not specified, the default prefix - # `$project/$location/$app/$date/$session/` will be used. - class AudioRecordingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration to instruct how sensitive data should be handled. - # @!attribute [rw] enable_redaction - # @return [::Boolean] - # Optional. If true, redaction will be applied in various logging scenarios, - # including conversation history, Cloud Logging and audio recording. - # @!attribute [rw] inspect_template - # @return [::String] - # Optional. [DLP](https://cloud.google.com/dlp/docs) inspect template name to - # configure detection of sensitive data types. - # - # Format: - # `projects/{project}/locations/{location}/inspectTemplates/{inspect_template}` - # @!attribute [rw] deidentify_template - # @return [::String] - # Optional. [DLP](https://cloud.google.com/dlp/docs) deidentify template name - # to instruct on how to de-identify content. - # - # Format: - # `projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}` - class RedactionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Data store related settings for the app. - # @!attribute [r] engines - # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreSettings::Engine>] - # Output only. The engines for the app. - class DataStoreSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An engine to which the data stores are connected. - # See Vertex AI Search: - # https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the engine. - # Format: - # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` - # @!attribute [r] type - # @return [::Google::Cloud::Ces::V1beta::DataStoreSettings::Engine::Type] - # Output only. The type of the engine. - class Engine - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the engine. - # See the documentation available at - # https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/SolutionType - # and - # https://cloud.google.com/generative-ai-app-builder/docs/create-datastore-ingest. - module Type - # Unspecified engine type. - TYPE_UNSPECIFIED = 0 - - # The SOLUTION_TYPE_SEARCH engine for the app. All connector data stores - # added to the app will be added to this engine. - ENGINE_TYPE_SEARCH = 1 - - # Chat engine type. - # The SOLUTION_TYPE_CHAT engine for the app. All connector data stores - # added to the app will be added to this engine. - ENGINE_TYPE_CHAT = 2 - end - end - end - - # A persona represents an end user in an evaluation. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier of the persona. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationPersonas/{evaluationPersona}` - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the persona. - # @!attribute [rw] display_name - # @return [::String] - # Required. The display name of the persona. Unique within an app. - # @!attribute [rw] personality - # @return [::String] - # Required. An instruction for the agent on how to behave in the evaluation. - # @!attribute [rw] speech_config - # @return [::Google::Cloud::Ces::V1beta::EvaluationPersona::SpeechConfig] - # Optional. Configuration for how the persona sounds (TTS settings). - class EvaluationPersona - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for Text-to-Speech generation. - # @!attribute [rw] speaking_rate - # @return [::Float] - # Optional. The speaking rate. 1.0 is normal. - # Lower is slower (e.g., 0.8), higher is faster (e.g., 1.5). - # Useful for testing how the agent handles fast talkers. - # @!attribute [rw] environment - # @return [::Google::Cloud::Ces::V1beta::EvaluationPersona::SpeechConfig::BackgroundEnvironment] - # Optional. The simulated audio environment. - # @!attribute [rw] voice_id - # @return [::String] - # Optional. The specific voice identifier/accent to use. - # Example: "en-US-Wavenet-D" or "en-GB-Standard-A" - class SpeechConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Simulated audio environment. - module BackgroundEnvironment - # Background environment unspecified. - BACKGROUND_ENVIRONMENT_UNSPECIFIED = 0 - - # Call center environment. - CALL_CENTER = 3 - - # Traffic noise environment. - TRAFFIC = 4 - - # Kids noise environment. - KIDS_NOISE = 5 - - # Cafe environment. - CAFE = 6 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app_version.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app_version.rb deleted file mode 100644 index c6fbb529f348..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/app_version.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # A snapshot of the app. - # @!attribute [rw] app - # @return [::Google::Cloud::Ces::V1beta::App] - # Optional. The basic settings for the app. - # @!attribute [rw] agents - # @return [::Array<::Google::Cloud::Ces::V1beta::Agent>] - # Optional. List of agents in the app. - # @!attribute [rw] tools - # @return [::Array<::Google::Cloud::Ces::V1beta::Tool>] - # Optional. List of tools in the app. - # @!attribute [rw] examples - # @return [::Array<::Google::Cloud::Ces::V1beta::Example>] - # Optional. List of examples in the app. - # @!attribute [rw] guardrails - # @return [::Array<::Google::Cloud::Ces::V1beta::Guardrail>] - # Optional. List of guardrails in the app. - # @!attribute [rw] toolsets - # @return [::Array<::Google::Cloud::Ces::V1beta::Toolset>] - # Optional. List of toolsets in the app. - class AppSnapshot - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # In Customer Engagement Suite (CES), an app version is a snapshot of the app - # at a specific point in time. It is immutable and cannot be modified once - # created. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the app version. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the app version. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the app version. - # @!attribute [r] creator - # @return [::String] - # Output only. Email of the user who created the app version. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the app version was created. - # @!attribute [r] snapshot - # @return [::Google::Cloud::Ces::V1beta::AppSnapshot] - # Output only. The snapshot of the app when the version is created. - # @!attribute [r] etag - # @return [::String] - # Output only. Etag used to ensure the object hasn't changed during a - # read-modify-write operation. If the etag is empty, the update will - # overwrite any concurrent changes. - class AppVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/auth.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/auth.rb deleted file mode 100644 index e6e9aa18a1f0..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/auth.rb +++ /dev/null @@ -1,214 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Configurations for authentication with API key. - # @!attribute [rw] key_name - # @return [::String] - # Required. The parameter name or the header name of the API key. - # E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name. - # @!attribute [rw] api_key_secret_version - # @return [::String] - # Required. The name of the SecretManager secret version resource storing the - # API key. Format: `projects/{project}/secrets/{secret}/versions/{version}` - # - # Note: You should grant `roles/secretmanager.secretAccessor` role to the CES - # service agent - # `service-@gcp-sa-ces.iam.gserviceaccount.com`. - # @!attribute [rw] request_location - # @return [::Google::Cloud::Ces::V1beta::ApiKeyConfig::RequestLocation] - # Required. Key location in the request. - class ApiKeyConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The location of the API key in the request. - module RequestLocation - # Unspecified. This value should not be used. - REQUEST_LOCATION_UNSPECIFIED = 0 - - # Represents the key in http header. - HEADER = 1 - - # Represents the key in query string. - QUERY_STRING = 2 - end - end - - # Configurations for authentication with OAuth. - # @!attribute [rw] oauth_grant_type - # @return [::Google::Cloud::Ces::V1beta::OAuthConfig::OauthGrantType] - # Required. OAuth grant types. - # @!attribute [rw] client_id - # @return [::String] - # Required. The client ID from the OAuth provider. - # @!attribute [rw] client_secret_version - # @return [::String] - # Required. The name of the SecretManager secret version resource storing the - # client secret. - # Format: `projects/{project}/secrets/{secret}/versions/{version}` - # - # Note: You should grant `roles/secretmanager.secretAccessor` role to the CES - # service agent - # `service-@gcp-sa-ces.iam.gserviceaccount.com`. - # @!attribute [rw] token_endpoint - # @return [::String] - # Required. The token endpoint in the OAuth provider to exchange for an - # access token. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # Optional. The OAuth scopes to grant. - class OAuthConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # OAuth grant types. Only [client credential - # grant](https://oauth.net/2/grant-types/client-credentials) is supported. - module OauthGrantType - # Unspecified. Defaults to CLIENT_CREDENTIAL. - OAUTH_GRANT_TYPE_UNSPECIFIED = 0 - - # Represents the [client credential - # flow](https://oauth.net/2/grant-types/client-credentials). - CLIENT_CREDENTIAL = 1 - end - end - - # Configurations for authentication with [ID - # token](https://cloud.google.com/docs/authentication/token-types#id) generated - # from service agent. - class ServiceAgentIdTokenAuthConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configurations for authentication using a custom service account. - # @!attribute [rw] service_account - # @return [::String] - # Required. The email address of the service account used for authentication. - # CES uses this service account to exchange an access token and the access - # token is then sent in the `Authorization` header of the request. - # - # The service account must have the - # `roles/iam.serviceAccountTokenCreator` role granted to the - # CES service agent - # `service-@gcp-sa-ces.iam.gserviceaccount.com`. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # Optional. The OAuth scopes to grant. If not specified, the default scope - # `https://www.googleapis.com/auth/cloud-platform` is used. - class ServiceAccountAuthConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configurations for authentication with a bearer token. - # @!attribute [rw] token - # @return [::String] - # Required. The bearer token. - # Must be in the format `$context.variables.`. - class BearerTokenConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # End-user authentication configuration used for Connection calls. - # The field values must be the names of context variables in the format - # `$context.variables.`. - # @!attribute [rw] oauth2_auth_code_config - # @return [::Google::Cloud::Ces::V1beta::EndUserAuthConfig::Oauth2AuthCodeConfig] - # Oauth 2.0 Authorization Code authentication. - # - # Note: The following fields are mutually exclusive: `oauth2_auth_code_config`, `oauth2_jwt_bearer_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oauth2_jwt_bearer_config - # @return [::Google::Cloud::Ces::V1beta::EndUserAuthConfig::Oauth2JwtBearerConfig] - # JWT Profile Oauth 2.0 Authorization Grant authentication. - # - # Note: The following fields are mutually exclusive: `oauth2_jwt_bearer_config`, `oauth2_auth_code_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class EndUserAuthConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Oauth 2.0 Authorization Code authentication configuration. - # @!attribute [rw] oauth_token - # @return [::String] - # Required. Oauth token parameter name to pass through. - # Must be in the format `$context.variables.`. - class Oauth2AuthCodeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # JWT Profile Oauth 2.0 Authorization Grant authentication configuration. - # @!attribute [rw] issuer - # @return [::String] - # Required. Issuer parameter name to pass through. - # Must be in the format `$context.variables.`. - # @!attribute [rw] subject - # @return [::String] - # Required. Subject parameter name to pass through. - # Must be in the format `$context.variables.`. - # @!attribute [rw] client_key - # @return [::String] - # Required. Client parameter name to pass through. - # Must be in the format `$context.variables.`. - class Oauth2JwtBearerConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Authentication information required for API calls. - # @!attribute [rw] api_key_config - # @return [::Google::Cloud::Ces::V1beta::ApiKeyConfig] - # Optional. Config for API key auth. - # - # Note: The following fields are mutually exclusive: `api_key_config`, `oauth_config`, `service_agent_id_token_auth_config`, `service_account_auth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oauth_config - # @return [::Google::Cloud::Ces::V1beta::OAuthConfig] - # Optional. Config for OAuth. - # - # Note: The following fields are mutually exclusive: `oauth_config`, `api_key_config`, `service_agent_id_token_auth_config`, `service_account_auth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] service_agent_id_token_auth_config - # @return [::Google::Cloud::Ces::V1beta::ServiceAgentIdTokenAuthConfig] - # Optional. Config for ID token auth generated from CES service agent. - # - # Note: The following fields are mutually exclusive: `service_agent_id_token_auth_config`, `api_key_config`, `oauth_config`, `service_account_auth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] service_account_auth_config - # @return [::Google::Cloud::Ces::V1beta::ServiceAccountAuthConfig] - # Optional. Config for service account authentication. - # - # Note: The following fields are mutually exclusive: `service_account_auth_config`, `api_key_config`, `oauth_config`, `service_agent_id_token_auth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bearer_token_config - # @return [::Google::Cloud::Ces::V1beta::BearerTokenConfig] - # Optional. Config for bearer token auth. - # - # Note: The following fields are mutually exclusive: `bearer_token_config`, `api_key_config`, `oauth_config`, `service_agent_id_token_auth_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ApiAuthentication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/bigquery_export.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/bigquery_export.rb deleted file mode 100644 index 963127e02c2e..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/bigquery_export.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # Settings to describe the BigQuery export behaviors for the app. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Indicates whether the BigQuery export is enabled. - # @!attribute [rw] project - # @return [::String] - # Optional. The **project ID** of the BigQuery dataset to export the data to. - # - # Note: If the BigQuery dataset is in a different project from the app, - # you should grant `roles/bigquery.admin` role to the CES service agent - # `service-@gcp-sa-ces.iam.gserviceaccount.com`. - # @!attribute [rw] dataset - # @return [::String] - # Optional. The BigQuery **dataset ID** to export the data to. - class BigQueryExportSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/changelog.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/changelog.rb deleted file mode 100644 index 7ab2d68398d6..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/changelog.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # Changelogs represent a change made to the app or to an resource within the - # app. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the changelog. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/changelogs/{changelog}` - # @!attribute [r] author - # @return [::String] - # Output only. Email address of the change author. - # @!attribute [r] display_name - # @return [::String] - # Output only. Display name of the change. It typically should be the display - # name of the resource that was changed. - # @!attribute [r] description - # @return [::String] - # Output only. Description of the change. which typically captures the - # changed fields in the resource. - # @!attribute [r] resource - # @return [::String] - # Output only. The resource that was changed. - # @!attribute [r] resource_type - # @return [::String] - # Output only. The type of the resource that was changed. - # @!attribute [r] action - # @return [::String] - # Output only. The action that was performed on the resource. - # @!attribute [r] original_resource - # @return [::Google::Protobuf::Struct] - # Output only. The original resource before the change. - # @!attribute [r] new_resource - # @return [::Google::Protobuf::Struct] - # Output only. The new resource after the change. - # @!attribute [r] dependent_resources - # @return [::Array<::Google::Protobuf::Struct>] - # Output only. The dependent resources that were changed. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the change was made. - # @!attribute [r] sequence_number - # @return [::Integer] - # Output only. The monotonically increasing sequence number of the changelog. - class Changelog - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/client_function.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/client_function.rb deleted file mode 100644 index e4cd595046fc..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/client_function.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # Represents a client-side function that the agent can invoke. When the - # tool is chosen by the agent, control is handed off to the client. - # The client is responsible for executing the function and returning the result - # as a {::Google::Cloud::Ces::V1beta::ToolResponse ToolResponse} to continue the - # interaction with the agent. - # @!attribute [rw] name - # @return [::String] - # Required. The function name. - # @!attribute [rw] description - # @return [::String] - # Optional. The function description. - # @!attribute [rw] parameters - # @return [::Google::Cloud::Ces::V1beta::Schema] - # Optional. The schema of the function parameters. - # @!attribute [rw] response - # @return [::Google::Cloud::Ces::V1beta::Schema] - # Optional. The schema of the function response. - class ClientFunction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/common.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/common.rb deleted file mode 100644 index 53b67e1bd173..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/common.rb +++ /dev/null @@ -1,375 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # A callback defines the custom logic to be executed at various stages of - # agent interaction. - # @!attribute [rw] python_code - # @return [::String] - # Required. The python code to execute for the callback. - # @!attribute [rw] description - # @return [::String] - # Optional. Human-readable description of the callback. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. Whether the callback is disabled. Disabled callbacks are ignored - # by the agent. - # @!attribute [rw] proactive_execution_enabled - # @return [::Boolean] - # Optional. If enabled, the callback will also be executed on intermediate - # model outputs. This setting only affects after model callback. - # **ENABLE WITH CAUTION**. Typically after model callback only needs to be - # executed after receiving all model responses. Enabling proactive execution - # may have negative implication on the execution cost and latency, and - # should only be enabled in rare situations. - class Callback - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model settings contains various configurations for the LLM model. - # @!attribute [rw] model - # @return [::String] - # Optional. The LLM model that the agent should use. - # If not set, the agent will inherit the model from its parent agent. - # @!attribute [rw] temperature - # @return [::Float] - # Optional. If set, this temperature will be used for the LLM model. - # Temperature controls the randomness of the model's responses. Lower - # temperatures produce responses that are more predictable. Higher - # temperatures produce responses that are more creative. - class ModelSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action that is taken when a certain precondition is met. - # @!attribute [rw] respond_immediately - # @return [::Google::Cloud::Ces::V1beta::TriggerAction::RespondImmediately] - # Optional. Immediately respond with a preconfigured response. - # - # Note: The following fields are mutually exclusive: `respond_immediately`, `transfer_agent`, `generative_answer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] transfer_agent - # @return [::Google::Cloud::Ces::V1beta::TriggerAction::TransferAgent] - # Optional. Transfer the conversation to a different agent. - # - # Note: The following fields are mutually exclusive: `transfer_agent`, `respond_immediately`, `generative_answer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] generative_answer - # @return [::Google::Cloud::Ces::V1beta::TriggerAction::GenerativeAnswer] - # Optional. Respond with a generative answer. - # - # Note: The following fields are mutually exclusive: `generative_answer`, `respond_immediately`, `transfer_agent`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TriggerAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a response from the agent. - # @!attribute [rw] text - # @return [::String] - # Required. Text for the agent to respond with. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. Whether the response is disabled. Disabled responses are not - # used by the agent. - class Response - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The agent will immediately respond with a preconfigured response. - # @!attribute [rw] responses - # @return [::Array<::Google::Cloud::Ces::V1beta::TriggerAction::Response>] - # Required. The canned responses for the agent to choose from. The response - # is chosen randomly. - class RespondImmediately - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The agent will immediately respond with a generative answer. - # @!attribute [rw] prompt - # @return [::String] - # Required. The prompt to use for the generative answer. - class GenerativeAnswer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The agent will transfer the conversation to a different agent. - # @!attribute [rw] agent - # @return [::String] - # Required. The name of the agent to transfer the conversation to. The - # agent must be in the same app as the current agent. Format: - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - class TransferAgent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The TLS configuration. - # @!attribute [rw] ca_certs - # @return [::Array<::Google::Cloud::Ces::V1beta::TlsConfig::CaCert>] - # Required. Specifies a list of allowed custom CA certificates for HTTPS - # verification. - class TlsConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The CA certificate. - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the allowed custom CA certificates. This - # can be used to disambiguate the custom CA certificates. - # @!attribute [rw] cert - # @return [::String] - # Required. The allowed custom CA certificates (in DER format) for - # HTTPS verification. This overrides the default SSL trust store. If this - # is empty or unspecified, CES will use Google's default trust - # store to verify certificates. N.B. Make sure the HTTPS server - # certificates are signed with "subject alt name". For instance a - # certificate can be self-signed using the following command: - # - # ``` - # openssl x509 -req -days 200 -in example.com.csr \ - # -signkey example.com.key \ - # -out example.com.crt \ - # -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") - # ``` - class CaCert - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for tools using Service Directory. - # @!attribute [rw] service - # @return [::String] - # Required. The name of [Service - # Directory](https://cloud.google.com/service-directory) service. - # Format: - # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}`. - # Location of the service directory must be the same as the location of the - # app. - class ServiceDirectoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A ChannelProfile configures the agent's behavior for a specific communication - # channel, such as web UI or telephony. - # @!attribute [rw] profile_id - # @return [::String] - # Optional. The unique identifier of the channel profile. - # @!attribute [rw] channel_type - # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::ChannelType] - # Optional. The type of the channel profile. - # @!attribute [rw] persona_property - # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::PersonaProperty] - # Optional. The persona property of the channel profile. - # @!attribute [rw] disable_dtmf - # @return [::Boolean] - # Optional. Whether to disable DTMF (dual-tone multi-frequency). - # @!attribute [rw] disable_barge_in_control - # @return [::Boolean] - # Optional. Whether to disable user barge-in control in the conversation. - # - **true**: User interruptions are disabled while the agent is speaking. - # - **false**: The agent retains automatic control over when the user can - # interrupt. - # @!attribute [rw] web_widget_config - # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::WebWidgetConfig] - # Optional. The configuration for the web widget. - # @!attribute [rw] noise_suppression_level - # @return [::String] - # Optional. The noise suppression level of the channel profile. - # Available values are "low", "moderate", "high", "very_high". - class ChannelProfile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the persona property of a channel. - # @!attribute [rw] persona - # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::PersonaProperty::Persona] - # Optional. The persona of the channel. - class PersonaProperty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The persona of the channel. - module Persona - # UNKNOWN persona. - UNKNOWN = 0 - - # The agent keeps the responses concise and to the point - CONCISE = 1 - - # The agent provides additional context, explanations, and details - CHATTY = 2 - end - end - - # Message for configuration for the web widget. - # @!attribute [rw] modality - # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::WebWidgetConfig::Modality] - # Optional. The modality of the web widget. - # @!attribute [rw] theme - # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::WebWidgetConfig::Theme] - # Optional. The theme of the web widget. - # @!attribute [rw] web_widget_title - # @return [::String] - # Optional. The title of the web widget. - # @!attribute [rw] security_settings - # @return [::Google::Cloud::Ces::V1beta::ChannelProfile::WebWidgetConfig::SecuritySettings] - # Optional. The security settings of the web widget. - class WebWidgetConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Security settings for the web widget. - # @!attribute [rw] enable_public_access - # @return [::Boolean] - # Optional. Indicates whether public access to the web widget is enabled. - # If `true`, the web widget will be publicly accessible. - # If `false`, the web widget must be integrated with your own - # authentication and authorization system to return valid credentials for - # accessing the CES agent. - # @!attribute [rw] enable_origin_check - # @return [::Boolean] - # Optional. Indicates whether origin check for the web widget is enabled. - # If `true`, the web widget will check the origin of the website that - # loads the web widget and only allow it to be loaded in the same origin - # or any of the allowed origins. - # @!attribute [rw] allowed_origins - # @return [::Array<::String>] - # Optional. The origins that are allowed to host the web widget. An - # origin is defined by RFC 6454. If empty, all origins are allowed. A - # maximum of 100 origins is allowed. Example: "https://example.com" - # @!attribute [rw] enable_recaptcha - # @return [::Boolean] - # Optional. Indicates whether reCAPTCHA verification for the web widget - # is enabled. - class SecuritySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Modality of the web widget. - module Modality - # Unknown modality. - MODALITY_UNSPECIFIED = 0 - - # Widget supports both chat and voice input. - CHAT_AND_VOICE = 1 - - # Widget supports only voice input. - VOICE_ONLY = 2 - - # Widget supports only chat input. - CHAT_ONLY = 3 - - # Widget supports chat, voice, and video input. - CHAT_VOICE_AND_VIDEO = 4 - end - - # Theme of the web widget. - module Theme - # Unknown theme. - THEME_UNSPECIFIED = 0 - - # Light theme. - LIGHT = 1 - - # Dark theme. - DARK = 2 - end - end - - # The type of the channel profile. - module ChannelType - # Unknown channel type. - UNKNOWN = 0 - - # Web UI channel. - WEB_UI = 2 - - # API channel. - API = 3 - - # Twilio channel. - TWILIO = 4 - - # Google Telephony Platform channel. - GOOGLE_TELEPHONY_PLATFORM = 5 - - # Contact Center as a Service (CCaaS) channel. - CONTACT_CENTER_AS_A_SERVICE = 6 - - # Five9 channel. - FIVE9 = 7 - - # Third party contact center integration channel. - CONTACT_CENTER_INTEGRATION = 8 - end - end - - # A span is a unit of work or a single operation during the request processing. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the span. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The start time of the span. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The end time of the span. - # @!attribute [r] duration - # @return [::Google::Protobuf::Duration] - # Output only. The duration of the span. - # @!attribute [r] attributes - # @return [::Google::Protobuf::Struct] - # Output only. Key-value attributes associated with the span. - # @!attribute [r] child_spans - # @return [::Array<::Google::Cloud::Ces::V1beta::Span>] - # Output only. The child spans that are nested under this span. - class Span - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The execution type of the tool or toolset. - module ExecutionType - # The execution type is unspecified. Defaults to `SYNCHRONOUS` if - # unspecified. - EXECUTION_TYPE_UNSPECIFIED = 0 - - # The tool is executed synchronously. The session is blocked - # until the tool returns. - SYNCHRONOUS = 1 - - # The tool is executed asynchronously. The session will - # continue while the tool is executing. - ASYNCHRONOUS = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_tool.rb deleted file mode 100644 index 43fb8867437e..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_tool.rb +++ /dev/null @@ -1,122 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Configuration of an Action for the tool to use. - # Note: This can be either an Action or an Operation. See - # https://cloud.google.com/integration-connectors/docs/entities-operation-action - # for details. - # @!attribute [rw] connection_action_id - # @return [::String] - # ID of a Connection action for the tool to use. - # - # Note: The following fields are mutually exclusive: `connection_action_id`, `entity_operation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] entity_operation - # @return [::Google::Cloud::Ces::V1beta::Action::EntityOperation] - # Entity operation configuration for the tool to use. - # - # Note: The following fields are mutually exclusive: `entity_operation`, `connection_action_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input_fields - # @return [::Array<::String>] - # Optional. Entity fields to use as inputs for the operation. - # If no fields are specified, all fields of the Entity will be used. - # @!attribute [rw] output_fields - # @return [::Array<::String>] - # Optional. Entity fields to return from the operation. - # If no fields are specified, all fields of the Entity will be returned. - class Action - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entity CRUD operation specification. - # @!attribute [rw] entity_id - # @return [::String] - # Required. ID of the entity. - # @!attribute [rw] operation - # @return [::Google::Cloud::Ces::V1beta::Action::EntityOperation::OperationType] - # Required. Operation to perform on the entity. - class EntityOperation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The operation to perform on the entity. - module OperationType - # Operation type unspecified. Invalid, ConnectorTool create/update - # will fail. - OPERATION_TYPE_UNSPECIFIED = 0 - - # List operation. - LIST = 1 - - # Get operation. - GET = 2 - - # Create operation. - CREATE = 3 - - # Update operation. - UPDATE = 4 - - # Delete operation. - DELETE = 5 - end - end - end - - # A ConnectorTool allows connections to different integrations. - # See: https://cloud.google.com/integration-connectors/docs/overview. - # @!attribute [rw] connection - # @return [::String] - # Required. The full resource name of the referenced Integration Connectors - # Connection. - # Format: - # `projects/{project}/locations/{location}/connections/{connection}` - # @!attribute [rw] action - # @return [::Google::Cloud::Ces::V1beta::Action] - # Required. Action for the tool to use. - # @!attribute [rw] auth_config - # @return [::Google::Cloud::Ces::V1beta::EndUserAuthConfig] - # Optional. Configures how authentication is handled in Integration - # Connectors. By default, an admin authentication is passed in the - # Integration Connectors API requests. You can override it with a different - # end-user authentication config. - # **Note**: The Connection must have authentication override enabled in - # order to specify an EUC configuration here - otherwise, the ConnectorTool - # creation will fail. See - # https://cloud.google.com/application-integration/docs/configure-connectors-task#configure-authentication-override - # for details. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of the tool that can be used by the Agent to decide - # whether to call this ConnectorTool. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the tool that can be used by the Agent to - # decide whether to call this ConnectorTool. - class ConnectorTool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_toolset.rb deleted file mode 100644 index 96cbe663c2e0..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/connector_toolset.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # A toolset that generates tools from an Integration Connectors Connection. - # @!attribute [rw] connection - # @return [::String] - # Required. The full resource name of the referenced Integration Connectors - # Connection. - # Format: - # `projects/{project}/locations/{location}/connections/{connection}` - # @!attribute [rw] auth_config - # @return [::Google::Cloud::Ces::V1beta::EndUserAuthConfig] - # Optional. Configures how authentication is handled in Integration - # Connectors. By default, an admin authentication is passed in the - # Integration Connectors API requests. You can override it with a different - # end-user authentication config. - # **Note**: The Connection must have authentication override enabled in - # order to specify an EUC configuration here - otherwise, the Toolset - # creation will fail. See: - # https://cloud.google.com/application-integration/docs/configure-connectors-task#configure-authentication-override - # @!attribute [rw] connector_actions - # @return [::Array<::Google::Cloud::Ces::V1beta::Action>] - # Required. The list of connector actions/entity operations to generate tools - # for. - class ConnectorToolset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb deleted file mode 100644 index a2b5bd8ccacd..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/conversation.rb +++ /dev/null @@ -1,159 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # A conversation represents an interaction between an end user and the CES app. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the conversation. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the conversation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the conversation was completed. - # @!attribute [rw] turns - # @return [::Array<::Google::Cloud::Ces::V1beta::Conversation::Turn>] - # Required. The turns in the conversation. - # @!attribute [r] turn_count - # @return [::Integer] - # Output only. The number of turns in the conversation. - # @!attribute [rw] channel_type - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::Conversation::ChannelType] - # DEPRECATED. Please use - # {::Google::Cloud::Ces::V1beta::Conversation#input_types input_types} instead. - # @!attribute [r] source - # @return [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Output only. Indicate the source of the conversation. - # @!attribute [r] input_types - # @return [::Array<::Google::Cloud::Ces::V1beta::Conversation::InputType>] - # Output only. The input types of the conversation. - # @!attribute [r] entry_agent - # @return [::String] - # Output only. The agent that initially handles the conversation. If not - # specified, the conversation is handled by the root agent. Format: - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # @!attribute [r] deployment - # @return [::String] - # Output only. The deployment of the app used for processing the - # conversation. Format: - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - # @!attribute [r] app_version - # @return [::String] - # Output only. The version of the app used for processing the conversation. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # @!attribute [r] language_code - # @return [::String] - # Output only. The language code of the conversation. - # @!attribute [rw] messages - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::Google::Cloud::Ces::V1beta::Message>] - # Deprecated. Use turns instead. - class Conversation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # All information about a single turn in the conversation. - # @!attribute [rw] messages - # @return [::Array<::Google::Cloud::Ces::V1beta::Message>] - # Optional. List of messages in the conversation turn, including user - # input, agent responses and intermediate events during the processing. - # @!attribute [rw] root_span - # @return [::Google::Cloud::Ces::V1beta::Span] - # Optional. The root span of the action processing. - class Turn - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The channel type of the conversation. - module ChannelType - # Unspecified channel type. - CHANNEL_TYPE_UNSPECIFIED = 0 - - # The conversation only contains text messages between the end user and the - # agent. - TEXT = 1 - - # The conversation contains audio messages between the end user and the - # agent. - AUDIO = 2 - - # The conversation multi-modal messages (e.g. image) between the end user - # and the agent. - MULTIMODAL = 3 - end - - # The source of the conversation. - module Source - # Unspecified source. - SOURCE_UNSPECIFIED = 0 - - # The conversation is from the live end user. - LIVE = 1 - - # The conversation is from the simulator. - SIMULATOR = 2 - - # The conversation is from the evaluation. - EVAL = 3 - - # The conversation is from an agent tool. Agent tool runs the agent in a - # separate session, which is persisted for testing and debugging purposes. - AGENT_TOOL = 4 - end - - # Type of the input message. - module InputType - # Unspecified input type. - INPUT_TYPE_UNSPECIFIED = 0 - - # Text input. - INPUT_TYPE_TEXT = 1 - - # Event input. - INPUT_TYPE_EVENT = 7 - - # Audio input. - INPUT_TYPE_AUDIO = 2 - - # Image input. - INPUT_TYPE_IMAGE = 3 - - # Blob input. - INPUT_TYPE_BLOB = 4 - - # Client function tool response input. - INPUT_TYPE_TOOL_RESPONSE = 5 - - # Variables input. - INPUT_TYPE_VARIABLES = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store.rb deleted file mode 100644 index 4fcd646fad33..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # A DataStore resource in Vertex AI Search. - # @!attribute [rw] name - # @return [::String] - # Required. Full resource name of the DataStore. - # Format: - # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` - # @!attribute [r] type - # @return [::Google::Cloud::Ces::V1beta::DataStore::DataStoreType] - # Output only. The type of the data store. This field is readonly and - # populated by the server. - # @!attribute [r] document_processing_mode - # @return [::Google::Cloud::Ces::V1beta::DataStore::DocumentProcessingMode] - # Output only. The document processing mode for the data store connection. - # Only set for PUBLIC_WEB and UNSTRUCTURED data stores. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name of the data store. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the data store was created. - # @!attribute [r] connector_config - # @return [::Google::Cloud::Ces::V1beta::DataStore::ConnectorConfig] - # Output only. The connector config for the data store connection. - class DataStore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The connector config for the data store connection. - # @!attribute [rw] collection - # @return [::String] - # Resource name of the collection the data store belongs to. - # @!attribute [rw] collection_display_name - # @return [::String] - # Display name of the collection the data store belongs to. - # @!attribute [rw] data_source - # @return [::String] - # The name of the data source. - # Example: `salesforce`, `jira`, `confluence`, `bigquery`. - class ConnectorConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of the data store. - module DataStoreType - # Not specified. This value indicates that the data store type is not - # specified, so it will not be used during search. - DATA_STORE_TYPE_UNSPECIFIED = 0 - - # A data store that contains public web content. - PUBLIC_WEB = 1 - - # A data store that contains unstructured private data. - UNSTRUCTURED = 2 - - # A data store that contains structured data used as FAQ. - FAQ = 3 - - # A data store that is a connector to a first-party or a third-party - # service. - CONNECTOR = 4 - end - - # The document processing mode of the data store. - module DocumentProcessingMode - # Not specified. - DOCUMENT_PROCESSING_MODE_UNSPECIFIED = 0 - - # Documents are processed as documents. - DOCUMENTS = 1 - - # Documents are converted to chunks. - CHUNKS = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb deleted file mode 100644 index 1a5480c3f6d4..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb +++ /dev/null @@ -1,328 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Tool to retrieve from Vertex AI Search datastore or engine for grounding. - # Accepts either a datastore or an engine, but not both. - # See Vertex AI Search: - # https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction. - # @!attribute [rw] data_store_source - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::DataStoreSource] - # Optional. Search within a single specific DataStore. - # - # Note: The following fields are mutually exclusive: `data_store_source`, `engine_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] engine_source - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::EngineSource] - # Optional. Search within an Engine (potentially across multiple - # DataStores). - # - # Note: The following fields are mutually exclusive: `engine_source`, `data_store_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Required. The data store tool name. - # @!attribute [rw] description - # @return [::String] - # Optional. The tool description. - # @!attribute [rw] boost_specs - # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpecs>] - # Optional. Boost specification to boost certain documents. - # @!attribute [rw] modality_configs - # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::ModalityConfig>] - # Optional. The modality configs for the data store. - # @!attribute [rw] filter_parameter_behavior - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::FilterParameterBehavior] - # Optional. The filter parameter behavior. - class DataStoreTool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Rewriter configuration. - # @!attribute [rw] model_settings - # @return [::Google::Cloud::Ces::V1beta::ModelSettings] - # Required. Configurations for the LLM model. - # @!attribute [rw] prompt - # @return [::String] - # Optional. The prompt definition. If not set, default prompt will be used. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. Whether the rewriter is disabled. - class RewriterConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Summarization configuration. - # @!attribute [rw] model_settings - # @return [::Google::Cloud::Ces::V1beta::ModelSettings] - # Optional. Configurations for the LLM model. - # @!attribute [rw] prompt - # @return [::String] - # Optional. The prompt definition. If not set, default prompt will be used. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. Whether summarization is disabled. - class SummarizationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Grounding configuration. - # @!attribute [rw] grounding_level - # @return [::Float] - # Optional. The groundedness threshold of the answer based on the retrieved - # sources. The value has a configurable range of [1, 5]. The level is used - # to threshold the groundedness of the answer, meaning that all responses - # with a groundedness score below the threshold will fall back to returning - # relevant snippets only. - # - # For example, a level of 3 means that the groundedness score must be - # 3 or higher for the response to be returned. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. Whether grounding is disabled. - class GroundingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for searching within a specific DataStore. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter specification for the DataStore. - # See: - # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata - # @!attribute [rw] data_store - # @return [::Google::Cloud::Ces::V1beta::DataStore] - # Optional. The data store. - class DataStoreSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for searching within an Engine, potentially targeting - # specific DataStores. - # @!attribute [rw] engine - # @return [::String] - # Required. Full resource name of the Engine. - # Format: - # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` - # @!attribute [rw] data_store_sources - # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::DataStoreSource>] - # Optional. Use to target specific DataStores within the Engine. - # If empty, the search applies to all DataStores associated with the - # Engine. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter applied to the search across the Engine. Not relevant - # and not used if 'data_store_sources' is provided. See: - # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata - class EngineSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Boost specifications to boost certain documents. - # For more information, please refer to - # https://cloud.google.com/generative-ai-app-builder/docs/boosting. - # @!attribute [rw] data_stores - # @return [::Array<::String>] - # Required. The Data Store where the boosting configuration is applied. - # Full resource name of DataStore, such as - # projects/\\{project}/locations/\\{location}/collections/\\{collection}/dataStores/\\{dataStore}. - # @!attribute [rw] spec - # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec>] - # Required. A list of boosting specifications. - class BoostSpecs - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Boost specification to boost certain documents. - # @!attribute [rw] condition_boost_specs - # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec::ConditionBoostSpec>] - # Required. A list of boosting specifications. - class BoostSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Boost specification for a condition. - # @!attribute [rw] condition - # @return [::String] - # Required. An expression which specifies a boost condition. The syntax - # is the same as filter expression syntax. Currently, the only supported - # condition is a list of BCP-47 lang codes. Example: To boost suggestions - # in languages en or fr: (lang_code: ANY("en", "fr")) - # @!attribute [rw] boost - # @return [::Float] - # Optional. Strength of the boost, which should be in [-1, 1]. Negative - # boost means demotion. Default is 0.0. - # - # Setting to 1.0 gives the suggestions a big promotion. However, it does - # not necessarily mean that the top result will be a boosted suggestion. - # - # Setting to -1.0 gives the suggestions a big demotion. However, other - # suggestions that are relevant might still be shown. - # - # Setting to 0.0 means no boost applied. The boosting condition is - # ignored. - # @!attribute [rw] boost_control_spec - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec] - # Optional. Complex specification for custom ranking based on customer - # defined attribute value. - class ConditionBoostSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specification for custom ranking based on customer specified attribute - # value. It provides more controls for customized ranking than the simple - # (condition, boost) combination above. - # @!attribute [rw] field_name - # @return [::String] - # Optional. The name of the field whose value will be used to determine - # the boost amount. - # @!attribute [rw] attribute_type - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType] - # Optional. The attribute type to be used to determine the boost - # amount. The attribute value can be derived from the field value of - # the specified field_name. In the case of numerical it is - # straightforward i.e. attribute_value = numerical_field_value. In the - # case of freshness however, attribute_value = (time.now() - - # datetime_field_value). - # @!attribute [rw] interpolation_type - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType] - # Optional. The interpolation type to be applied to connect the control - # points listed below. - # @!attribute [rw] control_points - # @return [::Array<::Google::Cloud::Ces::V1beta::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>] - # Optional. The control points used to define the curve. The monotonic - # function (defined through the interpolation_type above) passes - # through the control points listed here. - class BoostControlSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The control points used to define the curve. The curve defined - # through these control points can only be monotonically increasing - # or decreasing(constant values are acceptable). - # @!attribute [rw] attribute_value - # @return [::String] - # Optional. Can be one of: - # 1. The numerical field value. - # 2. The duration spec for freshness: - # The value must be formatted as an XSD `dayTimeDuration` value (a - # restricted subset of an ISO 8601 duration value). The pattern for - # this is: `[nD][T[nH][nM][nS]]`. - # @!attribute [rw] boost_amount - # @return [::Float] - # Optional. The value between -1 to 1 by which to boost the score if - # the attribute_value evaluates to the value specified above. - class ControlPoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The attribute(or function) for which the custom ranking is to be - # applied. - module AttributeType - # Unspecified AttributeType. - ATTRIBUTE_TYPE_UNSPECIFIED = 0 - - # The value of the numerical field will be used to dynamically update - # the boost amount. In this case, the attribute_value (the x value) - # of the control point will be the actual value of the numerical - # field for which the boost_amount is specified. - NUMERICAL = 1 - - # For the freshness use case the attribute value will be the duration - # between the current time and the date in the datetime field - # specified. The value must be formatted as an XSD `dayTimeDuration` - # value (a restricted subset of an ISO 8601 duration value). The - # pattern for this is: `[nD][T[nH][nM][nS]]`. - # E.g. `5D`, `3DT12H30M`, `T24H`. - FRESHNESS = 2 - end - - # The interpolation type to be applied. Default will be linear - # (Piecewise Linear). - module InterpolationType - # Interpolation type is unspecified. In this case, it defaults to - # Linear. - INTERPOLATION_TYPE_UNSPECIFIED = 0 - - # Piecewise linear interpolation will be applied. - LINEAR = 1 - end - end - end - end - - # If specified, will apply the given configuration for the specified - # modality. - # @!attribute [rw] modality_type - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::ModalityConfig::ModalityType] - # Required. The modality type. - # @!attribute [rw] rewriter_config - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::RewriterConfig] - # Optional. The rewriter config. - # @!attribute [rw] summarization_config - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::SummarizationConfig] - # Optional. The summarization config. - # @!attribute [rw] grounding_config - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool::GroundingConfig] - # Optional. The grounding configuration. - class ModalityConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The modality type. - module ModalityType - # Unspecified modality type. - MODALITY_TYPE_UNSPECIFIED = 0 - - # Text modality. - TEXT = 1 - - # Audio modality. - AUDIO = 2 - end - end - - # Filter parameter behavior. - module FilterParameterBehavior - # Default filter behavior. - # Include filter parameter for connector datastores. - # For the rest of the datastore types, the filter input parameter is - # omitted. - FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED = 0 - - # Always include filter parameter for all datastore types. - ALWAYS_INCLUDE = 2 - - # The filter parameter is never included in the list of tool parameters, - # regardless of the datastore type. - NEVER_INCLUDE = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb deleted file mode 100644 index c1c5ca0d6eb8..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/deployment.rb +++ /dev/null @@ -1,123 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Experiment for the deployment. - # @!attribute [rw] version_release - # @return [::Google::Cloud::Ces::V1beta::ExperimentConfig::VersionRelease] - # Optional. Version release for the experiment. - class ExperimentConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Version release for the experiment. - # @!attribute [rw] state - # @return [::Google::Cloud::Ces::V1beta::ExperimentConfig::State] - # Optional. State of the version release. - # @!attribute [rw] traffic_allocations - # @return [::Array<::Google::Cloud::Ces::V1beta::ExperimentConfig::VersionRelease::TrafficAllocation>] - # Optional. Traffic allocations for the version release. - class VersionRelease - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Traffic allocation for the version release. - # @!attribute [rw] id - # @return [::String] - # Optional. Id of the traffic allocation. - # Free format string, up to 128 characters. - # @!attribute [rw] traffic_percentage - # @return [::Integer] - # Optional. Traffic percentage of the traffic allocation. - # Must be between 0 and 100. - # @!attribute [rw] app_version - # @return [::String] - # Optional. App version of the traffic allocation. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - class TrafficAllocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # State of the experiment. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # Pending state. Experiment is pending and not valid. - PENDING = 1 - - # Running state. Experiment is running and valid. - RUNNING = 2 - - # Done state. Experiment is done and no longer valid. - DONE = 3 - - # Expired state. Experiment is expired and no longer valid. - EXPIRED = 4 - end - end - - # A deployment represents an immutable, queryable version of the app. - # It is used to deploy an app version with a specific channel profile. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the deployment. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the deployment. - # @!attribute [rw] app_version - # @return [::String] - # Optional. The resource name of the app version to deploy. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # Use `projects/{project}/locations/{location}/apps/{app}/versions/-` to use - # the draft app. - # @!attribute [rw] channel_profile - # @return [::Google::Cloud::Ces::V1beta::ChannelProfile] - # Required. The channel profile used in the deployment. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this deployment was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this deployment was last updated. - # @!attribute [r] etag - # @return [::String] - # Output only. Etag used to ensure the object hasn't changed during a - # read-modify-write operation. If the etag is empty, the update will - # overwrite any concurrent changes. - # @!attribute [rw] experiment_config - # @return [::Google::Cloud::Ces::V1beta::ExperimentConfig] - # Optional. Experiment configuration for the deployment. - class Deployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb deleted file mode 100644 index c21e5c694ce9..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation.rb +++ /dev/null @@ -1,1687 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Aggregated metrics for an evaluation or evaluation dataset. - # @!attribute [r] metrics_by_app_version - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::MetricsByAppVersion>] - # Output only. Aggregated metrics, grouped by app version ID. - class AggregatedMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single tool. - # @!attribute [r] tool - # @return [::String] - # Output only. The name of the tool. - # @!attribute [r] pass_count - # @return [::Integer] - # Output only. The number of times the tool passed. - # @!attribute [r] fail_count - # @return [::Integer] - # Output only. The number of times the tool failed. - class ToolMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metrics for turn latency. - # @!attribute [r] average_latency - # @return [::Google::Protobuf::Duration] - # Output only. The average latency of the turns. - class TurnLatencyMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metrics for tool call latency. - # @!attribute [r] tool - # @return [::String] - # Output only. The name of the tool. - # @!attribute [r] average_latency - # @return [::Google::Protobuf::Duration] - # Output only. The average latency of the tool calls. - class ToolCallLatencyMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metrics for semantic similarity results. - # @!attribute [r] score - # @return [::Float] - # Output only. The average semantic similarity score (0-4). - class SemanticSimilarityMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metrics for hallucination results. - # @!attribute [r] score - # @return [::Float] - # Output only. The average hallucination score (0 to 1). - class HallucinationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metrics aggregated per app version. - # @!attribute [r] app_version_id - # @return [::String] - # Output only. The app version ID. - # @!attribute [r] tool_metrics - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolMetrics>] - # Output only. Metrics for each tool within this app version. - # @!attribute [r] semantic_similarity_metrics - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::SemanticSimilarityMetrics>] - # Output only. Metrics for semantic similarity within this app version. - # @!attribute [r] hallucination_metrics - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::HallucinationMetrics>] - # Output only. Metrics for hallucination within this app version. - # @!attribute [r] tool_call_latency_metrics - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolCallLatencyMetrics>] - # Output only. Metrics for tool call latency within this app version. - # @!attribute [r] turn_latency_metrics - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::TurnLatencyMetrics>] - # Output only. Metrics for turn latency within this app version. - # @!attribute [r] pass_count - # @return [::Integer] - # Output only. The number of times the evaluation passed. - # @!attribute [r] fail_count - # @return [::Integer] - # Output only. The number of times the evaluation failed. - # @!attribute [r] metrics_by_turn - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::MetricsByTurn>] - # Output only. Metrics aggregated per turn within this app version. - class MetricsByAppVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metrics aggregated per turn. - # @!attribute [r] turn_index - # @return [::Integer] - # Output only. The turn index (0-based). - # @!attribute [r] tool_metrics - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolMetrics>] - # Output only. Metrics for each tool within this turn. - # @!attribute [r] semantic_similarity_metrics - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::SemanticSimilarityMetrics>] - # Output only. Metrics for semantic similarity within this turn. - # @!attribute [r] hallucination_metrics - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::HallucinationMetrics>] - # Output only. Metrics for hallucination within this turn. - # @!attribute [r] tool_call_latency_metrics - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::ToolCallLatencyMetrics>] - # Output only. Metrics for tool call latency within this turn. - # @!attribute [r] turn_latency_metrics - # @return [::Array<::Google::Cloud::Ces::V1beta::AggregatedMetrics::TurnLatencyMetrics>] - # Output only. Metrics for turn latency within this turn. - class MetricsByTurn - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An evaluation represents all of the information needed to simulate and - # evaluate an agent. - # @!attribute [rw] golden - # @return [::Google::Cloud::Ces::V1beta::Evaluation::Golden] - # Optional. The golden steps to be evaluated. - # - # Note: The following fields are mutually exclusive: `golden`, `scenario`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] scenario - # @return [::Google::Cloud::Ces::V1beta::Evaluation::Scenario] - # Optional. The config for a scenario. - # - # Note: The following fields are mutually exclusive: `scenario`, `golden`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of this evaluation. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @!attribute [rw] display_name - # @return [::String] - # Required. User-defined display name of the evaluation. Unique within an - # App. - # @!attribute [rw] description - # @return [::String] - # Optional. User-defined description of the evaluation. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Optional. User defined tags to categorize the evaluation. - # @!attribute [r] evaluation_datasets - # @return [::Array<::String>] - # Output only. List of evaluation datasets the evaluation belongs to. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the evaluation was created. - # @!attribute [r] created_by - # @return [::String] - # Output only. The user who created the evaluation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the evaluation was last updated. - # @!attribute [r] last_updated_by - # @return [::String] - # Output only. The user who last updated the evaluation. - # @!attribute [r] evaluation_runs - # @return [::Array<::String>] - # Output only. The EvaluationRuns that this Evaluation is associated with. - # @!attribute [r] etag - # @return [::String] - # Output only. Etag used to ensure the object hasn't changed during a - # read-modify-write operation. If the etag is empty, the update will - # overwrite any concurrent changes. - # @!attribute [r] aggregated_metrics - # @return [::Google::Cloud::Ces::V1beta::AggregatedMetrics] - # Output only. The aggregated metrics for this evaluation across all runs. - # @!attribute [r] last_completed_result - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult] - # Output only. The latest evaluation result for this evaluation. - # @!attribute [r] invalid - # @return [::Boolean] - # Output only. Whether the evaluation is invalid. This can happen if an - # evaluation is referencing a tool, toolset, or agent that has since been - # deleted. - # @!attribute [r] last_ten_results - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult>] - # Output only. The last 10 evaluation results for this evaluation. This is - # only populated if include_last_ten_results is set to true in the - # ListEvaluationsRequest or GetEvaluationRequest. - # @!attribute [rw] evaluation_metrics_threshold_override - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds] - # Optional. Overrides metrics thresholds for this specific evaluation. - # @!attribute [rw] evaluation_metrics_config_override - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig] - # Optional. Overrides metrics config for this specific evaluation. - class Evaluation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a single, checkable requirement. - # @!attribute [rw] tool_call - # @return [::Google::Cloud::Ces::V1beta::ToolCall] - # Optional. Check that a specific tool was called with the parameters. - # - # Note: The following fields are mutually exclusive: `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tool_response - # @return [::Google::Cloud::Ces::V1beta::ToolResponse] - # Optional. Check that a specific tool had the expected response. - # - # Note: The following fields are mutually exclusive: `tool_response`, `tool_call`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] agent_response - # @return [::Google::Cloud::Ces::V1beta::Message] - # Optional. Check that the agent responded with the correct response. The - # role "agent" is implied. - # - # Note: The following fields are mutually exclusive: `agent_response`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] agent_transfer - # @return [::Google::Cloud::Ces::V1beta::AgentTransfer] - # Optional. Check that the agent transferred the conversation to a - # different agent. - # - # Note: The following fields are mutually exclusive: `agent_transfer`, `tool_call`, `tool_response`, `agent_response`, `updated_variables`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] updated_variables - # @return [::Google::Protobuf::Struct] - # Optional. Check that the agent updated the session variables to the - # expected values. Used to also capture agent variable updates for golden - # evals. - # - # Note: The following fields are mutually exclusive: `updated_variables`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `mock_tool_response`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mock_tool_response - # @return [::Google::Cloud::Ces::V1beta::ToolResponse] - # Optional. The tool response to mock, with the parameters of interest - # specified. Any parameters not specified will be hallucinated by the - # LLM. - # - # Note: The following fields are mutually exclusive: `mock_tool_response`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `no_tool_calls`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] no_tool_calls - # @return [::Boolean] - # Optional. Check that no tools were called during this turn. - # - # Note: The following fields are mutually exclusive: `no_tool_calls`, `tool_call`, `tool_response`, `agent_response`, `agent_transfer`, `updated_variables`, `mock_tool_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] note - # @return [::String] - # Optional. A note for this requirement, useful in reporting when specific - # checks fail. E.g., "Check_Payment_Tool_Called". - # @!attribute [rw] skip_evaluation - # @return [::Boolean] - # Optional. If set to true, this specific expectation will not be - # evaluated. - # @!attribute [rw] expectation_level_metrics_thresholds_override - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::ExpectationLevelMetricsThresholds] - # Optional. Overrides metrics at the step level. - # @!attribute [rw] agent_response_semantic_similarity_metrics_config_override - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::SemanticSimilarityMetricsConfig] - # Optional. Overrides for agent_response semantic similarity metrics. - # @!attribute [rw] agent_response_hallucination_metrics_config_override - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::HallucinationMetricsConfig] - # Optional. Overrides for agent_response hallucination metrics. - # @!attribute [rw] comparison_type - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsConfig::ComparisonType] - # Optional. The comparison type to use for the expectation check. - class GoldenExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A step defines a singular action to happen during the evaluation. - # @!attribute [rw] user_input - # @return [::Google::Cloud::Ces::V1beta::SessionInput] - # Optional. User input for the conversation. - # - # Note: The following fields are mutually exclusive: `user_input`, `agent_transfer`, `expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] agent_transfer - # @return [::Google::Cloud::Ces::V1beta::AgentTransfer] - # Optional. Transfer the conversation to a different agent. - # - # Note: The following fields are mutually exclusive: `agent_transfer`, `user_input`, `expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] expectation - # @return [::Google::Cloud::Ces::V1beta::Evaluation::GoldenExpectation] - # Optional. Executes an expectation on the current turn. - # - # Note: The following fields are mutually exclusive: `expectation`, `user_input`, `agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Step - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A golden turn defines a single turn in a golden conversation. - # @!attribute [rw] steps - # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::Step>] - # Required. The steps required to replay a golden conversation. - # @!attribute [rw] root_span - # @return [::Google::Cloud::Ces::V1beta::Span] - # Optional. The root span of the golden turn for processing and maintaining - # audio information. The uri for the audio must contain audio saved in - # 16Khz sample rate. - # @!attribute [rw] turn_level_metrics_thresholds_override - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::GoldenEvaluationMetricsThresholds::TurnLevelMetricsThresholds] - # Optional. Overrides for turn-level metric thresholds. - # @!attribute [rw] hallucination_metric_behavior_override - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds::HallucinationMetricBehavior] - # Optional. Override for turn-level hallucination metric behavior. - class GoldenTurn - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The steps required to replay a golden conversation. - # @!attribute [rw] turns - # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::GoldenTurn>] - # Required. The golden turns required to replay a golden conversation. - # The maximum number of allowed turns is 100. - # @!attribute [rw] evaluation_expectations - # @return [::Array<::String>] - # Optional. The evaluation expectations to evaluate the replayed - # conversation against. Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}` - class Golden - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The expectation to evaluate the conversation produced by the simulation. - # @!attribute [rw] tool_expectation - # @return [::Google::Cloud::Ces::V1beta::Evaluation::ScenarioExpectation::ToolExpectation] - # Optional. The tool call and response pair to be evaluated. - # - # Note: The following fields are mutually exclusive: `tool_expectation`, `agent_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] agent_response - # @return [::Google::Cloud::Ces::V1beta::Message] - # Optional. The agent response to be evaluated. - # - # Note: The following fields are mutually exclusive: `agent_response`, `tool_expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ScenarioExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The tool call and response pair to be evaluated. - # @!attribute [rw] expected_tool_call - # @return [::Google::Cloud::Ces::V1beta::ToolCall] - # Required. The expected tool call, with the parameters of interest - # specified. Any parameters not specified will be hallucinated by the - # LLM. - # @!attribute [rw] mock_tool_response - # @return [::Google::Cloud::Ces::V1beta::ToolResponse] - # Required. The tool response to mock, with the parameters of interest - # specified. Any parameters not specified will be hallucinated by the - # LLM. - class ToolExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The config for a scenario - # @!attribute [rw] task - # @return [::String] - # Required. The task to be targeted by the scenario. - # @!attribute [rw] user_facts - # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::Scenario::UserFact>] - # Optional. The user facts to be used by the scenario. - # @!attribute [rw] max_turns - # @return [::Integer] - # Optional. The maximum number of turns to simulate. The maximum allowed - # value is 100. The default value is 100. - # @!attribute [rw] rubrics - # @return [::Array<::String>] - # Required. The rubrics to score the scenario against. - # @!attribute [rw] scenario_expectations - # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::ScenarioExpectation>] - # Required. The ScenarioExpectations to evaluate the conversation produced - # by the user simulation. - # @!attribute [rw] variable_overrides - # @return [::Google::Protobuf::Struct] - # Optional. Variables / Session Parameters as context for the session, - # keyed by variable names. Members of this struct will override any default - # values set by the system. - # - # Note, these are different from user facts, which are facts known to the - # user. Variables are parameters known to the agent: i.e. MDN (phone - # number) passed by the telephony system. - # @!attribute [rw] task_completion_behavior - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::Evaluation::Scenario::TaskCompletionBehavior] - # Optional. Deprecated. Use user_goal_behavior instead. - # @!attribute [rw] user_goal_behavior - # @return [::Google::Cloud::Ces::V1beta::Evaluation::Scenario::UserGoalBehavior] - # Optional. The expected behavior of the user goal. - # @!attribute [rw] evaluation_expectations - # @return [::Array<::String>] - # Optional. The evaluation expectations to evaluate the conversation - # produced by the simulation against. Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}` - # @!attribute [rw] scenario_execution_mode - # @return [::Google::Cloud::Ces::V1beta::EvaluationSettings::ScenarioExecutionMode] - # Optional. The execution mode for scenario evaluations. - class Scenario - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Facts about the user as a key value pair. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the user fact. - # @!attribute [rw] value - # @return [::String] - # Required. The value of the user fact. - class UserFact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The expected behavior of the user task. This is used to determine whether - # the scenario is successful. - module TaskCompletionBehavior - # Behavior unspecified. Will default to TASK_SATISFIED. - TASK_COMPLETION_BEHAVIOR_UNSPECIFIED = 0 - - # The user task should be completed successfully. - TASK_SATISFIED = 1 - - # The user task should be rejected. - TASK_REJECTED = 2 - end - - # The expected behavior of the user goal. This is used to determine whether - # the scenario is successful. - module UserGoalBehavior - # Behavior unspecified. Will default to USER_GOAL_SATISFIED. - USER_GOAL_BEHAVIOR_UNSPECIFIED = 0 - - # The user goal should be completed successfully. - USER_GOAL_SATISFIED = 1 - - # The user goal should be rejected. - USER_GOAL_REJECTED = 2 - - # Ignore the user goal status. - USER_GOAL_IGNORED = 3 - end - end - end - - # An evaluation dataset represents a set of evaluations that are grouped - # together basaed on shared tags. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of this evaluation dataset. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` - # @!attribute [rw] display_name - # @return [::String] - # Required. User-defined display name of the evaluation dataset. Unique - # within an App. - # @!attribute [rw] evaluations - # @return [::Array<::String>] - # Optional. Evaluations that are included in this dataset. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the evaluation dataset was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the evaluation dataset was last updated. - # @!attribute [r] etag - # @return [::String] - # Output only. Etag used to ensure the object hasn't changed during a - # read-modify-write operation. If the etag is empty, the update will - # overwrite any concurrent changes. - # @!attribute [r] created_by - # @return [::String] - # Output only. The user who created the evaluation dataset. - # @!attribute [r] last_updated_by - # @return [::String] - # Output only. The user who last updated the evaluation dataset. - # @!attribute [r] aggregated_metrics - # @return [::Google::Cloud::Ces::V1beta::AggregatedMetrics] - # Output only. The aggregated metrics for this evaluation dataset across all - # runs. - class EvaluationDataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An evaluation result represents the output of running an Evaluation. - # @!attribute [r] golden_result - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenResult] - # Output only. The outcome of a golden evaluation. - # - # Note: The following fields are mutually exclusive: `golden_result`, `scenario_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] scenario_result - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioResult] - # Output only. The outcome of a scenario evaluation. - # - # Note: The following fields are mutually exclusive: `scenario_result`, `golden_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the evaluation result. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{result}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the Evaluation Result. Unique within an - # Evaluation. By default, it has the following format: - # " result - # - ". - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the evaluation result was created. - # @!attribute [r] evaluation_status - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] - # Output only. The outcome of the evaluation. Only populated if - # execution_state is COMPLETE. - # @!attribute [r] evaluation_run - # @return [::String] - # Output only. The evaluation run that produced this result. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}` - # @!attribute [r] persona - # @return [::Google::Cloud::Ces::V1beta::EvaluationPersona] - # Output only. The persona used to generate the conversation for the - # evaluation result. - # @!attribute [r] error_info - # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo] - # Output only. Error information for the evaluation result. - # @!attribute [r] error - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Rpc::Status] - # Output only. Deprecated: Use `error_info` instead. Errors encountered - # during execution. - # @!attribute [r] initiated_by - # @return [::String] - # Output only. The user who initiated the evaluation run that resulted in - # this result. - # @!attribute [r] app_version - # @return [::String] - # Output only. The app version used to generate the conversation that - # resulted in this result. Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # @!attribute [r] app_version_display_name - # @return [::String] - # Output only. The display name of the `app_version` that the evaluation ran - # against. - # @!attribute [r] changelog - # @return [::String] - # Output only. The changelog of the app version that the evaluation ran - # against. This is populated if user runs evaluation on latest/draft. - # @!attribute [r] changelog_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The create time of the changelog of the app version that the - # evaluation ran against. This is populated if user runs evaluation on - # latest/draft. - # @!attribute [r] execution_state - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::ExecutionState] - # Output only. The state of the evaluation result execution. - # @!attribute [r] evaluation_metrics_thresholds - # @return [::Google::Cloud::Ces::V1beta::EvaluationMetricsThresholds] - # Output only. The evaluation thresholds for the result. - # @!attribute [r] config - # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig] - # Output only. The configuration used in the evaluation run that resulted in - # this result. - # @!attribute [r] golden_run_method - # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod] - # Output only. The method used to run the golden evaluation. - class EvaluationResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the expectation and the result of that expectation. - # @!attribute [r] observed_tool_call - # @return [::Google::Cloud::Ces::V1beta::ToolCall] - # Output only. The result of the tool call expectation. - # - # Note: The following fields are mutually exclusive: `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_agent_transfer`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] observed_tool_response - # @return [::Google::Cloud::Ces::V1beta::ToolResponse] - # Output only. The result of the tool response expectation. - # - # Note: The following fields are mutually exclusive: `observed_tool_response`, `observed_tool_call`, `observed_agent_response`, `observed_agent_transfer`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] observed_agent_response - # @return [::Google::Cloud::Ces::V1beta::Message] - # Output only. The result of the agent response expectation. - # - # Note: The following fields are mutually exclusive: `observed_agent_response`, `observed_tool_call`, `observed_tool_response`, `observed_agent_transfer`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] observed_agent_transfer - # @return [::Google::Cloud::Ces::V1beta::AgentTransfer] - # Output only. The result of the agent transfer expectation. - # - # Note: The following fields are mutually exclusive: `observed_agent_transfer`, `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] observed_payload - # @return [::Google::Protobuf::Struct] - # Output only. An observed custom payload. - # There are no expectations for custom payloads. This is only used for - # metrics calculation. The outcome is always SKIPPED. - # - # Note: The following fields are mutually exclusive: `observed_payload`, `observed_tool_call`, `observed_tool_response`, `observed_agent_response`, `observed_agent_transfer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] expectation - # @return [::Google::Cloud::Ces::V1beta::Evaluation::GoldenExpectation] - # Output only. The expectation that was evaluated. - # @!attribute [r] outcome - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] - # Output only. The outcome of the expectation. - # @!attribute [r] semantic_similarity_result - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::SemanticSimilarityResult] - # Output only. The result of the semantic similarity check. - # @!attribute [r] tool_invocation_result - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenExpectationOutcome::ToolInvocationResult] - # Output only. The result of the tool invocation check. - class GoldenExpectationOutcome - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of the tool invocation check. - # @!attribute [r] parameter_correctness_score - # @return [::Float] - # Output only. The tool invocation parameter correctness score. This - # indicates the percent of parameters from the expected tool call that - # were also present in the actual tool call. - # @!attribute [r] outcome - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] - # Output only. The outcome of the tool invocation check. This is - # determined by comparing the parameter_correctness_score to the - # threshold. If the score is equal to or above the threshold, the outcome - # will be PASS. Otherwise, the outcome will be FAIL. - # @!attribute [r] explanation - # @return [::String] - # Output only. A free text explanation for the tool invocation result. - class ToolInvocationResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The result of a single evaluation expectation. - # @!attribute [r] evaluation_expectation - # @return [::String] - # Output only. The evaluation expectation. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}` - # @!attribute [r] prompt - # @return [::String] - # Output only. The prompt that was used for the evaluation. - # @!attribute [r] outcome - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] - # Output only. The outcome of the evaluation expectation. - # @!attribute [r] explanation - # @return [::String] - # Output only. The explanation for the result. - class EvaluationExpectationResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of a golden evaluation. - # @!attribute [r] turn_replay_results - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenResult::TurnReplayResult>] - # Output only. The result of running each turn of the golden conversation. - # @!attribute [r] evaluation_expectation_results - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::EvaluationExpectationResult>] - # Output only. The results of the evaluation expectations. - class GoldenResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of running a single turn of the golden conversation. - # @!attribute [r] conversation - # @return [::String] - # Output only. The conversation that was generated for this turn. - # @!attribute [r] expectation_outcome - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::GoldenExpectationOutcome>] - # Output only. The outcome of each expectation. - # @!attribute [r] hallucination_result - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::HallucinationResult] - # Output only. The result of the hallucination check. - # @!attribute [r] tool_invocation_score - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Float] - # Output only. Deprecated. Use OverallToolInvocationResult instead. - # @!attribute [r] tool_ordered_invocation_score - # @return [::Float] - # Output only. The overall tool ordered invocation score for this turn. - # This indicates the overall percent of tools from the expected turn that - # were actually invoked in the expected order. - # @!attribute [r] turn_latency - # @return [::Google::Protobuf::Duration] - # Output only. Duration of the turn. - # @!attribute [r] tool_call_latencies - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ToolCallLatency>] - # Output only. The latency of each tool call in the turn. - # @!attribute [r] semantic_similarity_result - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::SemanticSimilarityResult] - # Output only. The result of the semantic similarity check. - # @!attribute [r] overall_tool_invocation_result - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::OverallToolInvocationResult] - # Output only. The result of the overall tool invocation check. - # @!attribute [r] error_info - # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo] - # Output only. Information about the error that occurred during this - # turn. - # @!attribute [r] span_latencies - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::SpanLatency>] - # Output only. The latency of spans in the turn. - class TurnReplayResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The outcome of the evaluation against the rubric. - # @!attribute [r] rubric - # @return [::String] - # Output only. The rubric that was used to evaluate the conversation. - # @!attribute [r] score - # @return [::Float] - # Output only. The score of the conversation against the rubric. - # @!attribute [r] score_explanation - # @return [::String] - # Output only. The rater's response to the rubric. - class ScenarioRubricOutcome - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The outcome of a scenario expectation. - # @!attribute [r] observed_tool_call - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioExpectationOutcome::ObservedToolCall] - # Output only. The observed tool call. - # - # Note: The following fields are mutually exclusive: `observed_tool_call`, `observed_agent_response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] observed_agent_response - # @return [::Google::Cloud::Ces::V1beta::Message] - # Output only. The observed agent response. - # - # Note: The following fields are mutually exclusive: `observed_agent_response`, `observed_tool_call`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] expectation - # @return [::Google::Cloud::Ces::V1beta::Evaluation::ScenarioExpectation] - # Output only. The expectation that was evaluated. - # @!attribute [r] outcome - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] - # Output only. The outcome of the ScenarioExpectation. - class ScenarioExpectationOutcome - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The observed tool call and response. - # @!attribute [r] tool_call - # @return [::Google::Cloud::Ces::V1beta::ToolCall] - # Output only. The observed tool call. - # @!attribute [r] tool_response - # @return [::Google::Cloud::Ces::V1beta::ToolResponse] - # Output only. The observed tool response. - class ObservedToolCall - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The outcome of a scenario evaluation. - # @!attribute [r] conversation - # @return [::String] - # Output only. The conversation that was generated in the scenario. - # @!attribute [r] task - # @return [::String] - # Output only. The task that was used when running the scenario for this - # result. - # @!attribute [r] user_facts - # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation::Scenario::UserFact>] - # Output only. The user facts that were used by the scenario for this - # result. - # @!attribute [r] expectation_outcomes - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioExpectationOutcome>] - # Output only. The outcome of each expectation. - # @!attribute [r] rubric_outcomes - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ScenarioRubricOutcome>] - # Output only. The outcome of the rubric. - # @!attribute [r] hallucination_result - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::HallucinationResult>] - # Output only. The result of the hallucination check. - # There will be one hallucination result for each turn in the conversation. - # @!attribute [r] task_completion_result - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::TaskCompletionResult] - # Output only. The result of the task completion check. - # @!attribute [r] tool_call_latencies - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::ToolCallLatency>] - # Output only. The latency of each tool call execution in the conversation. - # @!attribute [r] user_goal_satisfaction_result - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::UserGoalSatisfactionResult] - # Output only. The result of the user goal satisfaction check. - # @!attribute [r] all_expectations_satisfied - # @return [::Boolean] - # Output only. Whether all expectations were satisfied for this turn. - # @!attribute [r] task_completed - # @return [::Boolean] - # Output only. Whether the task was completed for this turn. This is a - # composite of all expectations satisfied, no hallucinations, and user goal - # satisfaction. - # @!attribute [r] span_latencies - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::SpanLatency>] - # Output only. The latency of spans in the conversation. - # @!attribute [r] evaluation_expectation_results - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult::EvaluationExpectationResult>] - # Output only. The results of the evaluation expectations. - class ScenarioResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The latency of a span execution. - # @!attribute [r] resource - # @return [::String] - # Output only. The resource name of the guardrail or tool spans. - # - # Note: The following fields are mutually exclusive: `resource`, `toolset`, `model`, `callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] toolset - # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] - # Output only. The toolset tool identifier. - # - # Note: The following fields are mutually exclusive: `toolset`, `resource`, `model`, `callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] model - # @return [::String] - # Output only. The name of the LLM span. - # - # Note: The following fields are mutually exclusive: `model`, `resource`, `toolset`, `callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] callback - # @return [::String] - # Output only. The name of the user callback span. - # - # Note: The following fields are mutually exclusive: `callback`, `resource`, `toolset`, `model`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] type - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::SpanLatency::Type] - # Output only. The type of span. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name of the span. Applicable to tool and - # guardrail spans. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The start time of span. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The end time of span. - # @!attribute [r] execution_latency - # @return [::Google::Protobuf::Duration] - # Output only. The latency of span. - class SpanLatency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of span. - # Additional values may be added in the future. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # Tool call span. - TOOL = 1 - - # User callback span. - USER_CALLBACK = 2 - - # Guardrail span. - GUARDRAIL = 3 - - # LLM span. - LLM = 4 - end - end - - # The latency of a tool call execution. - # @!attribute [r] tool - # @return [::String] - # Output only. The name of the tool that got executed. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}`. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name of the tool. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The start time of the tool call execution. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The end time of the tool call execution. - # @!attribute [r] execution_latency - # @return [::Google::Protobuf::Duration] - # Output only. The latency of the tool call execution. - class ToolCallLatency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of the hallucination check for a single turn. - # @!attribute [r] score - # @return [::Integer] - # Output only. The hallucination score. Can be -1, 0, 1. - # @!attribute [r] label - # @return [::String] - # Output only. The label associated with each score. - # Score 1: Justified - # Score 0: Not Justified - # Score -1: No Claim To Assess - # @!attribute [r] explanation - # @return [::String] - # Output only. The explanation for the hallucination score. - class HallucinationResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of a user goal satisfaction check for a conversation. - # @!attribute [r] score - # @return [::Integer] - # Output only. The user task satisfaction score. Can be -1, 0, 1. - # @!attribute [r] label - # @return [::String] - # Output only. The label associated with each score. - # Score 1: User Task Satisfied - # Score 0: User Task Not Satisfied - # Score -1: User Task Unspecified - # @!attribute [r] explanation - # @return [::String] - # Output only. The explanation for the user task satisfaction score. - class UserGoalSatisfactionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of the semantic similarity check. - # @!attribute [r] score - # @return [::Integer] - # Output only. The semantic similarity score. Can be 0, 1, 2, 3, or 4. - # @!attribute [r] label - # @return [::String] - # Output only. The label associated with each score. - # Score 4: Fully Consistent - # Score 3: Mostly Consistent - # Score 2: Partially Consistent (Minor Omissions) - # Score 1: Largely Inconsistent (Major Omissions) - # Score 0: Completely Inconsistent / Contradictory - # @!attribute [r] explanation - # @return [::String] - # Output only. The explanation for the semantic similarity score. - # @!attribute [r] outcome - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] - # Output only. The outcome of the semantic similarity check. This is - # determined by comparing the score to the - # semantic_similarity_success_threshold. If the score is equal to or above - # the threshold, the outcome will be PASS. Otherwise, the outcome will be - # FAIL. - class SemanticSimilarityResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of the overall tool invocation check. - # @!attribute [rw] tool_invocation_score - # @return [::Float] - # The overall tool invocation score for this turn. This indicates the - # overall percent of tools from the expected turn that were actually - # invoked. - # @!attribute [r] outcome - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] - # Output only. The outcome of the tool invocation check. This is determined - # by comparing the tool_invocation_score to the - # overall_tool_invocation_correctness_threshold. If the - # score is equal to or above the threshold, the outcome will be PASS. - # Otherwise, the outcome will be FAIL. - class OverallToolInvocationResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of the task completion check for the conversation. - # @!attribute [r] score - # @return [::Integer] - # Output only. The task completion score. Can be -1, 0, 1 - # @!attribute [r] label - # @return [::String] - # Output only. The label associated with each score. - # Score 1: Task Completed - # Score 0: Task Not Completed - # Score -1: User Goal Undefined - # @!attribute [r] explanation - # @return [::String] - # Output only. The explanation for the task completion score. - class TaskCompletionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The outcome of the evaluation or expectation. - module Outcome - # Evaluation outcome is not specified. - OUTCOME_UNSPECIFIED = 0 - - # Evaluation/Expectation passed. In the case of an evaluation, this means - # that all expectations were met. - PASS = 1 - - # Evaluation/Expectation failed. In the case of an evaluation, this means - # that at least one expectation was not met. - FAIL = 2 - - # Evaluation/Expectation was skipped. - SKIPPED = 3 - end - - # The state of the evaluation result execution. - module ExecutionState - # Evaluation result execution state is not specified. - EXECUTION_STATE_UNSPECIFIED = 0 - - # Evaluation result execution is queued. - QUEUED = 5 - - # Evaluation result execution is running. - RUNNING = 1 - - # Evaluation result execution has completed. - COMPLETED = 2 - - # Evaluation result execution failed due to an internal error. - ERROR = 3 - - # Evaluation result execution was cancelled. - CANCELLED = 4 - end - end - - # An evaluation run represents an all the evaluation results from an - # evaluation execution. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the evaluation run. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. User-defined display name of the evaluation run. - # default: " run - ". - # @!attribute [r] evaluation_results - # @return [::Array<::String>] - # Output only. The evaluation results that are part of this run. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{result}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the evaluation run was created. - # @!attribute [r] initiated_by - # @return [::String] - # Output only. The user who initiated the evaluation run. - # @!attribute [r] app_version - # @return [::String] - # Output only. The app version to evaluate. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # @!attribute [r] app_version_display_name - # @return [::String] - # Output only. The display name of the `app_version` that the evaluation ran - # against. - # @!attribute [r] changelog - # @return [::String] - # Output only. The changelog of the app version that the evaluation ran - # against. This is populated if user runs evaluation on latest/draft. - # @!attribute [r] changelog_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The create time of the changelog of the app version that the - # evaluation ran against. This is populated if user runs evaluation on - # latest/draft. - # @!attribute [r] evaluations - # @return [::Array<::String>] - # Output only. The evaluations that are part of this run. The list may - # contain evaluations of either type. This field is mutually exclusive with - # `evaluation_dataset`. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @!attribute [r] evaluation_dataset - # @return [::String] - # Output only. The evaluation dataset that this run is associated with. This - # field is mutually exclusive with `evaluations`. Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` - # @!attribute [r] evaluation_type - # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationType] - # Output only. The type of the evaluations in this run. - # @!attribute [r] state - # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationRunState] - # Output only. The state of the evaluation run. - # @!attribute [r] progress - # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::Progress] - # Output only. The progress of the evaluation run. - # @!attribute [r] config - # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig] - # Output only. The configuration used in the run. - # @!attribute [r] error - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Rpc::Status] - # Output only. Deprecated: Use error_info instead. Errors encountered during - # execution. - # @!attribute [r] error_info - # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo] - # Output only. Error information for the evaluation run. - # @!attribute [r] evaluation_run_summaries - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationRunSummary}] - # Output only. Map of evaluation name to EvaluationRunSummary. - # @!attribute [r] latency_report - # @return [::Google::Cloud::Ces::V1beta::LatencyReport] - # Output only. Latency report for the evaluation run. - # @!attribute [r] run_count - # @return [::Integer] - # Output only. The number of times the evaluations inside the run were run. - # @!attribute [r] persona_run_configs - # @return [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig>] - # Output only. The configuration to use for the run per persona. - # @!attribute [rw] optimization_config - # @return [::Google::Cloud::Ces::V1beta::OptimizationConfig] - # Optional. Configuration for running the optimization step after the - # evaluation run. If not set, the optimization step will not be run. - # @!attribute [r] scheduled_evaluation_run - # @return [::String] - # Output only. The scheduled evaluation run resource name that created this - # evaluation run. This field is only set if the evaluation run was created - # by a scheduled evaluation run. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}` - # @!attribute [r] golden_run_method - # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod] - # Output only. The method used to run the evaluation. - # @!attribute [r] operation - # @return [::String] - # Output only. The operation that created this evaluation run. - # Format: - # `projects/{project}/locations/{location}/operations/{operation}` - class EvaluationRun - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The progress of the evaluation run. - # @!attribute [r] total_count - # @return [::Integer] - # Output only. Total number of evaluation results in this run. - # @!attribute [r] failed_count - # @return [::Integer] - # Output only. Number of completed evaluation results with an outcome of - # FAIL. (EvaluationResult.execution_state is COMPLETED and - # EvaluationResult.evaluation_status is FAIL). - # @!attribute [r] error_count - # @return [::Integer] - # Output only. Number of evaluation results that failed to execute. - # (EvaluationResult.execution_state is ERROR). - # @!attribute [r] completed_count - # @return [::Integer] - # Output only. Number of evaluation results that finished successfully. - # (EvaluationResult.execution_state is COMPLETED). - # @!attribute [r] passed_count - # @return [::Integer] - # Output only. Number of completed evaluation results with an outcome of - # PASS. (EvaluationResult.execution_state is COMPLETED and - # EvaluationResult.evaluation_status is PASS). - # @!attribute [r] cancelled_count - # @return [::Integer] - # Output only. Number of evaluation results that were cancelled. - # (EvaluationResult.execution_state is CANCELLED). - class Progress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains the summary of passed and failed result counts for a specific - # evaluation in an evaluation run. - # @!attribute [r] passed_count - # @return [::Integer] - # Output only. Number of passed results for the associated Evaluation in - # this run. - # @!attribute [r] failed_count - # @return [::Integer] - # Output only. Number of failed results for the associated Evaluation in - # this run. - # @!attribute [r] error_count - # @return [::Integer] - # Output only. Number of error results for the associated Evaluation in - # this run. - class EvaluationRunSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Ces::V1beta::EvaluationRun::EvaluationRunSummary] - class EvaluationRunSummariesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of the evaluations in this run. - # Additional values may be added in the future. - module EvaluationType - # Evaluation type is not specified. - EVALUATION_TYPE_UNSPECIFIED = 0 - - # Golden evaluation. - GOLDEN = 1 - - # Scenario evaluation. - SCENARIO = 2 - - # Indicates the run includes a mix of golden and scenario evaluations. - MIXED = 3 - end - - # The state of the evaluation run. - module EvaluationRunState - # Evaluation run state is not specified. - EVALUATION_RUN_STATE_UNSPECIFIED = 0 - - # Indicates the evaluation run is queued. - QUEUED = 5 - - # Evaluation run is running. - RUNNING = 1 - - # Evaluation run has completed. - COMPLETED = 2 - - # The evaluation run has an error. - ERROR = 3 - - # Evaluation run was cancelled. - CANCELLED = 4 - end - end - - # Latency report for the evaluation run. - # @!attribute [r] tool_latencies - # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::ToolLatency>] - # Output only. Unordered list. Latency metrics for each tool. - # @!attribute [r] callback_latencies - # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::CallbackLatency>] - # Output only. Unordered list. Latency metrics for each callback. - # @!attribute [r] guardrail_latencies - # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::GuardrailLatency>] - # Output only. Unordered list. Latency metrics for each guardrail. - # @!attribute [r] llm_call_latencies - # @return [::Array<::Google::Cloud::Ces::V1beta::LatencyReport::LlmCallLatency>] - # Output only. Unordered list. Latency metrics for each LLM call. - # @!attribute [r] session_count - # @return [::Integer] - # Output only. The total number of sessions considered in the latency report. - class LatencyReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Latency metrics for a component. - # @!attribute [r] p50_latency - # @return [::Google::Protobuf::Duration] - # Output only. The 50th percentile latency. - # @!attribute [r] p90_latency - # @return [::Google::Protobuf::Duration] - # Output only. The 90th percentile latency. - # @!attribute [r] p99_latency - # @return [::Google::Protobuf::Duration] - # Output only. The 99th percentile latency. - # @!attribute [r] call_count - # @return [::Integer] - # Output only. The number of times the resource was called. - class LatencyMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Latency metrics for a single tool. - # @!attribute [r] tool - # @return [::String] - # Output only. Format: - # `projects/{project}/locations/{location}/apps/{app}/tools/{tool}`. - # - # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] toolset_tool - # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] - # Output only. The toolset tool identifier. - # - # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] tool_display_name - # @return [::String] - # Output only. The display name of the tool. - # @!attribute [r] latency_metrics - # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics] - # Output only. The latency metrics for the tool. - class ToolLatency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Latency metrics for a single callback. - # @!attribute [r] stage - # @return [::String] - # Output only. The stage of the callback. - # @!attribute [r] latency_metrics - # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics] - # Output only. The latency metrics for the callback. - class CallbackLatency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Latency metrics for a single guardrail. - # @!attribute [r] guardrail - # @return [::String] - # Output only. The name of the guardrail. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}`. - # @!attribute [r] guardrail_display_name - # @return [::String] - # Output only. The display name of the guardrail. - # @!attribute [r] latency_metrics - # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics] - # Output only. The latency metrics for the guardrail. - class GuardrailLatency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Latency metrics for a single LLM call. - # @!attribute [r] model - # @return [::String] - # Output only. The name of the model. - # @!attribute [r] latency_metrics - # @return [::Google::Cloud::Ces::V1beta::LatencyReport::LatencyMetrics] - # Output only. The latency metrics for the LLM call. - class LlmCallLatency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An evaluation expectation represents a specific criteria to evaluate against. - # @!attribute [rw] llm_criteria - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation::LlmCriteria] - # Optional. Evaluation criteria based on an LLM prompt. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of this evaluation expectation. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}` - # @!attribute [rw] display_name - # @return [::String] - # Required. User-defined display name. Must be unique within the app. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Optional. User-defined tags for expectations. Can be used to filter - # expectations. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the evaluation expectation was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the evaluation expectation was last updated. - # @!attribute [r] etag - # @return [::String] - # Output only. Etag used to ensure the object hasn't changed during a - # read-modify-write operation. If the etag is empty, the update will - # overwrite any concurrent changes. - class EvaluationExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for LLM-based evaluation criteria. - # @!attribute [rw] prompt - # @return [::String] - # Required. The prompt/instructions provided to the LLM judge. - class LlmCriteria - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # EvaluationConfig configures settings for running the evaluation. - # @!attribute [rw] input_audio_config - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::InputAudioConfig] - # Optional. Configuration for processing the input audio. - # @!attribute [rw] output_audio_config - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::OutputAudioConfig] - # Optional. Configuration for generating the output audio. - # @!attribute [rw] evaluation_channel - # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig::EvaluationChannel] - # Optional. The channel to evaluate. - # @!attribute [rw] tool_call_behaviour - # @return [::Google::Cloud::Ces::V1beta::EvaluationToolCallBehaviour] - # Optional. Specifies whether the evaluation should use real tool calls or - # fake tools. - class EvaluationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The channel to evaluate. - module EvaluationChannel - # Unspecified evaluation channel. - EVALUATION_CHANNEL_UNSPECIFIED = 0 - - # Text-only evaluation channel. - TEXT = 1 - - # Audio evaluation channel. - AUDIO = 2 - end - end - - # Information about an error encountered during an evaluation execution. - # @!attribute [r] error_type - # @return [::Google::Cloud::Ces::V1beta::EvaluationErrorInfo::ErrorType] - # Output only. The type of error. - # @!attribute [r] error_message - # @return [::String] - # Output only. The error message. - # @!attribute [r] session_id - # @return [::String] - # Output only. The session ID for the conversation that caused the error. - # @!attribute [r] user_facing_error_message - # @return [::String] - # Output only. The user facing error message. - class EvaluationErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of error - module ErrorType - # Unspecified error type. - ERROR_TYPE_UNSPECIFIED = 0 - - # Failure during runtime execution. - RUNTIME_FAILURE = 1 - - # Failure to retrieve conversation from CES Runtime. - CONVERSATION_RETRIEVAL_FAILURE = 2 - - # Failure to calculate a metric / outcome. - METRIC_CALCULATION_FAILURE = 3 - - # Failure to update the evaluation. - EVALUATION_UPDATE_FAILURE = 4 - - # Ran out of quota. - QUOTA_EXHAUSTED = 5 - - # Failure during user simulation. - USER_SIMULATION_FAILURE = 6 - end - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation EvaluationService.RunEvaluation}. - # @!attribute [rw] app - # @return [::String] - # Required. The app to evaluate. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] evaluations - # @return [::Array<::String>] - # Optional. List of evaluations to run. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @!attribute [rw] evaluation_dataset - # @return [::String] - # Optional. An evaluation dataset to run. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the evaluation run. - # @!attribute [rw] app_version - # @return [::String] - # Optional. The app version to evaluate. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/versions/{version}` - # @!attribute [rw] config - # @return [::Google::Cloud::Ces::V1beta::EvaluationConfig] - # Optional. The configuration to use for the run. - # @!attribute [rw] run_count - # @return [::Integer] - # Optional. The number of times to run the evaluation. If not set, the - # default value is 1 per golden, and 5 per scenario. - # @!attribute [rw] persona_run_configs - # @return [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig>] - # Optional. The configuration to use for the run per persona. - # @!attribute [rw] optimization_config - # @return [::Google::Cloud::Ces::V1beta::OptimizationConfig] - # Optional. Configuration for running the optimization step after the - # evaluation run. If not set, the optimization step will not be run. - # @!attribute [rw] scheduled_evaluation_run - # @return [::String] - # Optional. The resource name of the `ScheduledEvaluationRun` that is - # triggering this evaluation run. - # - # If this field is set, the `scheduled_evaluation_run` field on the created - # `EvaluationRun` resource will be populated from this value. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}` - # @!attribute [rw] golden_run_method - # @return [::Google::Cloud::Ces::V1beta::GoldenRunMethod] - # Optional. The method to run the evaluation if it is a golden evaluation. If - # not set, default to STABLE. - # @!attribute [rw] generate_latency_report - # @return [::Boolean] - # Optional. Whether to generate a latency report for the evaluation run. - class RunEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a scheduled evaluation run configuration. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the scheduled evaluation run config. - # Format: - # projects/\\{projectId}/locations/\\{locationId}/apps/\\{appId}/scheduledEvaluationRuns/\\{scheduledEvaluationRunId} - # @!attribute [rw] display_name - # @return [::String] - # Required. User-defined display name of the scheduled evaluation run config. - # @!attribute [rw] request - # @return [::Google::Cloud::Ces::V1beta::RunEvaluationRequest] - # Required. The RunEvaluationRequest to schedule - # @!attribute [rw] description - # @return [::String] - # Optional. User-defined description of the scheduled evaluation run. - # @!attribute [rw] scheduling_config - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun::SchedulingConfig] - # Required. Configuration for the timing and frequency with which to execute - # the evaluations. - # @!attribute [rw] active - # @return [::Boolean] - # Optional. Whether this config is active - # @!attribute [r] last_completed_run - # @return [::String] - # Output only. The last successful EvaluationRun of this scheduled execution. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}` - # @!attribute [r] total_executions - # @return [::Integer] - # Output only. The total number of times this run has been executed - # @!attribute [r] next_scheduled_execution_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The next time this is scheduled to execute - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the scheduled evaluation run was created. - # @!attribute [r] created_by - # @return [::String] - # Output only. The user who created the scheduled evaluation run. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the evaluation was last updated. - # @!attribute [r] last_updated_by - # @return [::String] - # Output only. The user who last updated the evaluation. - # @!attribute [r] etag - # @return [::String] - # Output only. Etag used to ensure the object hasn't changed during a - # read-modify-write operation. If the etag is empty, the update will - # overwrite any concurrent changes. - class ScheduledEvaluationRun - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Eval scheduling configuration details - # @!attribute [rw] frequency - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun::SchedulingConfig::Frequency] - # Required. The frequency with which to run the eval - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. Timestamp when the eval should start. - # @!attribute [rw] days_of_week - # @return [::Array<::Integer>] - # Optional. The days of the week to run the eval. Applicable only for - # Weekly and Biweekly frequencies. 1 is Monday, 2 is Tuesday, ..., 7 is - # Sunday. - class SchedulingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The frequencies evals can be run at - module Frequency - # The frequency is unspecified. - FREQUENCY_UNSPECIFIED = 0 - - # Indicates a one-time scheduled run that should not repeat - NONE = 1 - - # Run the evaluation daily. - DAILY = 2 - - # Run the evaluation weekly. - WEEKLY = 3 - - # Run the evaluation biweekly. - BIWEEKLY = 4 - end - end - end - - # Configuration for running an evaluation for a specific persona. - # @!attribute [rw] persona - # @return [::String] - # Optional. The persona to use for the evaluation. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationPersonas/{evaluationPersona}` - # @!attribute [rw] task_count - # @return [::Integer] - # Optional. The number of tasks to run for the persona. - class PersonaRunConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for running the optimization step after the evaluation run. - # @!attribute [rw] generate_loss_report - # @return [::Boolean] - # Optional. Whether to generate a loss report. - # @!attribute [r] assistant_session - # @return [::String] - # Output only. The assistant session to use for the optimization based on - # this evaluation run. Format: - # `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistantSession}` - # @!attribute [r] report_summary - # @return [::String] - # Output only. The summary of the loss report. - # @!attribute [r] should_suggest_fix - # @return [::Boolean] - # Output only. Whether to suggest a fix for the losses. - # @!attribute [r] status - # @return [::Google::Cloud::Ces::V1beta::OptimizationConfig::OptimizationStatus] - # Output only. The status of the optimization run. - # @!attribute [r] error_message - # @return [::String] - # Output only. The error message if the optimization run failed. - # @!attribute [r] loss_report - # @return [::Google::Protobuf::Struct] - # Output only. The generated loss report. - class OptimizationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The status of the optimization run. - module OptimizationStatus - # Optimization status is not specified. - OPTIMIZATION_STATUS_UNSPECIFIED = 0 - - # Optimization is running. - RUNNING = 1 - - # Optimization has completed. - COMPLETED = 2 - - # Optimization failed due to an internal error. - ERROR = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb deleted file mode 100644 index b828bab0506a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb +++ /dev/null @@ -1,1087 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics EvaluationService.RunEvaluationResultMetrics}. - # @!attribute [rw] evaluation_result_id - # @return [::String] - # Required. The evaluation result to run metrics for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}` - class RunEvaluationResultMetricsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics EvaluationService.RunEvaluationResultMetrics}. - # @!attribute [r] status - # @return [::Google::Cloud::Ces::V1beta::EvaluationResult::Outcome] - # Output only. The status of the evaluation result metrics calculation. - class RunEvaluationResultMetricsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation EvaluationService.RunEvaluation}. - # @!attribute [rw] evaluation_run - # @return [::String] - # The name of the evaluation run that was created. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}` - class RunEvaluationResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation metadata for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation EvaluationService.RunEvaluation}. - # @!attribute [r] evaluations - # @return [::Array<::String>] - # Output only. The list of evaluations that were run. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @!attribute [r] evaluation_run - # @return [::String] - # Output only. The evaluation run that was created. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}` - # @!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 completed. - # @!attribute [r] verb - # @return [::String] - # Output only. The verb of the operation. - # @!attribute [r] cancel_requested - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation of the - # operation. Operations that have been cancelled successfully have - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, - # corresponding to `Code.CANCELLED`. - class RunEvaluationOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation metadata for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#generate_evaluation EvaluationService.GenerateEvaluation}. - class GenerateEvaluationOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation metadata for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_run EvaluationService.DeleteEvaluationRun}. - class DeleteEvaluationRunOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation EvaluationService.CreateEvaluation}. - # @!attribute [rw] parent - # @return [::String] - # Required. The app to create the evaluation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] evaluation_id - # @return [::String] - # Optional. The ID to use for the evaluation, which will become the final - # component of the evaluation's resource name. If not provided, a unique ID - # will be automatically assigned for the evaluation. - # @!attribute [rw] evaluation - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # Required. The evaluation to create. - class CreateEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#generate_evaluation EvaluationService.GenerateEvaluation}. - # @!attribute [rw] conversation - # @return [::String] - # Required. The conversation to create the golden evaluation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}` - # @!attribute [rw] source - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Ces::V1beta::Conversation::Source] - # Optional. Indicate the source of the conversation. If not set, all sources - # will be searched. - class GenerateEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations EvaluationService.ImportEvaluations}. - # @!attribute [rw] conversation_list - # @return [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ConversationList] - # The conversations to import the evaluations from. - # - # Note: The following fields are mutually exclusive: `conversation_list`, `gcs_uri`, `csv_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcs_uri - # @return [::String] - # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI - # from which to import evaluations. The format of this URI must be - # `gs:///`. - # - # Note: The following fields are mutually exclusive: `gcs_uri`, `conversation_list`, `csv_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] csv_content - # @return [::String] - # Raw bytes representing the csv file with the evaluations structure. - # - # Note: The following fields are mutually exclusive: `csv_content`, `conversation_list`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] parent - # @return [::String] - # Required. The app to import the evaluations into. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] import_options - # @return [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions] - # Optional. Options governing the import process for the evaluations. - class ImportEvaluationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of conversation resource names. - # @!attribute [rw] conversations - # @return [::Array<::String>] - # Optional. Conversation resource names. - class ConversationList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration options for the evaluation import process. - # These options control how the import behaves, particularly when - # conflicts arise with existing evaluations data. - # @!attribute [rw] conflict_resolution_strategy - # @return [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions::ConflictResolutionStrategy] - # Optional. The strategy to use when resolving conflicts during import. - class ImportOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the strategy for handling conflicts when an evaluation with the - # same evaluation ID already exists in the app. - module ConflictResolutionStrategy - # The conflict resolution strategy is unspecified. - CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED = 0 - - # Overwrite the existing evaluation with the new one. - OVERWRITE = 1 - - # Keep the existing evaluation and skip the new one. - SKIP = 2 - - # Keep the existing evaluation and duplicate the new one as a new - # evaluation. - DUPLICATE = 3 - end - end - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations EvaluationService.ImportEvaluations}. - # @!attribute [rw] evaluations - # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation>] - # The list of evaluations that were imported into the app. - # @!attribute [rw] evaluation_results - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult>] - # The list of evaluation results that were imported into the app. - # @!attribute [rw] evaluation_runs - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationRun>] - # The list of evaluation runs that were imported into the app. - # @!attribute [rw] error_messages - # @return [::Array<::String>] - # Optional. A list of error messages associated with evaluations that failed - # to be imported. - # @!attribute [rw] import_failure_count - # @return [::Integer] - # The number of evaluations that either failed to import entirely or - # completed import with one or more errors. - # @!attribute [rw] evaluation_result_import_failure_count - # @return [::Integer] - # The number of evaluation results that either failed to import entirely or - # completed import with one or more errors. - # @!attribute [rw] evaluation_run_import_failure_count - # @return [::Integer] - # The number of evaluation runs that either failed to import entirely or - # completed import with one or more errors. - class ImportEvaluationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations EvaluationService.ImportEvaluations}. - # @!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] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - class ImportEvaluationsOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_dataset EvaluationService.CreateEvaluationDataset}. - # @!attribute [rw] parent - # @return [::String] - # Required. The app to create the evaluation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] evaluation_dataset_id - # @return [::String] - # Optional. The ID to use for the evaluation dataset, which will become the - # final component of the evaluation dataset's resource name. If not provided, - # a unique ID will be automatically assigned for the evaluation. - # @!attribute [rw] evaluation_dataset - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # Required. The evaluation dataset to create. - class CreateEvaluationDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation EvaluationService.UpdateEvaluation}. - # @!attribute [rw] evaluation - # @return [::Google::Cloud::Ces::V1beta::Evaluation] - # Required. The evaluation to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_dataset EvaluationService.UpdateEvaluationDataset}. - # @!attribute [rw] evaluation_dataset - # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset] - # Required. The evaluation dataset to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateEvaluationDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation EvaluationService.DeleteEvaluation}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the evaluation to delete. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. Indicates whether to forcefully delete the evaluation, even if it - # is still referenced by evaluation datasets. - # - # * If `force = false`, the deletion will fail if any datasets still - # reference the evaluation. - # * If `force = true`, all existing references from datasets will be removed - # and the evaluation will be deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the evaluation. If an etag is not provided, - # the deletion will overwrite any concurrent changes. If an etag is provided - # and does not match the current etag of the evaluation, deletion will be - # blocked and an ABORTED error will be returned. - class DeleteEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_result EvaluationService.DeleteEvaluationResult}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the evaluation result to delete. - class DeleteEvaluationResultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_dataset EvaluationService.DeleteEvaluationDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the evaluation dataset to delete. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the evaluation dataset. If an etag is not - # provided, the deletion will overwrite any concurrent changes. If an etag is - # provided and does not match the current etag of the evaluation dataset, - # deletion will be blocked and an ABORTED error will be returned. - class DeleteEvaluationDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_run EvaluationService.DeleteEvaluationRun}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the evaluation run to delete. - class DeleteEvaluationRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation EvaluationService.GetEvaluation}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the evaluation to retrieve. - class GetEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_result EvaluationService.GetEvaluationResult}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the evaluation result to retrieve. - class GetEvaluationResultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_dataset EvaluationService.GetEvaluationDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the evaluation dataset to retrieve. - class GetEvaluationDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_run EvaluationService.GetEvaluationRun}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the evaluation run to retrieve. - class GetEvaluationRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list evaluations from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations} - # call. - # @!attribute [rw] filter - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. Deprecated: Use evaluation_filter and evaluation_run_filter - # instead. - # @!attribute [rw] evaluation_filter - # @return [::String] - # Optional. Filter to be applied on the evaluation when listing the - # evaluations. See https://google.aip.dev/160 for more details. Supported - # fields: evaluation_datasets - # @!attribute [rw] evaluation_run_filter - # @return [::String] - # Optional. Filter string for fields on the associated EvaluationRun - # resources. See https://google.aip.dev/160 for more details. Supported - # fields: create_time, initiated_by, app_version_display_name - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - # @!attribute [rw] last_ten_results - # @return [::Boolean] - # Optional. Whether to include the last 10 evaluation results for each - # evaluation in the response. - class ListEvaluationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the evaluation to list evaluation results - # from. To filter by evaluation run, use `-` as the evaluation ID and specify - # the evaluation run ID in the filter. For example: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/-` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the evaluation results. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - class ListEvaluationResultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list evaluation datasets from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the evaluation datasets. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - class ListEvaluationDatasetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list evaluation runs from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the evaluation runs. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - class ListEvaluationRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations EvaluationService.ListEvaluations}. - # @!attribute [rw] evaluations - # @return [::Array<::Google::Cloud::Ces::V1beta::Evaluation>] - # The list of evaluations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListEvaluationsRequest#page_token ListEvaluationsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListEvaluationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results EvaluationService.ListEvaluationResults}. - # @!attribute [rw] evaluation_results - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationResult>] - # The list of evaluation results. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest#page_token ListEvaluationResultsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListEvaluationResultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets}. - # @!attribute [rw] evaluation_datasets - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationDataset>] - # The list of evaluation datasets. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest#page_token ListEvaluationDatasetsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListEvaluationDatasetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns}. - # @!attribute [rw] evaluation_runs - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationRun>] - # The list of evaluation runs. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest#page_token ListEvaluationRunsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListEvaluationRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_scheduled_evaluation_run EvaluationService.CreateScheduledEvaluationRun}. - # @!attribute [rw] parent - # @return [::String] - # Required. The app to create the scheduled evaluation run for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] scheduled_evaluation_run_id - # @return [::String] - # Optional. The ID to use for the scheduled evaluation run, which will become - # the final component of the scheduled evaluation run's resource name. If not - # provided, a unique ID will be automatically assigned. - # @!attribute [rw] scheduled_evaluation_run - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # Required. The scheduled evaluation run to create. - class CreateScheduledEvaluationRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_scheduled_evaluation_run EvaluationService.GetScheduledEvaluationRun}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the scheduled evaluation run to retrieve. - class GetScheduledEvaluationRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list scheduled evaluation runs - # from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the scheduled evaluation runs. - # See https://google.aip.dev/160 for more details. - # Currently supports filtering by: - # * request.evaluations:evaluation_id - # * request.evaluation_dataset:evaluation_dataset_id - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Supported fields are: - # "name" (ascending), "create_time" (descending), "update_time" (descending), - # "next_scheduled_execution" (ascending), and - # "last_completed_run.create_time" (descending). - # If not included, "update_time" will be the default. - # See https://google.aip.dev/132#ordering for more details. - class ListScheduledEvaluationRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns}. - # @!attribute [rw] scheduled_evaluation_runs - # @return [::Array<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>] - # The list of scheduled evaluation runs. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest#page_token ListScheduledEvaluationRunsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListScheduledEvaluationRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_scheduled_evaluation_run EvaluationService.UpdateScheduledEvaluationRun}. - # @!attribute [rw] scheduled_evaluation_run - # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun] - # Required. The scheduled evaluation run to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateScheduledEvaluationRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_scheduled_evaluation_run EvaluationService.DeleteScheduledEvaluationRun}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the scheduled evaluation run to delete. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the ScheduledEvaluationRun. - # If provided, it must match the server's etag. - class DeleteScheduledEvaluationRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#test_persona_voice EvaluationService.TestPersonaVoice}. - # @!attribute [rw] app - # @return [::String] - # Required. the resource name of the app to test the persona voice for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] persona_id - # @return [::String] - # Required. The persona ID to test the voice for. Also accepts "default". - # @!attribute [rw] text - # @return [::String] - # Required. The text to test the voice for. - class TestPersonaVoiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#upload_evaluation_audio EvaluationService.UploadEvaluationAudio}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Evaluation for which to upload the - # evaluation audio. Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @!attribute [rw] audio_content - # @return [::String] - # Required. The raw audio bytes. - # The format of the audio must be single-channel LINEAR16 with a sample - # rate of 16kHz (default InputAudioConfig). - # @!attribute [rw] previous_audio_gcs_uri - # @return [::String] - # Optional. The Google Cloud Storage URI of the previously uploaded audio - # file to be deleted. Format: `gs:///` - class UploadEvaluationAudioRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#upload_evaluation_audio EvaluationService.UploadEvaluationAudio}. - # @!attribute [rw] audio_gcs_uri - # @return [::String] - # The Google Cloud Storage URI where the uploaded audio file is stored. - # Format: `gs:///` - # @!attribute [rw] transcript - # @return [::String] - # The transcript of the audio, generated by Cloud Speech-to-Text. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # The duration of the audio. - class UploadEvaluationAudioResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#test_persona_voice EvaluationService.TestPersonaVoice}. - # @!attribute [rw] audio - # @return [::String] - # The audio data bytes of the synthesized voice. - class TestPersonaVoiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_expectation EvaluationService.CreateEvaluationExpectation}. - # @!attribute [rw] parent - # @return [::String] - # Required. The app to create the evaluation expectation for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] evaluation_expectation_id - # @return [::String] - # Optional. The ID to use for the evaluation expectation, which will become - # the final component of the evaluation expectation's resource name. If not - # provided, a unique ID will be automatically assigned for the evaluation - # expectation. - # @!attribute [rw] evaluation_expectation - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # Required. The evaluation expectation to create. - class CreateEvaluationExpectationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_expectation EvaluationService.UpdateEvaluationExpectation}. - # @!attribute [rw] evaluation_expectation - # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation] - # Required. The evaluation expectation to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to control which fields get updated. If the - # mask is not present, all fields will be updated. - class UpdateEvaluationExpectationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_expectation EvaluationService.DeleteEvaluationExpectation}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the evaluation expectation to delete. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the evaluation expectation. If an etag is not - # provided, the deletion will overwrite any concurrent changes. If an etag is - # provided and does not match the current etag of the evaluation expectation, - # deletion will be blocked and an ABORTED error will be returned. - class DeleteEvaluationExpectationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_expectation EvaluationService.GetEvaluationExpectation}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the evaluation expectation to retrieve. - class GetEvaluationExpectationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to list evaluation expectations - # from. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The - # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse#next_page_token next_page_token} - # value returned from a previous list - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter to be applied when listing the evaluation expectations. - # See https://google.aip.dev/160 for more details. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to sort by. Only "name" and "create_time", and - # "update_time" are supported. Time fields are ordered in descending order, - # and the name field is ordered in ascending order. If not included, - # "update_time" will be the default. See https://google.aip.dev/132#ordering - # for more details. - class ListEvaluationExpectationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations}. - # @!attribute [rw] evaluation_expectations - # @return [::Array<::Google::Cloud::Ces::V1beta::EvaluationExpectation>] - # The list of evaluation expectations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as - # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest#page_token ListEvaluationExpectationsRequest.page_token} - # to retrieve the next page. Absence of this field indicates there are no - # subsequent pages. - class ListEvaluationExpectationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options for exporting CES evaluation resources. - # @!attribute [rw] export_format - # @return [::Google::Cloud::Ces::V1beta::ExportOptions::ExportFormat] - # Optional. The format to export the evaluation results in. Defaults to JSON - # if not specified. - # @!attribute [rw] gcs_uri - # @return [::String] - # Optional. The Google Cloud Storage URI to write the exported Evaluation - # Results to. - class ExportOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The format to export the items in. Defaults to JSON if not - # specified. - module ExportFormat - # Unspecified format. - EXPORT_FORMAT_UNSPECIFIED = 0 - - # JSON format. - JSON = 1 - - # YAML format. - YAML = 2 - end - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluations EvaluationService.ExportEvaluations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to export evaluations from. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. The resource names of the evaluations to export. - # @!attribute [rw] export_options - # @return [::Google::Cloud::Ces::V1beta::ExportOptions] - # Optional. The export options for the evaluations. - # @!attribute [rw] include_evaluation_results - # @return [::Boolean] - # Optional. Includes evaluation results in the export. At least one of - # include_evaluation_results or include_evaluations must be set. - # @!attribute [rw] include_evaluations - # @return [::Boolean] - # Optional. Includes evaluations in the export. At least one of - # include_evaluation_results or include_evaluations must be set. - class ExportEvaluationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluations EvaluationService.ExportEvaluations}. - # @!attribute [rw] evaluations_content - # @return [::String] - # The content of the exported Evaluations. This will be populated if - # gcs_uri was not specified in the request. - # - # Note: The following fields are mutually exclusive: `evaluations_content`, `evaluations_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] evaluations_uri - # @return [::String] - # The Google Cloud Storage URI folder where the exported evaluations were - # written. This will be populated if gcs_uri was specified in the request. - # - # Note: The following fields are mutually exclusive: `evaluations_uri`, `evaluations_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] failed_evaluations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. A map of evaluation resource names that could not be exported, - # to the reason why they failed. - class ExportEvaluationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class FailedEvaluationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results EvaluationService.ExportEvaluationResults}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the evaluation to export evaluation results - # from. Format: - # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. The resource names of the evaluation results to export. - # @!attribute [rw] export_options - # @return [::Google::Cloud::Ces::V1beta::ExportOptions] - # Optional. The export options for the evaluation results. - class ExportEvaluationResultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results EvaluationService.ExportEvaluationResults}. - # @!attribute [rw] evaluation_results_content - # @return [::String] - # The content of the exported Evaluation Results. This will be populated if - # gcs_uri was not specified in the request. - # - # Note: The following fields are mutually exclusive: `evaluation_results_content`, `evaluation_results_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] evaluation_results_uri - # @return [::String] - # The Google Cloud Storage URI folder where the exported Evaluation Results - # were written. This will be populated if gcs_uri was specified in the - # request. - # - # Note: The following fields are mutually exclusive: `evaluation_results_uri`, `evaluation_results_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExportEvaluationResultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs EvaluationService.ExportEvaluationRuns}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app to export evaluation runs from. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. The resource names of the evaluation runs to export. - # @!attribute [rw] export_options - # @return [::Google::Cloud::Ces::V1beta::ExportOptions] - # Optional. The export options for the evaluation runs. - class ExportEvaluationRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs EvaluationService.ExportEvaluationRuns}. - # @!attribute [rw] evaluation_runs_content - # @return [::String] - # The content of the exported Evaluation Runs. This will be populated if - # gcs_uri was not specified in the request. - # - # Note: The following fields are mutually exclusive: `evaluation_runs_content`, `evaluation_runs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] evaluation_runs_uri - # @return [::String] - # The Google Cloud Storage URI folder where the exported Evaluation Runs - # were written. This will be populated if gcs_uri was specified in the - # request. - # - # Note: The following fields are mutually exclusive: `evaluation_runs_uri`, `evaluation_runs_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExportEvaluationRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation metadata for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs EvaluationService.ExportEvaluationRuns}. - class ExportEvaluationRunsOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation metadata for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results EvaluationService.ExportEvaluationResults}. - class ExportEvaluationResultsOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation metadata for - # {::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics EvaluationService.RunEvaluationResultMetrics}. - class RunEvaluationResultMetricsOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/example.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/example.rb deleted file mode 100644 index d2ed898bb82e..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/example.rb +++ /dev/null @@ -1,245 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # An example represents a sample conversation between the user and the - # agent(s). - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the example. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/examples/{example}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the example. - # @!attribute [rw] description - # @return [::String] - # Optional. Human-readable description of the example. - # @!attribute [rw] entry_agent - # @return [::String] - # Optional. The agent that initially handles the conversation. If not - # specified, the example represents a conversation that is handled by the - # root agent. Format: - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # @!attribute [rw] messages - # @return [::Array<::Google::Cloud::Ces::V1beta::Message>] - # Optional. The collection of messages that make up the conversation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the example was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the example was last updated. - # @!attribute [r] invalid - # @return [::Boolean] - # Output only. The example may become invalid if referencing resources are - # deleted. Invalid examples will not be used as few-shot examples. - # @!attribute [rw] etag - # @return [::String] - # Etag used to ensure the object hasn't changed during a read-modify-write - # operation. If the etag is empty, the update will overwrite any concurrent - # changes. - class Example - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message within a conversation. - # @!attribute [rw] role - # @return [::String] - # Optional. The role within the conversation, e.g., user, agent. - # @!attribute [rw] chunks - # @return [::Array<::Google::Cloud::Ces::V1beta::Chunk>] - # Optional. Content of the message as a series of chunks. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Timestamp when the message was sent or received. Should not be - # used if the message is part of an - # {::Google::Cloud::Ces::V1beta::Example example}. - class Message - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A chunk of content within a message. - # @!attribute [rw] text - # @return [::String] - # Optional. Text data. - # - # Note: The following fields are mutually exclusive: `text`, `transcript`, `blob`, `payload`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] transcript - # @return [::String] - # Optional. Transcript associated with the audio. - # - # Note: The following fields are mutually exclusive: `transcript`, `text`, `blob`, `payload`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] blob - # @return [::Google::Cloud::Ces::V1beta::Blob] - # Optional. Blob data. - # - # Note: The following fields are mutually exclusive: `blob`, `text`, `transcript`, `payload`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] payload - # @return [::Google::Protobuf::Struct] - # Optional. Custom payload data. - # - # Note: The following fields are mutually exclusive: `payload`, `text`, `transcript`, `blob`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image - # @return [::Google::Cloud::Ces::V1beta::Image] - # Optional. Image data. - # - # Note: The following fields are mutually exclusive: `image`, `text`, `transcript`, `blob`, `payload`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tool_call - # @return [::Google::Cloud::Ces::V1beta::ToolCall] - # Optional. Tool execution request. - # - # Note: The following fields are mutually exclusive: `tool_call`, `text`, `transcript`, `blob`, `payload`, `image`, `tool_response`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tool_response - # @return [::Google::Cloud::Ces::V1beta::ToolResponse] - # Optional. Tool execution response. - # - # Note: The following fields are mutually exclusive: `tool_response`, `text`, `transcript`, `blob`, `payload`, `image`, `tool_call`, `agent_transfer`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] agent_transfer - # @return [::Google::Cloud::Ces::V1beta::AgentTransfer] - # Optional. Agent transfer event. - # - # Note: The following fields are mutually exclusive: `agent_transfer`, `text`, `transcript`, `blob`, `payload`, `image`, `tool_call`, `tool_response`, `updated_variables`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] updated_variables - # @return [::Google::Protobuf::Struct] - # A struct represents variables that were updated in the conversation, - # keyed by variable names. - # - # Note: The following fields are mutually exclusive: `updated_variables`, `text`, `transcript`, `blob`, `payload`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `default_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] default_variables - # @return [::Google::Protobuf::Struct] - # A struct represents default variables at the start of the conversation, - # keyed by variable names. - # - # Note: The following fields are mutually exclusive: `default_variables`, `text`, `transcript`, `blob`, `payload`, `image`, `tool_call`, `tool_response`, `agent_transfer`, `updated_variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Chunk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a blob input or output in the conversation. - # @!attribute [rw] mime_type - # @return [::String] - # Required. The IANA standard MIME type of the source data. - # @!attribute [rw] data - # @return [::String] - # Required. Raw bytes of the blob. - class Blob - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an image input or output in the conversation. - # @!attribute [rw] mime_type - # @return [::String] - # Required. The IANA standard MIME type of the source data. - # Supported image types includes: - # * image/png - # * image/jpeg - # * image/webp - # @!attribute [rw] data - # @return [::String] - # Required. Raw bytes of the image. - class Image - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the client or the agent to execute the specified tool. - # @!attribute [rw] tool - # @return [::String] - # Optional. The name of the tool to execute. - # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # - # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] toolset_tool - # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] - # Optional. The toolset tool to execute. - # - # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] id - # @return [::String] - # Optional. The unique identifier of the tool call. If populated, the client - # should return the execution result with the matching ID in - # {::Google::Cloud::Ces::V1beta::ToolResponse#id ToolResponse}. - # @!attribute [r] display_name - # @return [::String] - # Output only. Display name of the tool. - # @!attribute [rw] args - # @return [::Google::Protobuf::Struct] - # Optional. The input parameters and values for the tool in JSON object - # format. - class ToolCall - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The execution result of a specific tool from the client or the agent. - # @!attribute [rw] tool - # @return [::String] - # Optional. The name of the tool to execute. - # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # - # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] toolset_tool - # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] - # Optional. The toolset tool that got executed. - # - # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] id - # @return [::String] - # Optional. The matching ID of the [tool - # call][google.cloud.ces.v1beta.ToolCall] the response is for. - # @!attribute [r] display_name - # @return [::String] - # Output only. Display name of the tool. - # @!attribute [rw] response - # @return [::Google::Protobuf::Struct] - # Required. The tool execution result in JSON object format. - # Use "output" key to specify tool response and "error" key to specify - # error details (if any). If "output" and "error" keys are not specified, - # then whole "response" is treated as tool execution result. - class ToolResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an event indicating the transfer of a conversation to a different - # agent. - # @!attribute [rw] target_agent - # @return [::String] - # Required. The agent to which the conversation is being transferred. The - # agent will handle the conversation from this point forward. Format: - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # @!attribute [r] display_name - # @return [::String] - # Output only. Display name of the agent. - class AgentTransfer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/fakes.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/fakes.rb deleted file mode 100644 index c77e12e8fe5c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/fakes.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # A code block to be executed instead of a real tool call. - # @!attribute [rw] python_code - # @return [::String] - # Required. Python code which will be invoked in tool fake mode. - # Expected Python function signature - - # To catch all tool calls: - # def fake_tool_call(tool: Tool, input: dict[str, Any], - # callback_context: CallbackContext) -> Optional[dict[str, Any]]: - # To catch a specific tool call: - # def fake_\\{tool_id}(tool: Tool, input: dict[str, Any], - # callback_context: CallbackContext) -> Optional[dict[str, Any]]: - # If the function returns None, the real tool will be invoked instead. - class CodeBlock - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for tool behavior in fake mode. - # @!attribute [rw] code_block - # @return [::Google::Cloud::Ces::V1beta::CodeBlock] - # Optional. Code block which will be executed instead of a real tool call. - # @!attribute [rw] enable_fake_mode - # @return [::Boolean] - # Optional. Whether the tool is using fake mode. - class ToolFakeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configures the tool call behaviour for evaluation runs. - module EvaluationToolCallBehaviour - # Unspecified tool call behavior. Will default to real tool calls. - EVALUATION_TOOL_CALL_BEHAVIOUR_UNSPECIFIED = 0 - - # Use real tool calls. - REAL = 1 - - # Use fake tool calls. - FAKE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_context.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_context.rb deleted file mode 100644 index 5f4590a060d3..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_context.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Files to be used as context. Files can be provided as raw bytes. - # @!attribute [rw] file_bytes - # @return [::Google::Cloud::Ces::V1beta::FileContext::FileBytes] - # Optional. File provided as raw bytes. - class FileContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # File provided as raw bytes. - # @!attribute [rw] file_name - # @return [::String] - # Required. The name of the file provided as raw bytes. - # @!attribute [rw] mime_type - # @return [::String] - # Required. The IANA standard MIME type of the source data. - # @!attribute [rw] data - # @return [::String] - # Required. Raw bytes of the file. - class FileBytes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_search_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_search_tool.rb deleted file mode 100644 index 2abcd27a5d91..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/file_search_tool.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # The file search tool allows the agent to search across the files uploaded by - # the app/agent developer. It has presets to give relatively good quality - # search over the uploaded files and summarization of the retrieved results. - # @!attribute [rw] corpus_type - # @return [::Google::Cloud::Ces::V1beta::FileSearchTool::CorpusType] - # Optional. The type of the corpus. Default is FULLY_MANAGED. - # @!attribute [rw] name - # @return [::String] - # Required. The tool name. - # @!attribute [rw] description - # @return [::String] - # Optional. The tool description. - # @!attribute [rw] file_corpus - # @return [::String] - # Optional. The corpus where files are stored. - # Format: - # projects/\\{project}/locations/\\{location}/ragCorpora/\\{rag_corpus} - class FileSearchTool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the Vertex RAG corpus. - module CorpusType - # Unspecified corpus type. - CORPUS_TYPE_UNSPECIFIED = 0 - - # The corpus is created and owned by the user. - USER_OWNED = 1 - - # The corpus is created by the agent. - FULLY_MANAGED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/golden_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/golden_run.rb deleted file mode 100644 index 2d07879df239..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/golden_run.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # The method used to run the evaluation. - module GoldenRunMethod - # Run method is not specified. - GOLDEN_RUN_METHOD_UNSPECIFIED = 0 - - # Run the evaluation as stable replay, where each turn is a unique session - # with the previous expected turns injected as context. - STABLE = 1 - - # Run the evaluation as naive replay, where the run is a single - # session with no context injected. - NAIVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/google_search_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/google_search_tool.rb deleted file mode 100644 index 73b98af3c3e5..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/google_search_tool.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Represents a tool to perform Google web searches for grounding. - # See - # https://cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool#google-search. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the tool. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the tool's purpose. - # @!attribute [rw] context_urls - # @return [::Array<::String>] - # Optional. Content will be fetched directly from these URLs for context and - # grounding. Example: "https://example.com/path.html". A maximum of 20 URLs - # are allowed. - # @!attribute [rw] preferred_domains - # @return [::Array<::String>] - # Optional. Specifies domains to restrict search results to. - # Example: "example.com", "another.site". A maximum of 20 domains can be - # specified. - # @!attribute [rw] exclude_domains - # @return [::Array<::String>] - # Optional. List of domains to be excluded from the search results. - # Example: "example.com". - # A maximum of 2000 domains can be excluded. - # @!attribute [rw] prompt_config - # @return [::Google::Cloud::Ces::V1beta::GoogleSearchTool::PromptConfig] - # Optional. Prompt instructions passed to planner on how the search results - # should be processed for text and voice. - class GoogleSearchTool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Prompt settings used by the model when processing or summarizing the - # google search results. - # @!attribute [rw] text_prompt - # @return [::String] - # Optional. Defines the prompt used for the system instructions when - # interacting with the agent in chat conversations. If not set, default - # prompt will be used. - # @!attribute [rw] voice_prompt - # @return [::String] - # Optional. Defines the prompt used for the system instructions when - # interacting with the agent in voice conversations. If not set, default - # prompt will be used. - class PromptConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/guardrail.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/guardrail.rb deleted file mode 100644 index 320e775cc77b..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/guardrail.rb +++ /dev/null @@ -1,324 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Guardrail contains a list of checks and balances to keep the agents safe and - # secure. - # @!attribute [rw] content_filter - # @return [::Google::Cloud::Ces::V1beta::Guardrail::ContentFilter] - # Optional. Guardrail that bans certain content from being used in the - # conversation. - # - # Note: The following fields are mutually exclusive: `content_filter`, `llm_prompt_security`, `llm_policy`, `model_safety`, `code_callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] llm_prompt_security - # @return [::Google::Cloud::Ces::V1beta::Guardrail::LlmPromptSecurity] - # Optional. Guardrail that blocks the conversation if the prompt is - # considered unsafe based on the LLM classification. - # - # Note: The following fields are mutually exclusive: `llm_prompt_security`, `content_filter`, `llm_policy`, `model_safety`, `code_callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] llm_policy - # @return [::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy] - # Optional. Guardrail that blocks the conversation if the LLM response is - # considered violating the policy based on the LLM classification. - # - # Note: The following fields are mutually exclusive: `llm_policy`, `content_filter`, `llm_prompt_security`, `model_safety`, `code_callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] model_safety - # @return [::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety] - # Optional. Guardrail that blocks the conversation if the LLM response is - # considered unsafe based on the model safety settings. - # - # Note: The following fields are mutually exclusive: `model_safety`, `content_filter`, `llm_prompt_security`, `llm_policy`, `code_callback`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] code_callback - # @return [::Google::Cloud::Ces::V1beta::Guardrail::CodeCallback] - # Optional. Guardrail that potentially blocks the conversation based on the - # result of the callback execution. - # - # Note: The following fields are mutually exclusive: `code_callback`, `content_filter`, `llm_prompt_security`, `llm_policy`, `model_safety`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the guardrail. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the guardrail. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the guardrail. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Whether the guardrail is enabled. - # @!attribute [rw] action - # @return [::Google::Cloud::Ces::V1beta::TriggerAction] - # Optional. Action to take when the guardrail is triggered. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the guardrail was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the guardrail was last updated. - # @!attribute [rw] etag - # @return [::String] - # Etag used to ensure the object hasn't changed during a read-modify-write - # operation. If the etag is empty, the update will overwrite any concurrent - # changes. - class Guardrail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Guardrail that bans certain content from being used in the conversation. - # @!attribute [rw] banned_contents - # @return [::Array<::String>] - # Optional. List of banned phrases. Applies to both user inputs and agent - # responses. - # @!attribute [rw] banned_contents_in_user_input - # @return [::Array<::String>] - # Optional. List of banned phrases. Applies only to user inputs. - # @!attribute [rw] banned_contents_in_agent_response - # @return [::Array<::String>] - # Optional. List of banned phrases. Applies only to agent responses. - # @!attribute [rw] match_type - # @return [::Google::Cloud::Ces::V1beta::Guardrail::ContentFilter::MatchType] - # Required. Match type for the content filter. - # @!attribute [rw] disregard_diacritics - # @return [::Boolean] - # Optional. If true, diacritics are ignored during matching. - class ContentFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Match type for the content filter. - module MatchType - # Match type is not specified. - MATCH_TYPE_UNSPECIFIED = 0 - - # Content is matched for substrings character by character. - SIMPLE_STRING_MATCH = 1 - - # Content only matches if the pattern found in the text is - # surrounded by word delimiters. Banned phrases can also contain word - # delimiters. - WORD_BOUNDARY_STRING_MATCH = 2 - - # Content is matched using regular expression syntax. - REGEXP_MATCH = 3 - end - end - - # Guardrail that blocks the conversation if the input is considered unsafe - # based on the LLM classification. - # @!attribute [rw] default_settings - # @return [::Google::Cloud::Ces::V1beta::Guardrail::LlmPromptSecurity::DefaultSecuritySettings] - # Optional. Use the system's predefined default security settings. - # To select this mode, include an empty 'default_settings' message - # in the request. The 'default_prompt_template' field within - # will be populated by the server in the response. - # - # Note: The following fields are mutually exclusive: `default_settings`, `custom_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_policy - # @return [::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy] - # Optional. Use a user-defined LlmPolicy to configure the security - # guardrail. - # - # Note: The following fields are mutually exclusive: `custom_policy`, `default_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] fail_open - # @return [::Boolean] - # Optional. Determines the behavior when the guardrail encounters an LLM - # error. - # - If true: the guardrail is bypassed. - # - If false (default): the guardrail triggers/blocks. - # - # Note: If a custom policy is provided, this field is ignored in favor - # of the policy's 'fail_open' configuration. - class LlmPromptSecurity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for default system security settings. - # @!attribute [r] default_prompt_template - # @return [::String] - # Output only. The default prompt template used by the system. - # This field is for display purposes to show the user what prompt - # the system uses by default. It is OUTPUT_ONLY. - class DefaultSecuritySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Guardrail that blocks the conversation if the LLM response is considered - # violating the policy based on the LLM classification. - # @!attribute [rw] max_conversation_messages - # @return [::Integer] - # Optional. When checking this policy, consider the last 'n' messages in - # the conversation. When not set a default value of 10 will be used. - # @!attribute [rw] model_settings - # @return [::Google::Cloud::Ces::V1beta::ModelSettings] - # Optional. Model settings. - # @!attribute [rw] prompt - # @return [::String] - # Required. Policy prompt. - # @!attribute [rw] policy_scope - # @return [::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy::PolicyScope] - # Required. Defines when to apply the policy check during the conversation. - # If set to `POLICY_SCOPE_UNSPECIFIED`, the policy will be applied to the - # user input. When applying the policy to the agent response, additional - # latency will be introduced before the agent can respond. - # @!attribute [rw] fail_open - # @return [::Boolean] - # Optional. If an error occurs during the policy check, fail open and do - # not trigger the guardrail. - # @!attribute [rw] allow_short_utterance - # @return [::Boolean] - # Optional. By default, the LLM policy check is bypassed for short - # utterances. Enabling this setting applies the policy check to all - # utterances, including those that would normally be skipped. - class LlmPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines when to apply the policy check during the conversation. - module PolicyScope - # Policy scope is not specified. - POLICY_SCOPE_UNSPECIFIED = 0 - - # Policy check is triggered on user input. - USER_QUERY = 1 - - # Policy check is triggered on agent response. Applying this policy - # scope will introduce additional latency before the agent can respond. - AGENT_RESPONSE = 2 - - # Policy check is triggered on both user input and agent response. - # Applying this policy scope will introduce additional latency before - # the agent can respond. - USER_QUERY_AND_AGENT_RESPONSE = 3 - end - end - - # Model safety settings overrides. When this is set, it will override the - # default settings and trigger the guardrail if the response is considered - # unsafe. - # @!attribute [rw] safety_settings - # @return [::Array<::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety::SafetySetting>] - # Required. List of safety settings. - class ModelSafety - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Safety setting. - # @!attribute [rw] category - # @return [::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety::HarmCategory] - # Required. The harm category. - # @!attribute [rw] threshold - # @return [::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety::HarmBlockThreshold] - # Required. The harm block threshold. - class SafetySetting - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Harm category. - module HarmCategory - # The harm category is unspecified. - HARM_CATEGORY_UNSPECIFIED = 0 - - # The harm category is hate speech. - HARM_CATEGORY_HATE_SPEECH = 1 - - # The harm category is dangerous content. - HARM_CATEGORY_DANGEROUS_CONTENT = 2 - - # The harm category is harassment. - HARM_CATEGORY_HARASSMENT = 3 - - # The harm category is sexually explicit content. - HARM_CATEGORY_SEXUALLY_EXPLICIT = 4 - end - - # Probability based thresholds levels for blocking. - module HarmBlockThreshold - # Unspecified harm block threshold. - HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 - - # Block low threshold and above (i.e. block more). - BLOCK_LOW_AND_ABOVE = 1 - - # Block medium threshold and above. - BLOCK_MEDIUM_AND_ABOVE = 2 - - # Block only high threshold (i.e. block less). - BLOCK_ONLY_HIGH = 3 - - # Block none. - BLOCK_NONE = 4 - - # Turn off the safety filter. - OFF = 5 - end - end - - # Guardrail that blocks the conversation based on the code callbacks - # provided. - # @!attribute [rw] before_agent_callback - # @return [::Google::Cloud::Ces::V1beta::Callback] - # Optional. The callback to execute before the agent is called. - # Each callback function is expected to return a structure (e.g., a dict or - # object) containing at least: - # - 'decision': Either 'OK' or 'TRIGGER'. - # - 'reason': A string explaining the decision. - # A 'TRIGGER' decision may halt further processing. - # @!attribute [rw] after_agent_callback - # @return [::Google::Cloud::Ces::V1beta::Callback] - # Optional. The callback to execute after the agent is called. - # Each callback function is expected to return a structure (e.g., a dict or - # object) containing at least: - # - 'decision': Either 'OK' or 'TRIGGER'. - # - 'reason': A string explaining the decision. - # A 'TRIGGER' decision may halt further processing. - # @!attribute [rw] before_model_callback - # @return [::Google::Cloud::Ces::V1beta::Callback] - # Optional. The callback to execute before the model is called. If there - # are multiple calls to the model, the callback will be executed multiple - # times. Each callback function is expected to return a structure (e.g., a - # dict or object) containing at least: - # - 'decision': Either 'OK' or 'TRIGGER'. - # - 'reason': A string explaining the decision. - # A 'TRIGGER' decision may halt further processing. - # @!attribute [rw] after_model_callback - # @return [::Google::Cloud::Ces::V1beta::Callback] - # Optional. The callback to execute after the model is called. If there are - # multiple calls to the model, the callback will be executed multiple - # times. Each callback function is expected to return a structure (e.g., a - # dict or object) containing at least: - # - 'decision': Either 'OK' or 'TRIGGER'. - # - 'reason': A string explaining the decision. - # A 'TRIGGER' decision may halt further processing. - class CodeCallback - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb deleted file mode 100644 index 46c6ac1df076..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # An MCP tool. - # See https://modelcontextprotocol.io/specification/2025-06-18/server/tools for - # more details. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the MCP tool. - # @!attribute [rw] name_override - # @return [::String] - # Optional. The name override of the MCP tool. - # This is populated if the name was overridden by a Toolset override. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the MCP tool. - # @!attribute [rw] input_schema - # @return [::Google::Cloud::Ces::V1beta::Schema] - # Optional. The schema of the input arguments of the MCP tool. - # @!attribute [rw] output_schema - # @return [::Google::Cloud::Ces::V1beta::Schema] - # Optional. The schema of the output arguments of the MCP tool. - # @!attribute [rw] server_address - # @return [::String] - # Required. The server address of the MCP server, e.g., - # "https://example.com/mcp/". If the server is built with the MCP SDK, the - # url should be suffixed with - # "/mcp/". Only Streamable HTTP transport based servers are supported. This - # is the same as the server_address in the McpToolset. See - # https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http - # for more details. - # @!attribute [rw] api_authentication - # @return [::Google::Cloud::Ces::V1beta::ApiAuthentication] - # Optional. Authentication information required to execute the tool against - # the MCP server. For bearer token authentication, the token applies only to - # tool execution, not to listing tools. This requires that tools can be - # listed without authentication. - # @!attribute [rw] tls_config - # @return [::Google::Cloud::Ces::V1beta::TlsConfig] - # Optional. The TLS configuration. Includes the custom server certificates - # that the client should trust. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] - # Optional. Service Directory configuration for VPC-SC, used to resolve - # service names within a perimeter. - # @!attribute [rw] custom_headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The custom headers to send in the request to the MCP server. The - # values must be in the format `$context.variables.` and - # can be set in the session variables. See - # https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection - # for more details. - # @!attribute [r] state - # @return [::Google::Cloud::Ces::V1beta::McpTool::State] - # Output only. The dynamic availability state of the tool on the external - # server. - class McpTool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class CustomHeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the dynamic availability state of the tool. - module State - # Default state. - STATE_UNSPECIFIED = 0 - - # The tool is available and actively offered by the server. - ACTIVE = 1 - - # The tool is configured or pinned, but currently not offered by the - # server. - INACTIVE = 2 - - # The tool exists on the server, but does not match the version on the - # server. - STALE = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb deleted file mode 100644 index c2673b2839d2..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # A toolset that contains a list of tools that are offered by the MCP - # server. - # @!attribute [rw] server_address - # @return [::String] - # Required. The address of the MCP server, for example, - # "https://example.com/mcp/". If the server is built with the MCP SDK, the - # url should be suffixed with - # "/mcp/". Only Streamable HTTP transport based servers are supported. See - # https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http - # for more details. - # @!attribute [rw] api_authentication - # @return [::Google::Cloud::Ces::V1beta::ApiAuthentication] - # Optional. Authentication information required to access tools and execute a - # tool against the MCP server. For bearer token authentication, the token - # applies only to tool execution, not to listing tools. This requires that - # tools can be listed without authentication. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] - # Optional. Service Directory configuration for VPC-SC, used to resolve - # service names within a perimeter. - # @!attribute [rw] tls_config - # @return [::Google::Cloud::Ces::V1beta::TlsConfig] - # Optional. The TLS configuration. Includes the custom server certificates - # that the client should trust. - # @!attribute [rw] custom_headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The custom headers to send in the request to the MCP server. The - # values must be in the format `$context.variables.` and - # can be set in the session variables. See - # https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection - # for more details. - # @!attribute [rw] tool_overrides - # @return [::Array<::Google::Cloud::Ces::V1beta::McpToolOverride>] - # Optional. Overrides for individual tools within this toolset. - # This allows overriding specific details like descriptions, names, - # or pinning the tools' states so they aren't fully dynamic. - class McpToolset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class CustomHeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Overrides associated with a given tool in a Toolset. - # This enables "pinning" or "overriding" of tool definitions from the external - # dynamic server. - # @!attribute [rw] tool - # @return [::String] - # Required. The original name of the tool as it is emitted by the MCP server. - # @!attribute [rw] name_override - # @return [::String] - # Optional. If present, this tool uses this name in the Agent instead of the - # original name. This is primarily used as an alias if the MCP server offers - # poorly named tools. - # @!attribute [rw] description_override - # @return [::String] - # Optional. If present, this tool uses this description instead of the - # original description from the server. - # @!attribute [r] snapshot - # @return [::Google::Cloud::Ces::V1beta::McpToolDefinition] - # Output only. If present, this tool is "Pinned" and uses the snapshot values - # as fallbacks if the server becomes temporarily unavailable or if no - # Override is present. - class McpToolOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for a tool's core definition elements that are snapshot. - # Schemas in the snapshot are used as-is and cannot be overridden. - # @!attribute [r] description - # @return [::String] - # Output only. The description of the MCP tool. This can be overridden - # by `description_override` in `McpToolOverride`. - # @!attribute [r] input_schema - # @return [::Google::Cloud::Ces::V1beta::Schema] - # Output only. The schema of the input arguments of the MCP tool. - # @!attribute [r] output_schema - # @return [::Google::Cloud::Ces::V1beta::Schema] - # Output only. The schema of the output arguments of the MCP tool. - class McpToolDefinition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mocks.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mocks.rb deleted file mode 100644 index 67d766edeb1f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/mocks.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # A mocked tool call. - # - # Expresses the target tool + a pattern to match against that tool's - # args / inputs. If the pattern matches, then the mock response will be - # returned. - # @!attribute [rw] tool_id - # @return [::String] - # Optional. The name of the tool to mock. - # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # - # Note: The following fields are mutually exclusive: `tool_id`, `toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] toolset - # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] - # Optional. The toolset to mock. - # - # Note: The following fields are mutually exclusive: `toolset`, `tool_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tool - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. Deprecated. Use tool_identifier instead. - # @!attribute [rw] expected_args_pattern - # @return [::Google::Protobuf::Struct] - # Required. A pattern to match against the args / inputs of all dispatched - # tool calls. If the tool call inputs match this pattern, then mock output - # will be returned. - # @!attribute [rw] mock_response - # @return [::Google::Protobuf::Struct] - # Optional. The mock response / output to return if the tool call args / - # inputs match the pattern. - class MockedToolCall - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel.rb deleted file mode 100644 index 22e1c1c91703..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel.rb +++ /dev/null @@ -1,163 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Represents an Omnichannel resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the omnichannel resource. - # Format: - # `projects/{project}/locations/{location}/omnichannels/{omnichannel}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the omnichannel resource. - # @!attribute [rw] description - # @return [::String] - # Optional. Human-readable description of the omnichannel resource. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the omnichannel resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the omnichannel resource was last updated. - # @!attribute [r] etag - # @return [::String] - # Output only. Etag used to ensure the object hasn't changed during a - # read-modify-write operation. - # @!attribute [rw] integration_config - # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig] - # Optional. The integration config for the omnichannel resource. - class Omnichannel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # OmnichannelIntegrationConfig contains all App integration configs. - # @!attribute [rw] channel_configs - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::ChannelConfig}] - # Optional. Various of configuration for handling App events. - # @!attribute [rw] subscriber_configs - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::SubscriberConfig}] - # Optional. Various of subscribers configs. - # @!attribute [rw] routing_configs - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::RoutingConfig}] - # Optional. The key of routing_configs is a key of `app_configs`, value is a - # `RoutingConfig`, which contains subscriber's key. - class OmnichannelIntegrationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # ChannelConfig contains config for various of app integration. - # @!attribute [rw] whatsapp_config - # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::WhatsappConfig] - # WhatsApp config. - class ChannelConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # How Omnichannel should receive/reply events from WhatsApp. - # @!attribute [rw] phone_number_id - # @return [::String] - # The Phone Number ID associated with the WhatsApp Business Account. - # @!attribute [rw] phone_number - # @return [::String] - # The phone number used for sending/receiving messages. - # @!attribute [rw] whatsapp_business_account_id - # @return [::String] - # The customer's WhatsApp Business Account (WABA) ID. - # @!attribute [rw] webhook_verify_token - # @return [::String] - # The verify token configured in the Meta App Dashboard for webhook - # verification. - # @!attribute [rw] whatsapp_business_token - # @return [::String] - # The access token for authenticating API calls to the WhatsApp Cloud API. - # https://developers.facebook.com/docs/whatsapp/business-management-api/get-started/#business-integration-system-user-access-tokens - # @!attribute [rw] meta_business_portfolio_id - # @return [::String] - # The Meta Business Portfolio (MBP) ID. - # https://www.facebook.com/business/help/1710077379203657 - class WhatsappConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configs of subscribers. - # @!attribute [rw] ces_app_config - # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::CesAppConfig] - # Ces app config. - class SubscriberConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configs for CES app. - # @!attribute [rw] app - # @return [::String] - # The unique identifier of the CES app. - # Format: `projects/{project}/locations/{location}/apps/{app}` - class CesAppConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Routing config specify how/who to route app events to a subscriber. - # @!attribute [rw] subscriber_key - # @return [::String] - # The key of the subscriber. - class RoutingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::ChannelConfig] - class ChannelConfigsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::SubscriberConfig] - class SubscriberConfigsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Ces::V1beta::OmnichannelIntegrationConfig::RoutingConfig] - class RoutingConfigsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel_service.rb deleted file mode 100644 index b579dcb4bcbc..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/omnichannel_service.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # 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] 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. - class OmnichannelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_tool.rb deleted file mode 100644 index 740d2e5e3ced..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_tool.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # A remote API tool defined by an OpenAPI schema. - # @!attribute [rw] open_api_schema - # @return [::String] - # Required. The OpenAPI schema in JSON or YAML format. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of the tool. If not provided, the name of the tool will - # be derived from the OpenAPI schema, from `operation.operationId`. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the tool. If not provided, the description of - # the tool will be derived from the OpenAPI schema, from - # `operation.description` or `operation.summary`. - # @!attribute [rw] api_authentication - # @return [::Google::Cloud::Ces::V1beta::ApiAuthentication] - # Optional. Authentication information required by the API. - # @!attribute [rw] tls_config - # @return [::Google::Cloud::Ces::V1beta::TlsConfig] - # Optional. The TLS configuration. Includes the custom server certificates - # that the client will trust. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] - # Optional. Service Directory configuration. - # @!attribute [rw] ignore_unknown_fields - # @return [::Boolean] - # Optional. If true, the agent will ignore unknown fields in the API - # response. - # @!attribute [rw] url - # @return [::String] - # Optional. The server URL of the Open API schema. - # This field is only set in tools in the environment dependencies during the - # export process if the schema contains a server url. During the import - # process, if this url is present in the environment dependencies and the - # schema has the $env_var placeholder, it will replace the placeholder in the - # schema. - class OpenApiTool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_toolset.rb deleted file mode 100644 index d748e4b19ddb..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/open_api_toolset.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # A toolset that contains a list of tools that are defined by an OpenAPI - # schema. - # @!attribute [rw] open_api_schema - # @return [::String] - # Required. The OpenAPI schema of the toolset. - # @!attribute [rw] api_authentication - # @return [::Google::Cloud::Ces::V1beta::ApiAuthentication] - # Optional. Authentication information required by the API. - # @!attribute [rw] tls_config - # @return [::Google::Cloud::Ces::V1beta::TlsConfig] - # Optional. The TLS configuration. Includes the custom server certificates - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] - # Optional. Service Directory configuration. - # @!attribute [rw] ignore_unknown_fields - # @return [::Boolean] - # Optional. If true, the agent will ignore unknown fields in the API response - # for all operations defined in the OpenAPI schema. - # @!attribute [rw] url - # @return [::String] - # Optional. The server URL of the Open API schema. - # This field is only set in toolsets in the environment dependencies during - # the export process if the schema contains a server url. During the import - # process, if this url is present in the environment dependencies and the - # schema has the $env_var placeholder, it will replace the placeholder in the - # schema. - class OpenApiToolset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb deleted file mode 100644 index a3178c54e15b..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/python_function.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # A Python function tool. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of the Python function to execute. Must match a Python - # function name defined in the python code. Case sensitive. If the name is - # not provided, the first function defined in the python code will be used. - # @!attribute [rw] python_code - # @return [::String] - # Optional. The Python code to execute for the tool. - # @!attribute [r] description - # @return [::String] - # Output only. The description of the Python function, parsed from the python - # code's docstring. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::Ces::V1beta::ServiceDirectoryConfig] - # Optional. Service Directory configuration for the tool. - class PythonFunction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/schema.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/schema.rb deleted file mode 100644 index 44e43fb10de1..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/schema.rb +++ /dev/null @@ -1,162 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # Represents a select subset of an OpenAPI 3.0 schema object. - # @!attribute [rw] type - # @return [::Google::Cloud::Ces::V1beta::Schema::Type] - # Required. The type of the data. - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::Schema}] - # Optional. Properties of Type.OBJECT. - # @!attribute [rw] required - # @return [::Array<::String>] - # Optional. Required properties of Type.OBJECT. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the data. - # @!attribute [rw] items - # @return [::Google::Cloud::Ces::V1beta::Schema] - # Optional. Schema of the elements of Type.ARRAY. - # @!attribute [rw] nullable - # @return [::Boolean] - # Optional. Indicates if the value may be null. - # @!attribute [rw] unique_items - # @return [::Boolean] - # Optional. Indicate the items in the array must be unique. Only applies to - # TYPE.ARRAY. - # @!attribute [rw] prefix_items - # @return [::Array<::Google::Cloud::Ces::V1beta::Schema>] - # Optional. Schemas of initial elements of Type.ARRAY. - # @!attribute [rw] additional_properties - # @return [::Google::Cloud::Ces::V1beta::Schema] - # Optional. Can either be a boolean or an object, controls the presence of - # additional properties. - # @!attribute [rw] any_of - # @return [::Array<::Google::Cloud::Ces::V1beta::Schema>] - # Optional. The value should be validated against any (one or more) of the - # subschemas in the list. - # @!attribute [rw] enum - # @return [::Array<::String>] - # Optional. Possible values of the element of primitive type with enum - # format. Examples: - # 1. We can define direction as : - # \\{type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} - # 2. We can define apartment number as : - # \\{type:INTEGER, format:enum, enum:["101", "201", "301"]} - # @!attribute [rw] default - # @return [::Google::Protobuf::Value] - # Optional. Default value of the data. - # @!attribute [rw] ref - # @return [::String] - # Optional. Allows indirect references between schema nodes. The value should - # be a valid reference to a child of the root `defs`. - # - # For example, the following schema defines a reference to a schema node - # named "Pet": - # - # ``` - # type: object - # properties: - # pet: - # ref: #/defs/Pet - # defs: - # Pet: - # type: object - # properties: - # name: - # type: string - # ``` - # - # The value of the "pet" property is a reference to the schema node - # named "Pet". - # See details in - # https://json-schema.org/understanding-json-schema/structuring. - # @!attribute [rw] defs - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Ces::V1beta::Schema}] - # Optional. A map of definitions for use by `ref`. Only allowed at the root - # of the schema. - # @!attribute [rw] title - # @return [::String] - # Optional. The title of the schema. - # @!attribute [rw] min_items - # @return [::Integer] - # Optional. Minimum number of the elements for Type.ARRAY. - # @!attribute [rw] max_items - # @return [::Integer] - # Optional. Maximum number of the elements for Type.ARRAY. - # @!attribute [rw] minimum - # @return [::Float] - # Optional. Minimum value for Type.INTEGER and Type.NUMBER. - # @!attribute [rw] maximum - # @return [::Float] - # Optional. Maximum value for Type.INTEGER and Type.NUMBER. - class Schema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Ces::V1beta::Schema] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Ces::V1beta::Schema] - class DefsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # OpenAPI data types. - module Type - # Type unspecified. - TYPE_UNSPECIFIED = 0 - - # String type. - STRING = 1 - - # Integer type. - INTEGER = 2 - - # Number type. - NUMBER = 3 - - # Boolean type. - BOOLEAN = 4 - - # Object type. - OBJECT = 5 - - # Array type. - ARRAY = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/search_suggestions.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/search_suggestions.rb deleted file mode 100644 index 431345998533..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/search_suggestions.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # Search suggestions from [Google Search - # Tool][google.cloud.ces.v1beta.GoogleSearchTool]. - # @!attribute [rw] htmls - # @return [::Array<::String>] - # Compliant HTML and CSS styling for search suggestions. - # The provided HTML and CSS automatically adapts to your device settings, - # displaying in either light or dark mode indicated by - # `@media(prefers-color-scheme)`. - # @!attribute [rw] web_search_queries - # @return [::Array<::Google::Cloud::Ces::V1beta::WebSearchQuery>] - # List of queries used to perform the google search along with the search - # result URIs forming the search suggestions. - class GoogleSearchSuggestions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a single web search query and its associated search uri. - # @!attribute [rw] query - # @return [::String] - # The search query text. - # @!attribute [rw] uri - # @return [::String] - # The URI to the Google Search results page for the query. - class WebSearchQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/security_settings.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/security_settings.rb deleted file mode 100644 index 01b810ade3d5..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/security_settings.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Project/Location level security settings for CES. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the security settings. - # Format: `projects/{project}/locations/{location}/securitySettings` - # @!attribute [rw] endpoint_control_policy - # @return [::Google::Cloud::Ces::V1beta::EndpointControlPolicy] - # Optional. Endpoint control related settings. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time of the security settings. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update time of the security settings. - # @!attribute [r] etag - # @return [::String] - # Output only. Etag of the security settings. - class SecuritySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines project/location level endpoint control policy. - # @!attribute [rw] enforcement_scope - # @return [::Google::Cloud::Ces::V1beta::EndpointControlPolicy::EnforcementScope] - # Optional. The scope in which this policy's allowed_origins list is - # enforced. - # @!attribute [rw] allowed_origins - # @return [::Array<::String>] - # Optional. The allowed HTTP(s) origins that tools in the App are able to - # directly call. The enforcement depends on the value of - # enforcement_scope and the VPC-SC status of the project. - # If a port number is not provided, all ports will be allowed. Otherwise, - # the port number must match exactly. For example, "https://example.com" - # will match "https://example.com:443" and any other port. - # "https://example.com:443" will only match "https://example.com:443". - class EndpointControlPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the scope in which this policy's allowed_origins list is - # enforced. - module EnforcementScope - # Unspecified. This policy will be treated as VPCSC_ONLY. - ENFORCEMENT_SCOPE_UNSPECIFIED = 0 - - # This policy applies only when VPC-SC is active. - VPCSC_ONLY = 1 - - # This policy ALWAYS applies, regardless of VPC-SC status. - ALWAYS = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb deleted file mode 100644 index 8bf6c2976597..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/session_service.rb +++ /dev/null @@ -1,493 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Mock tool calls configuration for the session. - # @!attribute [rw] mocked_tool_calls - # @return [::Array<::Google::Cloud::Ces::V1beta::MockedToolCall>] - # Optional. All tool calls to mock for the duration of the session. - # @!attribute [rw] unmatched_tool_call_behavior - # @return [::Google::Cloud::Ces::V1beta::MockConfig::UnmatchedToolCallBehavior] - # Required. Beavhior for tool calls that don't match any args patterns in - # mocked_tool_calls. - class MockConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # What to do when a tool call doesn't match any mocked tool calls. - module UnmatchedToolCallBehavior - # Default value. This value is unused. - UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0 - - # Throw an error for any tool calls that don't match a mock expected input - # pattern. - FAIL = 1 - - # For unmatched tool calls, pass the tool call through to real tool. - PASS_THROUGH = 2 - end - end - - # InputAudioConfig configures how the CES agent should interpret the incoming - # audio data. - # @!attribute [rw] audio_encoding - # @return [::Google::Cloud::Ces::V1beta::AudioEncoding] - # Required. The encoding of the input audio data. - # @!attribute [rw] sample_rate_hertz - # @return [::Integer] - # Required. The sample rate (in Hertz) of the input audio data. - # @!attribute [rw] noise_suppression_level - # @return [::String] - # Optional. Whether to enable noise suppression on the input audio. - # Available values are "low", "moderate", "high", "very_high". - class InputAudioConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # OutputAudioConfig configures how the CES agent should synthesize outgoing - # audio responses. - # @!attribute [rw] audio_encoding - # @return [::Google::Cloud::Ces::V1beta::AudioEncoding] - # Required. The encoding of the output audio data. - # @!attribute [rw] sample_rate_hertz - # @return [::Integer] - # Required. The sample rate (in Hertz) of the output audio data. - class OutputAudioConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration for the session. - # @!attribute [rw] session - # @return [::String] - # Required. The unique identifier of the session. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/sessions/{session}` - # @!attribute [rw] input_audio_config - # @return [::Google::Cloud::Ces::V1beta::InputAudioConfig] - # Optional. Configuration for processing the input audio. - # @!attribute [rw] output_audio_config - # @return [::Google::Cloud::Ces::V1beta::OutputAudioConfig] - # Optional. Configuration for generating the output audio. - # @!attribute [rw] historical_contexts - # @return [::Array<::Google::Cloud::Ces::V1beta::Message>] - # Optional. The historical context of the session, including user inputs, - # agent responses, and other messages. Typically, CES agent would manage - # session automatically so client doesn't need to explicitly populate this - # field. However, client can optionally override the historical contexts to - # force the session start from certain state. - # @!attribute [rw] entry_agent - # @return [::String] - # Optional. The entry agent to handle the session. If not specified, the - # session will be handled by the [root - # agent][google.cloud.ces.v1beta.App.root_agent] of the app. Format: - # `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` - # @!attribute [rw] deployment - # @return [::String] - # Optional. The deployment of the app to use for the session. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` - # @!attribute [rw] time_zone - # @return [::String] - # Optional. The time zone of the user. If provided, the agent will use the - # time zone for date and time related variables. Otherwise, the agent will - # use the time zone specified in the App.time_zone_settings. - # - # The format is the IANA Time Zone Database time zone, e.g. - # "America/Los_Angeles". - # @!attribute [rw] use_tool_fakes - # @return [::Boolean] - # Optional. Whether to use tool fakes for the session. - # If this field is set, the agent will attempt use tool fakes instead of - # calling the real tools. - # @!attribute [rw] remote_dialogflow_query_parameters - # @return [::Google::Cloud::Ces::V1beta::SessionConfig::RemoteDialogflowQueryParameters] - # Optional. - # [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters) - # to send to the remote - # [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents) - # agent when the session control is transferred to the remote agent. - # @!attribute [rw] enable_text_streaming - # @return [::Boolean] - # Optional. Whether to enable streaming text outputs from the model. - # By default, text outputs from the model are collected before sending to the - # client. - # NOTE: This is only supported for text (non-voice) sessions via - # {::Google::Cloud::Ces::V1beta::SessionService::Client#stream_run_session StreamRunSession} - # or {::Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session BidiRunSession}. - class SessionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters) - # to send to the remote - # [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents) - # agent when the session control is transferred to the remote agent. - # @!attribute [rw] webhook_headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The HTTP headers to be sent as webhook_headers in - # [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters). - # @!attribute [rw] payload - # @return [::Google::Protobuf::Struct] - # Optional. The payload to be sent in - # [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters). - # @!attribute [rw] end_user_metadata - # @return [::Google::Protobuf::Struct] - # Optional. The end user metadata to be sent in - # [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters). - class RemoteDialogflowQueryParameters - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class WebhookHeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Request for the client to execute the tools and return the execution results - # before continuing the session. - # @!attribute [rw] tool_calls - # @return [::Array<::Google::Cloud::Ces::V1beta::ToolCall>] - # Optional. The list of tool calls to execute. - class ToolCalls - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Execution results for the requested tool calls from the client. - # @!attribute [rw] tool_responses - # @return [::Array<::Google::Cloud::Ces::V1beta::ToolResponse>] - # Optional. The list of tool execution results. - class ToolResponses - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Citations associated with the agent response. - # @!attribute [rw] cited_chunks - # @return [::Array<::Google::Cloud::Ces::V1beta::Citations::CitedChunk>] - # List of cited pieces of information. - class Citations - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Piece of cited information. - # @!attribute [rw] uri - # @return [::String] - # URI used for citation. - # @!attribute [rw] title - # @return [::String] - # Title of the cited document. - # @!attribute [rw] text - # @return [::String] - # Text used for citation. - # @!attribute [rw] requires_attribution - # @return [::Boolean] - # Whether this citation requires attribution to be shown to the end users. - class CitedChunk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Event input. - # @!attribute [rw] event - # @return [::String] - # Required. The name of the event. - class Event - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input for the session. - # @!attribute [rw] text - # @return [::String] - # Optional. Text data from the end user. - # - # Note: The following fields are mutually exclusive: `text`, `dtmf`, `audio`, `tool_responses`, `image`, `blob`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] dtmf - # @return [::String] - # Optional. DTMF digits from the end user. - # - # Note: The following fields are mutually exclusive: `dtmf`, `text`, `audio`, `tool_responses`, `image`, `blob`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] audio - # @return [::String] - # Optional. Audio data from the end user. - # - # Note: The following fields are mutually exclusive: `audio`, `text`, `dtmf`, `tool_responses`, `image`, `blob`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tool_responses - # @return [::Google::Cloud::Ces::V1beta::ToolResponses] - # Optional. Execution results for the tool calls from the client. - # - # Note: The following fields are mutually exclusive: `tool_responses`, `text`, `dtmf`, `audio`, `image`, `blob`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image - # @return [::Google::Cloud::Ces::V1beta::Image] - # Optional. Image data from the end user. - # - # Note: The following fields are mutually exclusive: `image`, `text`, `dtmf`, `audio`, `tool_responses`, `blob`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] blob - # @return [::Google::Cloud::Ces::V1beta::Blob] - # Optional. Blob data from the end user. - # - # Note: The following fields are mutually exclusive: `blob`, `text`, `dtmf`, `audio`, `tool_responses`, `image`, `variables`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] variables - # @return [::Google::Protobuf::Struct] - # Optional. Contextual variables for the session, keyed by name. Only - # variables declared in the app will be used by the CES agent. - # - # Unrecognized variables will still be sent to the [Dialogflow - # agent][Agent.RemoteDialogflowAgent] as additional session parameters. - # - # Note: The following fields are mutually exclusive: `variables`, `text`, `dtmf`, `audio`, `tool_responses`, `image`, `blob`, `event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] event - # @return [::Google::Cloud::Ces::V1beta::Event] - # Optional. Event input. - # - # Note: The following fields are mutually exclusive: `event`, `text`, `dtmf`, `audio`, `tool_responses`, `image`, `blob`, `variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] will_continue - # @return [::Boolean] - # Optional. A flag to indicate if the current message is a fragment of a - # larger input in the bidi streaming session. - # - # When set to `true`, the agent defers processing until it receives a - # subsequent message where `will_continue` is `false`, or until the system - # detects an endpoint in the audio input. - # - # NOTE: This field does not apply to audio and DTMF inputs, as they are - # always processed automatically based on the endpointing signal. - class SessionInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output for the session. - # @!attribute [rw] text - # @return [::String] - # Output text from the CES agent. - # - # Note: The following fields are mutually exclusive: `text`, `audio`, `tool_calls`, `citations`, `google_search_suggestions`, `end_session`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] audio - # @return [::String] - # Output audio from the CES agent. - # - # Note: The following fields are mutually exclusive: `audio`, `text`, `tool_calls`, `citations`, `google_search_suggestions`, `end_session`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tool_calls - # @return [::Google::Cloud::Ces::V1beta::ToolCalls] - # Request for the client to execute the tools. - # - # Note: The following fields are mutually exclusive: `tool_calls`, `text`, `audio`, `citations`, `google_search_suggestions`, `end_session`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] citations - # @return [::Google::Cloud::Ces::V1beta::Citations] - # Citations that provide the source information for the agent's generated - # text. - # - # Note: The following fields are mutually exclusive: `citations`, `text`, `audio`, `tool_calls`, `google_search_suggestions`, `end_session`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] google_search_suggestions - # @return [::Google::Cloud::Ces::V1beta::GoogleSearchSuggestions] - # The suggestions returned from Google Search as a result of invoking the - # {::Google::Cloud::Ces::V1beta::GoogleSearchTool GoogleSearchTool}. - # - # Note: The following fields are mutually exclusive: `google_search_suggestions`, `text`, `audio`, `tool_calls`, `citations`, `end_session`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_session - # @return [::Google::Cloud::Ces::V1beta::EndSession] - # Indicates the session has ended. - # - # Note: The following fields are mutually exclusive: `end_session`, `text`, `audio`, `tool_calls`, `citations`, `google_search_suggestions`, `payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] payload - # @return [::Google::Protobuf::Struct] - # Custom payload with structured output from the CES agent. - # - # Note: The following fields are mutually exclusive: `payload`, `text`, `audio`, `tool_calls`, `citations`, `google_search_suggestions`, `end_session`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] turn_index - # @return [::Integer] - # Indicates the sequential order of conversation turn to which this output - # belongs to, starting from 1. - # @!attribute [rw] turn_completed - # @return [::Boolean] - # If true, the CES agent has detected the end of the current conversation - # turn and will provide no further output for this turn. - # @!attribute [rw] diagnostic_info - # @return [::Google::Cloud::Ces::V1beta::SessionOutput::DiagnosticInfo] - # Optional. Diagnostic information contains execution details during the - # processing of the input. Only populated in the last SessionOutput (with - # `turn_completed=true`) for each turn. - class SessionOutput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains execution details during the processing. - # @!attribute [rw] messages - # @return [::Array<::Google::Cloud::Ces::V1beta::Message>] - # List of the messages that happened during the processing. - # @!attribute [rw] root_span - # @return [::Google::Cloud::Ces::V1beta::Span] - # A trace of the entire request processing, represented as a root span. - # This span can contain nested child spans for specific operations. - class DiagnosticInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Speech recognition result for the audio input. - # @!attribute [rw] transcript - # @return [::String] - # Optional. Concatenated user speech segments captured during the current - # turn. - class RecognitionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates the agent's audio response has been interrupted. The client should - # immediately stop any current audio playback (e.g., due to user barge-in or - # a new agent response being generated). - # @!attribute [rw] barge_in - # @return [::Boolean] - # Whether the interruption is caused by a user barge-in event. - class InterruptionSignal - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates the session has terminated, due to either successful completion - # (e.g. user says "Good bye!" ) or an agent escalation. - # - # The agent will not process any further inputs after session is terminated and - # the client should half-close and disconnect after receiving all remaining - # responses from the agent. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Struct] - # Optional. Provides additional information about the end session signal, - # such as the reason for ending the session. - class EndSession - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates that the server will disconnect soon and the client should - # half-close and restart the connection. - class GoAway - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::SessionService::Client#run_session SessionService.RunSession}. - # @!attribute [rw] config - # @return [::Google::Cloud::Ces::V1beta::SessionConfig] - # Required. The configuration for the session. - # @!attribute [rw] inputs - # @return [::Array<::Google::Cloud::Ces::V1beta::SessionInput>] - # Required. Inputs for the session. - class RunSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::SessionService::Client#run_session SessionService.RunSession}. - # @!attribute [rw] outputs - # @return [::Array<::Google::Cloud::Ces::V1beta::SessionOutput>] - # Outputs for the session. - class RunSessionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The top-level message sent by the client for the - # {::Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session SessionService.BidiRunSession} - # method. - # @!attribute [rw] config - # @return [::Google::Cloud::Ces::V1beta::SessionConfig] - # Optional. The initial config message for the session. - # - # Note: The following fields are mutually exclusive: `config`, `realtime_input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] realtime_input - # @return [::Google::Cloud::Ces::V1beta::SessionInput] - # Optional. Realtime input for the session. - # - # Note: The following fields are mutually exclusive: `realtime_input`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BidiSessionClientMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The top-level message returned from - # {::Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session SessionService.BidiRunSession} - # method. - # @!attribute [rw] session_output - # @return [::Google::Cloud::Ces::V1beta::SessionOutput] - # Optional. Processing result from the CES agent. - # - # Note: The following fields are mutually exclusive: `session_output`, `recognition_result`, `interruption_signal`, `end_session`, `go_away`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] recognition_result - # @return [::Google::Cloud::Ces::V1beta::RecognitionResult] - # Optional. Realtime speech recognition result for the audio input. - # - # Note: The following fields are mutually exclusive: `recognition_result`, `session_output`, `interruption_signal`, `end_session`, `go_away`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] interruption_signal - # @return [::Google::Cloud::Ces::V1beta::InterruptionSignal] - # Optional. Indicates the agent's audio response has been interrupted. - # - # Note: The following fields are mutually exclusive: `interruption_signal`, `session_output`, `recognition_result`, `end_session`, `go_away`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_session - # @return [::Google::Cloud::Ces::V1beta::EndSession] - # Optional. Indicates that the session has ended. - # - # Note: The following fields are mutually exclusive: `end_session`, `session_output`, `recognition_result`, `interruption_signal`, `go_away`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] go_away - # @return [::Google::Cloud::Ces::V1beta::GoAway] - # Optional. Indicates that the server will disconnect soon and the client - # should half-close and restart the connection. - # - # Note: The following fields are mutually exclusive: `go_away`, `session_output`, `recognition_result`, `interruption_signal`, `end_session`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BidiSessionServerMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AudioEncoding specifies the encoding format for audio data. - module AudioEncoding - # Unspecified audio encoding. - AUDIO_ENCODING_UNSPECIFIED = 0 - - # 16-bit linear PCM audio encoding. - LINEAR16 = 1 - - # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - MULAW = 2 - - # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. - ALAW = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/system_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/system_tool.rb deleted file mode 100644 index 779f3967ce8e..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/system_tool.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # Pre-defined system tool. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the system tool. - # @!attribute [r] description - # @return [::String] - # Output only. The description of the system tool. - class SystemTool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb deleted file mode 100644 index f2435d73822d..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool.rb +++ /dev/null @@ -1,136 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # A tool represents an action that the CES agent can take to achieve certain - # goals. - # @!attribute [rw] client_function - # @return [::Google::Cloud::Ces::V1beta::ClientFunction] - # Optional. The client function. - # - # Note: The following fields are mutually exclusive: `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] open_api_tool - # @return [::Google::Cloud::Ces::V1beta::OpenApiTool] - # Optional. The open API tool. - # - # Note: The following fields are mutually exclusive: `open_api_tool`, `client_function`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] google_search_tool - # @return [::Google::Cloud::Ces::V1beta::GoogleSearchTool] - # Optional. The google search tool. - # - # Note: The following fields are mutually exclusive: `google_search_tool`, `client_function`, `open_api_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] connector_tool - # @return [::Google::Cloud::Ces::V1beta::ConnectorTool] - # Optional. The Integration Connector tool. - # - # Note: The following fields are mutually exclusive: `connector_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_store_tool - # @return [::Google::Cloud::Ces::V1beta::DataStoreTool] - # Optional. The data store tool. - # - # Note: The following fields are mutually exclusive: `data_store_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] python_function - # @return [::Google::Cloud::Ces::V1beta::PythonFunction] - # Optional. The python function tool. - # - # Note: The following fields are mutually exclusive: `python_function`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mcp_tool - # @return [::Google::Cloud::Ces::V1beta::McpTool] - # Optional. The MCP tool. An MCP tool cannot be created or updated directly - # and is managed by the MCP toolset. - # - # Note: The following fields are mutually exclusive: `mcp_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] file_search_tool - # @return [::Google::Cloud::Ces::V1beta::FileSearchTool] - # Optional. The file search tool. - # - # Note: The following fields are mutually exclusive: `file_search_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `system_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] system_tool - # @return [::Google::Cloud::Ces::V1beta::SystemTool] - # Optional. The system tool. - # - # Note: The following fields are mutually exclusive: `system_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `agent_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] agent_tool - # @return [::Google::Cloud::Ces::V1beta::AgentTool] - # Optional. The agent tool. - # - # Note: The following fields are mutually exclusive: `agent_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `widget_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] widget_tool - # @return [::Google::Cloud::Ces::V1beta::WidgetTool] - # Optional. The widget tool. - # - # Note: The following fields are mutually exclusive: `widget_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `remote_agent_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] remote_agent_tool - # @return [::Google::Cloud::Ces::V1beta::RemoteAgentTool] - # Optional. The remote agent tool. - # - # Note: The following fields are mutually exclusive: `remote_agent_tool`, `client_function`, `open_api_tool`, `google_search_tool`, `connector_tool`, `data_store_tool`, `python_function`, `mcp_tool`, `file_search_tool`, `system_tool`, `agent_tool`, `widget_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the tool. Format: - # - # * `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # for standalone tools. - # * `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}/tools/{tool}` - # for tools retrieved from a toolset. - # - # These tools are dynamic and output-only; they cannot be referenced directly - # where a tool is expected. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name of the tool, derived based on the tool's - # type. For example, display name of a [ClientFunction][Tool.ClientFunction] - # is derived from its `name` property. - # @!attribute [rw] execution_type - # @return [::Google::Cloud::Ces::V1beta::ExecutionType] - # Optional. The execution type of the tool. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Optional. The timeout for the tool execution. If not set, the default - # timeout is 30 seconds for `SYNCHRONOUS` tools and 60 seconds for - # `ASYNCHRONOUS` tools. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the tool was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the tool was last updated. - # @!attribute [rw] etag - # @return [::String] - # Etag used to ensure the object hasn't changed during a read-modify-write - # operation. If the etag is empty, the update will overwrite any concurrent - # changes. - # @!attribute [r] generated_summary - # @return [::String] - # Output only. If the tool is generated by the LLM assistant, this field - # contains a descriptive summary of the generation. - # @!attribute [rw] tool_fake_config - # @return [::Google::Cloud::Ces::V1beta::ToolFakeConfig] - # Optional. Configuration for tool behavior in fake mode. - class Tool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb deleted file mode 100644 index 01584c536336..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/tool_service.rb +++ /dev/null @@ -1,185 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Request message for - # {::Google::Cloud::Ces::V1beta::ToolService::Client#execute_tool ToolService.ExecuteTool}. - # @!attribute [rw] tool - # @return [::String] - # Optional. The name of the tool to execute. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} - # - # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] toolset_tool - # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] - # Optional. The toolset tool to execute. Only one tool should match the - # predicate from the toolset. Otherwise, an error will be returned. - # - # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] variables - # @return [::Google::Protobuf::Struct] - # Optional. The variables that are available for the tool execution. - # - # Note: The following fields are mutually exclusive: `variables`, `context`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] context - # @return [::Google::Protobuf::Struct] - # Optional. The - # [ToolCallContext](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/python#environment - # for details) to be passed to the Python tool. - # - # Note: The following fields are mutually exclusive: `context`, `variables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app which the tool/toolset belongs to. - # Format: `projects/{project}/locations/{location}/apps/{app}` - # @!attribute [rw] args - # @return [::Google::Protobuf::Struct] - # Optional. The input parameters and values for the tool in JSON object - # format. - # @!attribute [rw] mock_config - # @return [::Google::Cloud::Ces::V1beta::MockConfig] - # Optional. Mock configuration for the tool execution. - # If this field is set, tools that call other tools will be - # mocked based on the provided patterns and responses. - class ExecuteToolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::ToolService::Client#execute_tool ToolService.ExecuteTool}. - # @!attribute [rw] tool - # @return [::String] - # The name of the tool that got executed. - # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # - # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] toolset_tool - # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] - # The toolset tool that got executed. - # - # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Struct] - # The tool execution result in JSON object format. - # Use "output" key to specify tool response and "error" key to specify - # error details (if any). If "output" and "error" keys are not specified, - # then whole "response" is treated as tool execution result. - # @!attribute [rw] variables - # @return [::Google::Protobuf::Struct] - # The variable values at the end of the tool execution. - # @!attribute [rw] citations - # @return [::Google::Cloud::Ces::V1beta::Citations] - # Citations that provide the source information for the tool's execution. - # @!attribute [rw] google_search_suggestions - # @return [::Google::Cloud::Ces::V1beta::GoogleSearchSuggestions] - # The suggestions returned from Google Search as a result of invoking the - # Google Search Tool during the tool execution. - class ExecuteToolResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tool_schema ToolService.RetrieveToolSchema}. - # @!attribute [rw] tool - # @return [::String] - # Optional. The name of the tool to retrieve the schema for. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/tools/\\{tool} - # - # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] toolset_tool - # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] - # Optional. The toolset tool to retrieve the schema for. Only one tool - # should match the predicate from the toolset. Otherwise, an error will be - # returned. - # - # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the app which the tool/toolset belongs to. - # Format: `projects/{project}/locations/{location}/apps/{app}` - class RetrieveToolSchemaRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tool_schema ToolService.RetrieveToolSchema}. - # @!attribute [rw] tool - # @return [::String] - # The name of the tool that the schema is for. - # Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` - # - # Note: The following fields are mutually exclusive: `tool`, `toolset_tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] toolset_tool - # @return [::Google::Cloud::Ces::V1beta::ToolsetTool] - # The toolset tool that the schema is for. - # - # Note: The following fields are mutually exclusive: `toolset_tool`, `tool`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input_schema - # @return [::Google::Cloud::Ces::V1beta::Schema] - # The schema of the tool input parameters. - # @!attribute [rw] output_schema - # @return [::Google::Cloud::Ces::V1beta::Schema] - # The schema of the tool output parameters. - class RetrieveToolSchemaResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tools ToolService.RetrieveTools}. - # @!attribute [rw] toolset - # @return [::String] - # Required. The name of the toolset to retrieve the tools for. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - # @!attribute [rw] tool_ids - # @return [::Array<::String>] - # Optional. The identifiers of the tools to retrieve from the toolset. - # If empty, all tools in the toolset will be returned. - # @!attribute [rw] bypass_persistence_config - # @return [::Boolean] - # Optional. If true, the returned tools will contain raw descriptions and - # schemas directly from the server, bypassing any stored persistence - # configurations (overrides/snapshots). - class RetrieveToolsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tools ToolService.RetrieveTools}. - # @!attribute [rw] tools - # @return [::Array<::Google::Cloud::Ces::V1beta::Tool>] - # The list of tools that are included in the specified toolset. - class RetrieveToolsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset.rb deleted file mode 100644 index 87489b9c3c0a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # A toolset represents a group of dynamically managed tools that can be used - # by the agent. - # @!attribute [rw] mcp_toolset - # @return [::Google::Cloud::Ces::V1beta::McpToolset] - # Optional. A toolset that contains a list of tools that are offered by the - # MCP server. - # - # Note: The following fields are mutually exclusive: `mcp_toolset`, `open_api_toolset`, `connector_toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] open_api_toolset - # @return [::Google::Cloud::Ces::V1beta::OpenApiToolset] - # Optional. A toolset that contains a list of tools that are defined by an - # OpenAPI schema. - # - # Note: The following fields are mutually exclusive: `open_api_toolset`, `mcp_toolset`, `connector_toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] connector_toolset - # @return [::Google::Cloud::Ces::V1beta::ConnectorToolset] - # Optional. A toolset that generates tools from an Integration Connectors - # Connection. - # - # Note: The following fields are mutually exclusive: `connector_toolset`, `mcp_toolset`, `open_api_toolset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. The unique identifier of the toolset. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the toolset. Must be unique within the same - # app. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the toolset. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the toolset was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the toolset was last updated. - # @!attribute [rw] etag - # @return [::String] - # ETag used to ensure the object hasn't changed during a read-modify-write - # operation. If the etag is empty, the update will overwrite any concurrent - # changes. - # @!attribute [rw] execution_type - # @return [::Google::Cloud::Ces::V1beta::ExecutionType] - # Optional. The execution type of the tools in the toolset. - # @!attribute [rw] tool_fake_config - # @return [::Google::Cloud::Ces::V1beta::ToolFakeConfig] - # Optional. Configuration for tools behavior in fake mode. - class Toolset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset_tool.rb deleted file mode 100644 index 30ade4fbb11d..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/toolset_tool.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Ces - module V1beta - # A tool that is created from a toolset. - # @!attribute [rw] toolset - # @return [::String] - # Required. The resource name of the Toolset from which this tool is derived. - # Format: - # `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` - # @!attribute [rw] tool_id - # @return [::String] - # Optional. The tool ID to filter the tools to retrieve the schema for. - class ToolsetTool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_service.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_service.rb deleted file mode 100644 index 54cc5a0029da..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_service.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Request message for - # {::Google::Cloud::Ces::V1beta::WidgetService::Client#generate_chat_token WidgetService.GenerateChatToken}. - # @!attribute [rw] name - # @return [::String] - # Required. The session name to generate the chat token for. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/sessions/\\{session} - # @!attribute [rw] deployment - # @return [::String] - # Required. The deployment of the app to use for the session. - # Format: - # projects/\\{project}/locations/\\{location}/apps/\\{app}/deployments/\\{deployment} - # @!attribute [rw] recaptcha_token - # @return [::String] - # Optional. The reCAPTCHA token generated by the client-side chat widget. - # @!attribute [rw] live_handoff_enabled - # @return [::Boolean] - # Optional. Indicates if live handoff is enabled for the session. - class GenerateChatTokenRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Ces::V1beta::WidgetService::Client#generate_chat_token WidgetService.GenerateChatToken}. - # @!attribute [rw] chat_token - # @return [::String] - # The session scoped token for chat widget to authenticate with Session APIs. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the chat token expires. - class GenerateChatTokenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb deleted file mode 100644 index 40d4a164da67..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/cloud/ces/v1beta/widget_tool.rb +++ /dev/null @@ -1,182 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Ces - module V1beta - # Represents a widget tool that the agent can invoke. When the tool is chosen - # by the agent, agent will return the widget to the client. The client is - # responsible for processing the widget and generating the next user query to - # continue the interaction with the agent. - # @!attribute [rw] parameters - # @return [::Google::Cloud::Ces::V1beta::Schema] - # Optional. The input parameters of the widget tool. - # @!attribute [rw] name - # @return [::String] - # Required. The display name of the widget tool. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the widget tool. - # @!attribute [rw] widget_type - # @return [::Google::Cloud::Ces::V1beta::WidgetTool::WidgetType] - # Optional. The type of the widget tool. If not specified, the default type - # will be CUSTOMIZED. - # @!attribute [rw] ui_config - # @return [::Google::Protobuf::Struct] - # Optional. Configuration for rendering the widget. - # @!attribute [rw] data_mapping - # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping] - # Optional. The mapping that defines how data from a source tool is mapped to - # the widget's input parameters. - # @!attribute [rw] text_response_config - # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig] - # Optional. Configuration for always-included text responses. - class WidgetTool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for the text response returned with the widget. - # @!attribute [rw] type - # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig::Type] - # Optional. The strategy for providing the text response. - # @!attribute [rw] static_text - # @return [::String] - # Optional. The static text response to return when type is STATIC. - # @!attribute [rw] text_response_instruction - # @return [::String] - # Optional. Instruction for the LLM on how to generate the text response. - # Used as the description for the text response parameter if type is - # LLM_GENERATED. - class TextResponseConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines how the text response is produced. - module Type - # Unspecified type. - TYPE_UNSPECIFIED = 0 - - # The LLM dynamically decides whether to generate a text response - # alongside the widget based on the conversation context. - NONE = 1 - - # The LLM is explicitly required to generate a text response. - LLM_GENERATED = 2 - - # A pre-defined static text response is always used. - STATIC = 3 - end - end - - # Configuration for mapping data from a source tool to the widget's input - # parameters. - # @!attribute [rw] source_tool_name - # @return [::String] - # Optional. The resource name of the tool that provides the data for the - # widget (e.g., a search tool or a custom function). Format: - # `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` - # @!attribute [rw] field_mappings - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. A map of widget input parameter fields to the corresponding - # output fields of the source tool. - # @!attribute [rw] python_function - # @return [::Google::Cloud::Ces::V1beta::PythonFunction] - # Optional. Configuration for a Python function used to transform the - # source tool's output into the widget's input format. - # @!attribute [rw] mode - # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode] - # Optional. The mode of the data mapping. - # @!attribute [rw] python_script - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: Use `python_function` instead. - class DataMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class FieldMappingsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The strategy used to map data from the source tool to the widget. - module Mode - # Unspecified mode. - MODE_UNSPECIFIED = 0 - - # Use the `field_mappings` map for data transformation. - FIELD_MAPPING = 1 - - # Use the `python_script` for data transformation. - PYTHON_SCRIPT = 2 - end - end - - # All available widget types. - # New values may be added to this enum in the future. - module WidgetType - # Unspecified widget type. - WIDGET_TYPE_UNSPECIFIED = 0 - - # Custom widget type. - CUSTOM = 1 - - # Product carousel widget. - PRODUCT_CAROUSEL = 2 - - # Product details widget. - PRODUCT_DETAILS = 3 - - # Quick actions widget. - QUICK_ACTIONS = 4 - - # Product comparison widget. - PRODUCT_COMPARISON = 5 - - # Advanced product details widget. - ADVANCED_PRODUCT_DETAILS = 6 - - # Short form widget. - SHORT_FORM = 7 - - # Overall satisfaction widget. - OVERALL_SATISFACTION = 8 - - # Order summary widget. - ORDER_SUMMARY = 9 - - # Appointment details widget. - APPOINTMENT_DETAILS = 10 - - # Appointment scheduler widget. - APPOINTMENT_SCHEDULER = 11 - - # Contact form widget. - CONTACT_FORM = 12 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-ces-v1beta/snippets/Gemfile deleted file mode 100644 index bdd4e8573ed9..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-ces-v1beta", path: "../" -else - gem "google-cloud-ces-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-ces-v1beta/snippets/agent_service/batch_delete_conversations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/batch_delete_conversations.rb deleted file mode 100644 index cc134bf3aa7a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/batch_delete_conversations.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_BatchDeleteConversations_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the batch_delete_conversations call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#batch_delete_conversations. -# -def batch_delete_conversations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new - - # Call the batch_delete_conversations method. - result = client.batch_delete_conversations 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 ces_v1beta_generated_AgentService_BatchDeleteConversations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_agent.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_agent.rb deleted file mode 100644 index 3707bab09b1c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_agent.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_CreateAgent_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_agent call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#create_agent. -# -def create_agent - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateAgentRequest.new - - # Call the create_agent method. - result = client.create_agent request - - # The returned object is of type Google::Cloud::Ces::V1beta::Agent. - p result -end -# [END ces_v1beta_generated_AgentService_CreateAgent_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app.rb deleted file mode 100644 index 1351cdd6d41f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_CreateApp_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_app call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#create_app. -# -def create_app - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateAppRequest.new - - # Call the create_app method. - result = client.create_app 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 ces_v1beta_generated_AgentService_CreateApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app_version.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app_version.rb deleted file mode 100644 index eb8529ec2bf1..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_app_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_CreateAppVersion_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_app_version call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#create_app_version. -# -def create_app_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new - - # Call the create_app_version method. - result = client.create_app_version request - - # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. - p result -end -# [END ces_v1beta_generated_AgentService_CreateAppVersion_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_deployment.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_deployment.rb deleted file mode 100644 index afece7ab06d9..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_CreateDeployment_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_deployment call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#create_deployment. -# -def create_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new - - # Call the create_deployment method. - result = client.create_deployment request - - # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. - p result -end -# [END ces_v1beta_generated_AgentService_CreateDeployment_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_example.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_example.rb deleted file mode 100644 index 198288db759b..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_example.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_CreateExample_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_example call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#create_example. -# -def create_example - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateExampleRequest.new - - # Call the create_example method. - result = client.create_example request - - # The returned object is of type Google::Cloud::Ces::V1beta::Example. - p result -end -# [END ces_v1beta_generated_AgentService_CreateExample_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_guardrail.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_guardrail.rb deleted file mode 100644 index c3dff2f9fe29..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_guardrail.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_CreateGuardrail_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_guardrail call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#create_guardrail. -# -def create_guardrail - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new - - # Call the create_guardrail method. - result = client.create_guardrail request - - # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. - p result -end -# [END ces_v1beta_generated_AgentService_CreateGuardrail_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_tool.rb deleted file mode 100644 index 856dc8cfca2a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_tool.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_CreateTool_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_tool call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#create_tool. -# -def create_tool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateToolRequest.new - - # Call the create_tool method. - result = client.create_tool request - - # The returned object is of type Google::Cloud::Ces::V1beta::Tool. - p result -end -# [END ces_v1beta_generated_AgentService_CreateTool_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_toolset.rb deleted file mode 100644 index f329f4d6c492..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/create_toolset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_CreateToolset_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_toolset call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#create_toolset. -# -def create_toolset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateToolsetRequest.new - - # Call the create_toolset method. - result = client.create_toolset request - - # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. - p result -end -# [END ces_v1beta_generated_AgentService_CreateToolset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_agent.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_agent.rb deleted file mode 100644 index 3228eb2b3c25..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_agent.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_DeleteAgent_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_agent call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#delete_agent. -# -def delete_agent - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteAgentRequest.new - - # Call the delete_agent method. - result = client.delete_agent request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_AgentService_DeleteAgent_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app.rb deleted file mode 100644 index 3320a6a0ea2b..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_DeleteApp_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_app call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#delete_app. -# -def delete_app - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteAppRequest.new - - # Call the delete_app method. - result = client.delete_app 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 ces_v1beta_generated_AgentService_DeleteApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app_version.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app_version.rb deleted file mode 100644 index 50ae1be81d48..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_app_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_DeleteAppVersion_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_app_version call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#delete_app_version. -# -def delete_app_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new - - # Call the delete_app_version method. - result = client.delete_app_version request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_AgentService_DeleteAppVersion_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_conversation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_conversation.rb deleted file mode 100644 index 3186a68f3746..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_conversation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_DeleteConversation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_conversation call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#delete_conversation. -# -def delete_conversation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::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 ces_v1beta_generated_AgentService_DeleteConversation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_deployment.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_deployment.rb deleted file mode 100644 index e673759d2a13..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_DeleteDeployment_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_deployment call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#delete_deployment. -# -def delete_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new - - # Call the delete_deployment method. - result = client.delete_deployment request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_AgentService_DeleteDeployment_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_example.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_example.rb deleted file mode 100644 index 12ca39c282a1..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_example.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_DeleteExample_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_example call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#delete_example. -# -def delete_example - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteExampleRequest.new - - # Call the delete_example method. - result = client.delete_example request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_AgentService_DeleteExample_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_guardrail.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_guardrail.rb deleted file mode 100644 index 635f74171b2a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_guardrail.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_DeleteGuardrail_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_guardrail call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#delete_guardrail. -# -def delete_guardrail - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new - - # Call the delete_guardrail method. - result = client.delete_guardrail request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_AgentService_DeleteGuardrail_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_tool.rb deleted file mode 100644 index c09140933e39..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_tool.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_DeleteTool_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_tool call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#delete_tool. -# -def delete_tool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteToolRequest.new - - # Call the delete_tool method. - result = client.delete_tool request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_AgentService_DeleteTool_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_toolset.rb deleted file mode 100644 index 789ac2a07a45..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/delete_toolset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_DeleteToolset_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_toolset call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#delete_toolset. -# -def delete_toolset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new - - # Call the delete_toolset method. - result = client.delete_toolset request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_AgentService_DeleteToolset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/export_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/export_app.rb deleted file mode 100644 index 3773753dcfc9..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/export_app.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ExportApp_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the export_app call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#export_app. -# -def export_app - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ExportAppRequest.new - - # Call the export_app method. - result = client.export_app 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 ces_v1beta_generated_AgentService_ExportApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/generate_app_resource.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/generate_app_resource.rb deleted file mode 100644 index c5c5cb8c0b86..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/generate_app_resource.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GenerateAppResource_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the generate_app_resource call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource. -# -def generate_app_resource - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new - - # Call the generate_app_resource method. - result = client.generate_app_resource 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 ces_v1beta_generated_AgentService_GenerateAppResource_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_agent.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_agent.rb deleted file mode 100644 index 148fe6c2ed01..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_agent.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetAgent_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_agent call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_agent. -# -def get_agent - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetAgentRequest.new - - # Call the get_agent method. - result = client.get_agent request - - # The returned object is of type Google::Cloud::Ces::V1beta::Agent. - p result -end -# [END ces_v1beta_generated_AgentService_GetAgent_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app.rb deleted file mode 100644 index 2768d4016fec..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetApp_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_app call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_app. -# -def get_app - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetAppRequest.new - - # Call the get_app method. - result = client.get_app request - - # The returned object is of type Google::Cloud::Ces::V1beta::App. - p result -end -# [END ces_v1beta_generated_AgentService_GetApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app_version.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app_version.rb deleted file mode 100644 index 7492f5962c3b..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_app_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetAppVersion_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_app_version call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_app_version. -# -def get_app_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetAppVersionRequest.new - - # Call the get_app_version method. - result = client.get_app_version request - - # The returned object is of type Google::Cloud::Ces::V1beta::AppVersion. - p result -end -# [END ces_v1beta_generated_AgentService_GetAppVersion_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_changelog.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_changelog.rb deleted file mode 100644 index b61bf7cfc967..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_changelog.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetChangelog_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_changelog call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_changelog. -# -def get_changelog - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetChangelogRequest.new - - # Call the get_changelog method. - result = client.get_changelog request - - # The returned object is of type Google::Cloud::Ces::V1beta::Changelog. - p result -end -# [END ces_v1beta_generated_AgentService_GetChangelog_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_conversation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_conversation.rb deleted file mode 100644 index fb002469583a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_conversation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetConversation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_conversation call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_conversation. -# -def get_conversation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetConversationRequest.new - - # Call the get_conversation method. - result = client.get_conversation request - - # The returned object is of type Google::Cloud::Ces::V1beta::Conversation. - p result -end -# [END ces_v1beta_generated_AgentService_GetConversation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_deployment.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_deployment.rb deleted file mode 100644 index 58a308fd1a68..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetDeployment_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_deployment call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_deployment. -# -def get_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetDeploymentRequest.new - - # Call the get_deployment method. - result = client.get_deployment request - - # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. - p result -end -# [END ces_v1beta_generated_AgentService_GetDeployment_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_example.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_example.rb deleted file mode 100644 index 717af9e9ae94..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_example.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetExample_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_example call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_example. -# -def get_example - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetExampleRequest.new - - # Call the get_example method. - result = client.get_example request - - # The returned object is of type Google::Cloud::Ces::V1beta::Example. - p result -end -# [END ces_v1beta_generated_AgentService_GetExample_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_guardrail.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_guardrail.rb deleted file mode 100644 index c08d02764583..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_guardrail.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetGuardrail_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_guardrail call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_guardrail. -# -def get_guardrail - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetGuardrailRequest.new - - # Call the get_guardrail method. - result = client.get_guardrail request - - # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. - p result -end -# [END ces_v1beta_generated_AgentService_GetGuardrail_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_security_settings.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_security_settings.rb deleted file mode 100644 index e7e16b9d2330..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_security_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetSecuritySettings_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_security_settings call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_security_settings. -# -def get_security_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new - - # Call the get_security_settings method. - result = client.get_security_settings request - - # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. - p result -end -# [END ces_v1beta_generated_AgentService_GetSecuritySettings_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_tool.rb deleted file mode 100644 index 9fcd1a266d36..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_tool.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetTool_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_tool call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_tool. -# -def get_tool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetToolRequest.new - - # Call the get_tool method. - result = client.get_tool request - - # The returned object is of type Google::Cloud::Ces::V1beta::Tool. - p result -end -# [END ces_v1beta_generated_AgentService_GetTool_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_toolset.rb deleted file mode 100644 index d7b1cde96e9d..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/get_toolset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_GetToolset_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_toolset call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#get_toolset. -# -def get_toolset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetToolsetRequest.new - - # Call the get_toolset method. - result = client.get_toolset request - - # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. - p result -end -# [END ces_v1beta_generated_AgentService_GetToolset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/import_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/import_app.rb deleted file mode 100644 index 545d2f59c86b..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/import_app.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ImportApp_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the import_app call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#import_app. -# -def import_app - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ImportAppRequest.new - - # Call the import_app method. - result = client.import_app 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 ces_v1beta_generated_AgentService_ImportApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_agents.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_agents.rb deleted file mode 100644 index e8028c636fae..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_agents.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ListAgents_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_agents call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#list_agents. -# -def list_agents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListAgentsRequest.new - - # Call the list_agents method. - result = client.list_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::Ces::V1beta::Agent. - p item - end -end -# [END ces_v1beta_generated_AgentService_ListAgents_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_app_versions.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_app_versions.rb deleted file mode 100644 index 096ba8dfb0eb..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_app_versions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ListAppVersions_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_app_versions call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions. -# -def list_app_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new - - # Call the list_app_versions method. - result = client.list_app_versions 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::Ces::V1beta::AppVersion. - p item - end -end -# [END ces_v1beta_generated_AgentService_ListAppVersions_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_apps.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_apps.rb deleted file mode 100644 index 8400d805d3a3..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_apps.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ListApps_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_apps call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#list_apps. -# -def list_apps - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListAppsRequest.new - - # Call the list_apps method. - result = client.list_apps 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::Ces::V1beta::App. - p item - end -end -# [END ces_v1beta_generated_AgentService_ListApps_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_changelogs.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_changelogs.rb deleted file mode 100644 index 19185ddf9fc4..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_changelogs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ListChangelogs_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_changelogs call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs. -# -def list_changelogs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListChangelogsRequest.new - - # Call the list_changelogs method. - result = client.list_changelogs 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::Ces::V1beta::Changelog. - p item - end -end -# [END ces_v1beta_generated_AgentService_ListChangelogs_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_conversations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_conversations.rb deleted file mode 100644 index 8539cfada01a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_conversations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ListConversations_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_conversations call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations. -# -def list_conversations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::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::Ces::V1beta::Conversation. - p item - end -end -# [END ces_v1beta_generated_AgentService_ListConversations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_deployments.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_deployments.rb deleted file mode 100644 index e0bed982f639..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_deployments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ListDeployments_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_deployments call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#list_deployments. -# -def list_deployments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new - - # Call the list_deployments method. - result = client.list_deployments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Ces::V1beta::Deployment. - p item - end -end -# [END ces_v1beta_generated_AgentService_ListDeployments_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_examples.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_examples.rb deleted file mode 100644 index 96b36595ffc8..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_examples.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ListExamples_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_examples call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#list_examples. -# -def list_examples - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListExamplesRequest.new - - # Call the list_examples method. - result = client.list_examples 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::Ces::V1beta::Example. - p item - end -end -# [END ces_v1beta_generated_AgentService_ListExamples_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_guardrails.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_guardrails.rb deleted file mode 100644 index e3a271563e14..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_guardrails.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ListGuardrails_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_guardrails call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails. -# -def list_guardrails - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new - - # Call the list_guardrails method. - result = client.list_guardrails 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::Ces::V1beta::Guardrail. - p item - end -end -# [END ces_v1beta_generated_AgentService_ListGuardrails_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_tools.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_tools.rb deleted file mode 100644 index 64ddcf8a5f89..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_tools.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ListTools_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_tools call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#list_tools. -# -def list_tools - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListToolsRequest.new - - # Call the list_tools method. - result = client.list_tools 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::Ces::V1beta::Tool. - p item - end -end -# [END ces_v1beta_generated_AgentService_ListTools_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_toolsets.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_toolsets.rb deleted file mode 100644 index 2b1a74465327..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/list_toolsets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_ListToolsets_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_toolsets call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets. -# -def list_toolsets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListToolsetsRequest.new - - # Call the list_toolsets method. - result = client.list_toolsets 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::Ces::V1beta::Toolset. - p item - end -end -# [END ces_v1beta_generated_AgentService_ListToolsets_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/restore_app_version.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/restore_app_version.rb deleted file mode 100644 index d0207b6911d0..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/restore_app_version.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_RestoreAppVersion_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the restore_app_version call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#restore_app_version. -# -def restore_app_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.new - - # Call the restore_app_version method. - result = client.restore_app_version 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 ces_v1beta_generated_AgentService_RestoreAppVersion_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_agent.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_agent.rb deleted file mode 100644 index 558c4820e225..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_agent.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_UpdateAgent_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_agent call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#update_agent. -# -def update_agent - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateAgentRequest.new - - # Call the update_agent method. - result = client.update_agent request - - # The returned object is of type Google::Cloud::Ces::V1beta::Agent. - p result -end -# [END ces_v1beta_generated_AgentService_UpdateAgent_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_app.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_app.rb deleted file mode 100644 index 38d09c026728..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_app.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_UpdateApp_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_app call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#update_app. -# -def update_app - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateAppRequest.new - - # Call the update_app method. - result = client.update_app request - - # The returned object is of type Google::Cloud::Ces::V1beta::App. - p result -end -# [END ces_v1beta_generated_AgentService_UpdateApp_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_deployment.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_deployment.rb deleted file mode 100644 index d86adee0b940..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_UpdateDeployment_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_deployment call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#update_deployment. -# -def update_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new - - # Call the update_deployment method. - result = client.update_deployment request - - # The returned object is of type Google::Cloud::Ces::V1beta::Deployment. - p result -end -# [END ces_v1beta_generated_AgentService_UpdateDeployment_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_example.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_example.rb deleted file mode 100644 index 9a128dab9599..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_example.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_UpdateExample_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_example call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#update_example. -# -def update_example - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateExampleRequest.new - - # Call the update_example method. - result = client.update_example request - - # The returned object is of type Google::Cloud::Ces::V1beta::Example. - p result -end -# [END ces_v1beta_generated_AgentService_UpdateExample_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_guardrail.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_guardrail.rb deleted file mode 100644 index 04a62fe7cf1e..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_guardrail.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_UpdateGuardrail_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_guardrail call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#update_guardrail. -# -def update_guardrail - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new - - # Call the update_guardrail method. - result = client.update_guardrail request - - # The returned object is of type Google::Cloud::Ces::V1beta::Guardrail. - p result -end -# [END ces_v1beta_generated_AgentService_UpdateGuardrail_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_security_settings.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_security_settings.rb deleted file mode 100644 index b99ab68d151f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_security_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_UpdateSecuritySettings_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_security_settings call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#update_security_settings. -# -def update_security_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new - - # Call the update_security_settings method. - result = client.update_security_settings request - - # The returned object is of type Google::Cloud::Ces::V1beta::SecuritySettings. - p result -end -# [END ces_v1beta_generated_AgentService_UpdateSecuritySettings_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_tool.rb deleted file mode 100644 index b960f006ef94..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_tool.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_UpdateTool_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_tool call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#update_tool. -# -def update_tool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateToolRequest.new - - # Call the update_tool method. - result = client.update_tool request - - # The returned object is of type Google::Cloud::Ces::V1beta::Tool. - p result -end -# [END ces_v1beta_generated_AgentService_UpdateTool_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_toolset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_toolset.rb deleted file mode 100644 index 862470b1da7f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/agent_service/update_toolset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_AgentService_UpdateToolset_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_toolset call in the AgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::AgentService::Client#update_toolset. -# -def update_toolset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::AgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new - - # Call the update_toolset method. - result = client.update_toolset request - - # The returned object is of type Google::Cloud::Ces::V1beta::Toolset. - p result -end -# [END ces_v1beta_generated_AgentService_UpdateToolset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation.rb deleted file mode 100644 index 0461955b21b7..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_CreateEvaluation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_evaluation call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation. -# -def create_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new - - # Call the create_evaluation method. - result = client.create_evaluation request - - # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. - p result -end -# [END ces_v1beta_generated_EvaluationService_CreateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_dataset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_dataset.rb deleted file mode 100644 index 1c7eff873e1f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_CreateEvaluationDataset_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_evaluation_dataset call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_dataset. -# -def create_evaluation_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new - - # Call the create_evaluation_dataset method. - result = client.create_evaluation_dataset request - - # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. - p result -end -# [END ces_v1beta_generated_EvaluationService_CreateEvaluationDataset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_expectation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_expectation.rb deleted file mode 100644 index a2820270778b..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_evaluation_expectation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_CreateEvaluationExpectation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_evaluation_expectation call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_expectation. -# -def create_evaluation_expectation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new - - # Call the create_evaluation_expectation method. - result = client.create_evaluation_expectation request - - # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. - p result -end -# [END ces_v1beta_generated_EvaluationService_CreateEvaluationExpectation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_scheduled_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_scheduled_evaluation_run.rb deleted file mode 100644 index a9ca0c5ecb84..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/create_scheduled_evaluation_run.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_CreateScheduledEvaluationRun_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the create_scheduled_evaluation_run call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#create_scheduled_evaluation_run. -# -def create_scheduled_evaluation_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new - - # Call the create_scheduled_evaluation_run method. - result = client.create_scheduled_evaluation_run request - - # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. - p result -end -# [END ces_v1beta_generated_EvaluationService_CreateScheduledEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation.rb deleted file mode 100644 index 7c342d0fa34c..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_DeleteEvaluation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_evaluation call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation. -# -def delete_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new - - # Call the delete_evaluation method. - result = client.delete_evaluation request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_EvaluationService_DeleteEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_dataset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_dataset.rb deleted file mode 100644 index 1e15d48c7f7f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_DeleteEvaluationDataset_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_evaluation_dataset call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_dataset. -# -def delete_evaluation_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new - - # Call the delete_evaluation_dataset method. - result = client.delete_evaluation_dataset request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_EvaluationService_DeleteEvaluationDataset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_expectation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_expectation.rb deleted file mode 100644 index 4bfc18702dfd..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_expectation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_DeleteEvaluationExpectation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_evaluation_expectation call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_expectation. -# -def delete_evaluation_expectation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new - - # Call the delete_evaluation_expectation method. - result = client.delete_evaluation_expectation request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_EvaluationService_DeleteEvaluationExpectation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_result.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_result.rb deleted file mode 100644 index 5ef7b073137e..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_result.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_DeleteEvaluationResult_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_evaluation_result call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_result. -# -def delete_evaluation_result - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new - - # Call the delete_evaluation_result method. - result = client.delete_evaluation_result request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_EvaluationService_DeleteEvaluationResult_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_run.rb deleted file mode 100644 index 6566b79a0f69..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_evaluation_run.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_DeleteEvaluationRun_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_evaluation_run call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_run. -# -def delete_evaluation_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new - - # Call the delete_evaluation_run method. - result = client.delete_evaluation_run 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 ces_v1beta_generated_EvaluationService_DeleteEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_scheduled_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_scheduled_evaluation_run.rb deleted file mode 100644 index 90c51a6f83bf..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/delete_scheduled_evaluation_run.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_DeleteScheduledEvaluationRun_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the delete_scheduled_evaluation_run call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_scheduled_evaluation_run. -# -def delete_scheduled_evaluation_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new - - # Call the delete_scheduled_evaluation_run method. - result = client.delete_scheduled_evaluation_run request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END ces_v1beta_generated_EvaluationService_DeleteScheduledEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluations.rb deleted file mode 100644 index cceb6a6a01f7..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/export_evaluations.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_ExportEvaluations_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the export_evaluations call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluations. -# -def export_evaluations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new - - # Call the export_evaluations method. - result = client.export_evaluations 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 ces_v1beta_generated_EvaluationService_ExportEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/generate_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/generate_evaluation.rb deleted file mode 100644 index 8ab06ccda610..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/generate_evaluation.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_GenerateEvaluation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the generate_evaluation call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#generate_evaluation. -# -def generate_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new - - # Call the generate_evaluation method. - result = client.generate_evaluation 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 ces_v1beta_generated_EvaluationService_GenerateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation.rb deleted file mode 100644 index 7b5aba264d5d..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_GetEvaluation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_evaluation call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation. -# -def get_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetEvaluationRequest.new - - # Call the get_evaluation method. - result = client.get_evaluation request - - # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. - p result -end -# [END ces_v1beta_generated_EvaluationService_GetEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_dataset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_dataset.rb deleted file mode 100644 index b07e3a27af19..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_GetEvaluationDataset_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_evaluation_dataset call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_dataset. -# -def get_evaluation_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new - - # Call the get_evaluation_dataset method. - result = client.get_evaluation_dataset request - - # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. - p result -end -# [END ces_v1beta_generated_EvaluationService_GetEvaluationDataset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_expectation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_expectation.rb deleted file mode 100644 index 9463c63b85f1..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_expectation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_GetEvaluationExpectation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_evaluation_expectation call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_expectation. -# -def get_evaluation_expectation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new - - # Call the get_evaluation_expectation method. - result = client.get_evaluation_expectation request - - # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. - p result -end -# [END ces_v1beta_generated_EvaluationService_GetEvaluationExpectation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_result.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_result.rb deleted file mode 100644 index c63b54793373..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_result.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_GetEvaluationResult_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_evaluation_result call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_result. -# -def get_evaluation_result - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new - - # Call the get_evaluation_result method. - result = client.get_evaluation_result request - - # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationResult. - p result -end -# [END ces_v1beta_generated_EvaluationService_GetEvaluationResult_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_run.rb deleted file mode 100644 index 6cc271debbda..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_evaluation_run.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_GetEvaluationRun_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_evaluation_run call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_run. -# -def get_evaluation_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new - - # Call the get_evaluation_run method. - result = client.get_evaluation_run request - - # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationRun. - p result -end -# [END ces_v1beta_generated_EvaluationService_GetEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_scheduled_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_scheduled_evaluation_run.rb deleted file mode 100644 index 05ba90712c10..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/get_scheduled_evaluation_run.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_GetScheduledEvaluationRun_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the get_scheduled_evaluation_run call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#get_scheduled_evaluation_run. -# -def get_scheduled_evaluation_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new - - # Call the get_scheduled_evaluation_run method. - result = client.get_scheduled_evaluation_run request - - # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. - p result -end -# [END ces_v1beta_generated_EvaluationService_GetScheduledEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/import_evaluations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/import_evaluations.rb deleted file mode 100644 index 506b99d31a24..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/import_evaluations.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_ImportEvaluations_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the import_evaluations call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations. -# -def import_evaluations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new - - # Call the import_evaluations method. - result = client.import_evaluations 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 ces_v1beta_generated_EvaluationService_ImportEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_datasets.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_datasets.rb deleted file mode 100644 index 445671b8cea2..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_datasets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_ListEvaluationDatasets_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_evaluation_datasets call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets. -# -def list_evaluation_datasets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new - - # Call the list_evaluation_datasets method. - result = client.list_evaluation_datasets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Ces::V1beta::EvaluationDataset. - p item - end -end -# [END ces_v1beta_generated_EvaluationService_ListEvaluationDatasets_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_expectations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_expectations.rb deleted file mode 100644 index 7cfc110e2bc6..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_expectations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_ListEvaluationExpectations_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_evaluation_expectations call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations. -# -def list_evaluation_expectations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new - - # Call the list_evaluation_expectations method. - result = client.list_evaluation_expectations 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::Ces::V1beta::EvaluationExpectation. - p item - end -end -# [END ces_v1beta_generated_EvaluationService_ListEvaluationExpectations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_results.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_results.rb deleted file mode 100644 index 57699677ba6d..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_results.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_ListEvaluationResults_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_evaluation_results call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results. -# -def list_evaluation_results - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new - - # Call the list_evaluation_results method. - result = client.list_evaluation_results 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::Ces::V1beta::EvaluationResult. - p item - end -end -# [END ces_v1beta_generated_EvaluationService_ListEvaluationResults_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_runs.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_runs.rb deleted file mode 100644 index 441f99624f7e..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluation_runs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_ListEvaluationRuns_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_evaluation_runs call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs. -# -def list_evaluation_runs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new - - # Call the list_evaluation_runs method. - result = client.list_evaluation_runs 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::Ces::V1beta::EvaluationRun. - p item - end -end -# [END ces_v1beta_generated_EvaluationService_ListEvaluationRuns_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluations.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluations.rb deleted file mode 100644 index 814694a9c86a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_evaluations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_ListEvaluations_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_evaluations call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations. -# -def list_evaluations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new - - # Call the list_evaluations method. - result = client.list_evaluations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Ces::V1beta::Evaluation. - p item - end -end -# [END ces_v1beta_generated_EvaluationService_ListEvaluations_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_scheduled_evaluation_runs.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_scheduled_evaluation_runs.rb deleted file mode 100644 index beb6ed1c6f3f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/list_scheduled_evaluation_runs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_ListScheduledEvaluationRuns_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the list_scheduled_evaluation_runs call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs. -# -def list_scheduled_evaluation_runs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new - - # Call the list_scheduled_evaluation_runs method. - result = client.list_scheduled_evaluation_runs 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::Ces::V1beta::ScheduledEvaluationRun. - p item - end -end -# [END ces_v1beta_generated_EvaluationService_ListScheduledEvaluationRuns_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation.rb deleted file mode 100644 index e2756ddabd7f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/run_evaluation.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_RunEvaluation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the run_evaluation call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation. -# -def run_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::RunEvaluationRequest.new - - # Call the run_evaluation method. - result = client.run_evaluation 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 ces_v1beta_generated_EvaluationService_RunEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/test_persona_voice.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/test_persona_voice.rb deleted file mode 100644 index 8432d7096735..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/test_persona_voice.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_TestPersonaVoice_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the test_persona_voice call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#test_persona_voice. -# -def test_persona_voice - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new - - # Call the test_persona_voice method. - result = client.test_persona_voice request - - # The returned object is of type Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse. - p result -end -# [END ces_v1beta_generated_EvaluationService_TestPersonaVoice_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation.rb deleted file mode 100644 index eb3b41c5b555..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_UpdateEvaluation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_evaluation call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation. -# -def update_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new - - # Call the update_evaluation method. - result = client.update_evaluation request - - # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation. - p result -end -# [END ces_v1beta_generated_EvaluationService_UpdateEvaluation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_dataset.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_dataset.rb deleted file mode 100644 index f462929ccfac..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_UpdateEvaluationDataset_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_evaluation_dataset call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_dataset. -# -def update_evaluation_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new - - # Call the update_evaluation_dataset method. - result = client.update_evaluation_dataset request - - # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset. - p result -end -# [END ces_v1beta_generated_EvaluationService_UpdateEvaluationDataset_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_expectation.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_expectation.rb deleted file mode 100644 index 083c9c29dbe4..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_evaluation_expectation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_UpdateEvaluationExpectation_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_evaluation_expectation call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_expectation. -# -def update_evaluation_expectation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new - - # Call the update_evaluation_expectation method. - result = client.update_evaluation_expectation request - - # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation. - p result -end -# [END ces_v1beta_generated_EvaluationService_UpdateEvaluationExpectation_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_scheduled_evaluation_run.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_scheduled_evaluation_run.rb deleted file mode 100644 index 39adaa7ad341..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/update_scheduled_evaluation_run.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_UpdateScheduledEvaluationRun_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the update_scheduled_evaluation_run call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#update_scheduled_evaluation_run. -# -def update_scheduled_evaluation_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new - - # Call the update_scheduled_evaluation_run method. - result = client.update_scheduled_evaluation_run request - - # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun. - p result -end -# [END ces_v1beta_generated_EvaluationService_UpdateScheduledEvaluationRun_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/upload_evaluation_audio.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/upload_evaluation_audio.rb deleted file mode 100644 index 28e5868fa6f8..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/evaluation_service/upload_evaluation_audio.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_EvaluationService_UploadEvaluationAudio_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the upload_evaluation_audio call in the EvaluationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::EvaluationService::Client#upload_evaluation_audio. -# -def upload_evaluation_audio - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new - - # Call the upload_evaluation_audio method. - result = client.upload_evaluation_audio request - - # The returned object is of type Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse. - p result -end -# [END ces_v1beta_generated_EvaluationService_UploadEvaluationAudio_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/bidi_run_session.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/bidi_run_session.rb deleted file mode 100644 index 7cf793fd47bb..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/bidi_run_session.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_SessionService_BidiRunSession_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the bidi_run_session call in the SessionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session. -# -def bidi_run_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::SessionService::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the bidi_run_session method to start streaming. - output = client.bidi_run_session input - - # Send requests on the stream. For each request object, set fields by - # passing keyword arguments. Be sure to close the stream when done. - input << Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new - input << Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage - output.each do |current_response| - p current_response - end -end -# [END ces_v1beta_generated_SessionService_BidiRunSession_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/run_session.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/run_session.rb deleted file mode 100644 index 1a8ebbe58157..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/run_session.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_SessionService_RunSession_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the run_session call in the SessionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::SessionService::Client#run_session. -# -def run_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::SessionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::RunSessionRequest.new - - # Call the run_session method. - result = client.run_session request - - # The returned object is of type Google::Cloud::Ces::V1beta::RunSessionResponse. - p result -end -# [END ces_v1beta_generated_SessionService_RunSession_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/stream_run_session.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/stream_run_session.rb deleted file mode 100644 index 71b93e462905..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/session_service/stream_run_session.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_SessionService_StreamRunSession_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the stream_run_session call in the SessionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::SessionService::Client#stream_run_session. -# -def stream_run_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::SessionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::RunSessionRequest.new - - # Call the stream_run_session method to start streaming. - output = client.stream_run_session request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Ces::V1beta::RunSessionResponse - output.each do |current_response| - p current_response - end -end -# [END ces_v1beta_generated_SessionService_StreamRunSession_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json b/owl-bot-staging/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json deleted file mode 100644 index 48aca717e287..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/snippet_metadata_google.cloud.ces.v1beta.json +++ /dev/null @@ -1,3735 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-ces-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.ces.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "ces_v1beta_generated_SessionService_RunSession_sync", - "title": "Snippet for the run_session call in the SessionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::SessionService::Client#run_session.", - "file": "session_service/run_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_session", - "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client#run_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::RunSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::RunSessionResponse", - "client": { - "short_name": "SessionService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client" - }, - "method": { - "short_name": "RunSession", - "full_name": "google.cloud.ces.v1beta.SessionService.RunSession", - "service": { - "short_name": "SessionService", - "full_name": "google.cloud.ces.v1beta.SessionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_SessionService_StreamRunSession_sync", - "title": "Snippet for the stream_run_session call in the SessionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::SessionService::Client#stream_run_session.", - "file": "session_service/stream_run_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "stream_run_session", - "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client#stream_run_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::RunSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::RunSessionResponse", - "client": { - "short_name": "SessionService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client" - }, - "method": { - "short_name": "StreamRunSession", - "full_name": "google.cloud.ces.v1beta.SessionService.StreamRunSession", - "service": { - "short_name": "SessionService", - "full_name": "google.cloud.ces.v1beta.SessionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_SessionService_BidiRunSession_sync", - "title": "Snippet for the bidi_run_session call in the SessionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session.", - "file": "session_service/bidi_run_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "bidi_run_session", - "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client#bidi_run_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::BidiSessionClientMessage", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::BidiSessionServerMessage", - "client": { - "short_name": "SessionService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::SessionService::Client" - }, - "method": { - "short_name": "BidiRunSession", - "full_name": "google.cloud.ces.v1beta.SessionService.BidiRunSession", - "service": { - "short_name": "SessionService", - "full_name": "google.cloud.ces.v1beta.SessionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ListApps_sync", - "title": "Snippet for the list_apps call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_apps.", - "file": "agent_service/list_apps.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_apps", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_apps", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListAppsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListAppsResponse", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ListApps", - "full_name": "google.cloud.ces.v1beta.AgentService.ListApps", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetApp_sync", - "title": "Snippet for the get_app call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_app.", - "file": "agent_service/get_app.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_app", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_app", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetAppRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::App", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetApp", - "full_name": "google.cloud.ces.v1beta.AgentService.GetApp", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_CreateApp_sync", - "title": "Snippet for the create_app call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_app.", - "file": "agent_service/create_app.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_app", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_app", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateAppRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "CreateApp", - "full_name": "google.cloud.ces.v1beta.AgentService.CreateApp", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_UpdateApp_sync", - "title": "Snippet for the update_app call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_app.", - "file": "agent_service/update_app.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_app", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_app", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateAppRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::App", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "UpdateApp", - "full_name": "google.cloud.ces.v1beta.AgentService.UpdateApp", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_DeleteApp_sync", - "title": "Snippet for the delete_app call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_app.", - "file": "agent_service/delete_app.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_app", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_app", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteAppRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "DeleteApp", - "full_name": "google.cloud.ces.v1beta.AgentService.DeleteApp", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ExportApp_sync", - "title": "Snippet for the export_app call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#export_app.", - "file": "agent_service/export_app.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_app", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#export_app", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ExportAppRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ExportApp", - "full_name": "google.cloud.ces.v1beta.AgentService.ExportApp", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ImportApp_sync", - "title": "Snippet for the import_app call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#import_app.", - "file": "agent_service/import_app.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_app", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#import_app", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ImportAppRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ImportApp", - "full_name": "google.cloud.ces.v1beta.AgentService.ImportApp", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetSecuritySettings_sync", - "title": "Snippet for the get_security_settings call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_security_settings.", - "file": "agent_service/get_security_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_security_settings", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_security_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::SecuritySettings", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetSecuritySettings", - "full_name": "google.cloud.ces.v1beta.AgentService.GetSecuritySettings", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_UpdateSecuritySettings_sync", - "title": "Snippet for the update_security_settings call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_security_settings.", - "file": "agent_service/update_security_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_security_settings", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_security_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::SecuritySettings", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "UpdateSecuritySettings", - "full_name": "google.cloud.ces.v1beta.AgentService.UpdateSecuritySettings", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ListAgents_sync", - "title": "Snippet for the list_agents call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_agents.", - "file": "agent_service/list_agents.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_agents", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_agents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListAgentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListAgentsResponse", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ListAgents", - "full_name": "google.cloud.ces.v1beta.AgentService.ListAgents", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetAgent_sync", - "title": "Snippet for the get_agent call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_agent.", - "file": "agent_service/get_agent.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_agent", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_agent", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetAgentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Agent", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetAgent", - "full_name": "google.cloud.ces.v1beta.AgentService.GetAgent", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_CreateAgent_sync", - "title": "Snippet for the create_agent call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_agent.", - "file": "agent_service/create_agent.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_agent", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_agent", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateAgentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Agent", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "CreateAgent", - "full_name": "google.cloud.ces.v1beta.AgentService.CreateAgent", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_UpdateAgent_sync", - "title": "Snippet for the update_agent call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_agent.", - "file": "agent_service/update_agent.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_agent", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_agent", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateAgentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Agent", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "UpdateAgent", - "full_name": "google.cloud.ces.v1beta.AgentService.UpdateAgent", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_DeleteAgent_sync", - "title": "Snippet for the delete_agent call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_agent.", - "file": "agent_service/delete_agent.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_agent", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_agent", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteAgentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "DeleteAgent", - "full_name": "google.cloud.ces.v1beta.AgentService.DeleteAgent", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ListExamples_sync", - "title": "Snippet for the list_examples call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_examples.", - "file": "agent_service/list_examples.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_examples", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_examples", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListExamplesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListExamplesResponse", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ListExamples", - "full_name": "google.cloud.ces.v1beta.AgentService.ListExamples", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetExample_sync", - "title": "Snippet for the get_example call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_example.", - "file": "agent_service/get_example.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_example", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_example", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetExampleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Example", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetExample", - "full_name": "google.cloud.ces.v1beta.AgentService.GetExample", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_CreateExample_sync", - "title": "Snippet for the create_example call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_example.", - "file": "agent_service/create_example.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_example", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_example", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateExampleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Example", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "CreateExample", - "full_name": "google.cloud.ces.v1beta.AgentService.CreateExample", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_UpdateExample_sync", - "title": "Snippet for the update_example call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_example.", - "file": "agent_service/update_example.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_example", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_example", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateExampleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Example", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "UpdateExample", - "full_name": "google.cloud.ces.v1beta.AgentService.UpdateExample", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_DeleteExample_sync", - "title": "Snippet for the delete_example call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_example.", - "file": "agent_service/delete_example.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_example", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_example", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteExampleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "DeleteExample", - "full_name": "google.cloud.ces.v1beta.AgentService.DeleteExample", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ListTools_sync", - "title": "Snippet for the list_tools call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_tools.", - "file": "agent_service/list_tools.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tools", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_tools", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListToolsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListToolsResponse", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ListTools", - "full_name": "google.cloud.ces.v1beta.AgentService.ListTools", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetTool_sync", - "title": "Snippet for the get_tool call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_tool.", - "file": "agent_service/get_tool.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tool", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_tool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetToolRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Tool", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetTool", - "full_name": "google.cloud.ces.v1beta.AgentService.GetTool", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ListConversations_sync", - "title": "Snippet for the list_conversations call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations.", - "file": "agent_service/list_conversations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_conversations", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_conversations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListConversationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListConversationsResponse", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ListConversations", - "full_name": "google.cloud.ces.v1beta.AgentService.ListConversations", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetConversation_sync", - "title": "Snippet for the get_conversation call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_conversation.", - "file": "agent_service/get_conversation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_conversation", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_conversation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetConversationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Conversation", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetConversation", - "full_name": "google.cloud.ces.v1beta.AgentService.GetConversation", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_DeleteConversation_sync", - "title": "Snippet for the delete_conversation call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_conversation.", - "file": "agent_service/delete_conversation.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_conversation", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_conversation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteConversationRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "DeleteConversation", - "full_name": "google.cloud.ces.v1beta.AgentService.DeleteConversation", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_BatchDeleteConversations_sync", - "title": "Snippet for the batch_delete_conversations call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#batch_delete_conversations.", - "file": "agent_service/batch_delete_conversations.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_delete_conversations", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#batch_delete_conversations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "BatchDeleteConversations", - "full_name": "google.cloud.ces.v1beta.AgentService.BatchDeleteConversations", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_CreateTool_sync", - "title": "Snippet for the create_tool call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_tool.", - "file": "agent_service/create_tool.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_tool", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_tool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateToolRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Tool", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "CreateTool", - "full_name": "google.cloud.ces.v1beta.AgentService.CreateTool", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_UpdateTool_sync", - "title": "Snippet for the update_tool call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_tool.", - "file": "agent_service/update_tool.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_tool", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_tool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateToolRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Tool", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "UpdateTool", - "full_name": "google.cloud.ces.v1beta.AgentService.UpdateTool", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_DeleteTool_sync", - "title": "Snippet for the delete_tool call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_tool.", - "file": "agent_service/delete_tool.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_tool", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_tool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteToolRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "DeleteTool", - "full_name": "google.cloud.ces.v1beta.AgentService.DeleteTool", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ListGuardrails_sync", - "title": "Snippet for the list_guardrails call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails.", - "file": "agent_service/list_guardrails.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_guardrails", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_guardrails", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListGuardrailsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListGuardrailsResponse", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ListGuardrails", - "full_name": "google.cloud.ces.v1beta.AgentService.ListGuardrails", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetGuardrail_sync", - "title": "Snippet for the get_guardrail call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_guardrail.", - "file": "agent_service/get_guardrail.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_guardrail", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_guardrail", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetGuardrailRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Guardrail", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetGuardrail", - "full_name": "google.cloud.ces.v1beta.AgentService.GetGuardrail", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_CreateGuardrail_sync", - "title": "Snippet for the create_guardrail call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_guardrail.", - "file": "agent_service/create_guardrail.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_guardrail", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_guardrail", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateGuardrailRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Guardrail", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "CreateGuardrail", - "full_name": "google.cloud.ces.v1beta.AgentService.CreateGuardrail", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_UpdateGuardrail_sync", - "title": "Snippet for the update_guardrail call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_guardrail.", - "file": "agent_service/update_guardrail.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_guardrail", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_guardrail", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Guardrail", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "UpdateGuardrail", - "full_name": "google.cloud.ces.v1beta.AgentService.UpdateGuardrail", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_DeleteGuardrail_sync", - "title": "Snippet for the delete_guardrail call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_guardrail.", - "file": "agent_service/delete_guardrail.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_guardrail", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_guardrail", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "DeleteGuardrail", - "full_name": "google.cloud.ces.v1beta.AgentService.DeleteGuardrail", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ListDeployments_sync", - "title": "Snippet for the list_deployments call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_deployments.", - "file": "agent_service/list_deployments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_deployments", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_deployments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListDeploymentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListDeploymentsResponse", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ListDeployments", - "full_name": "google.cloud.ces.v1beta.AgentService.ListDeployments", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetDeployment_sync", - "title": "Snippet for the get_deployment call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_deployment.", - "file": "agent_service/get_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_deployment", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Deployment", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetDeployment", - "full_name": "google.cloud.ces.v1beta.AgentService.GetDeployment", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_CreateDeployment_sync", - "title": "Snippet for the create_deployment call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_deployment.", - "file": "agent_service/create_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_deployment", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Deployment", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "CreateDeployment", - "full_name": "google.cloud.ces.v1beta.AgentService.CreateDeployment", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_UpdateDeployment_sync", - "title": "Snippet for the update_deployment call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_deployment.", - "file": "agent_service/update_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_deployment", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Deployment", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "UpdateDeployment", - "full_name": "google.cloud.ces.v1beta.AgentService.UpdateDeployment", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_DeleteDeployment_sync", - "title": "Snippet for the delete_deployment call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_deployment.", - "file": "agent_service/delete_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_deployment", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "DeleteDeployment", - "full_name": "google.cloud.ces.v1beta.AgentService.DeleteDeployment", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ListToolsets_sync", - "title": "Snippet for the list_toolsets call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets.", - "file": "agent_service/list_toolsets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_toolsets", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_toolsets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListToolsetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListToolsetsResponse", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ListToolsets", - "full_name": "google.cloud.ces.v1beta.AgentService.ListToolsets", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetToolset_sync", - "title": "Snippet for the get_toolset call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_toolset.", - "file": "agent_service/get_toolset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_toolset", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_toolset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetToolsetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Toolset", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetToolset", - "full_name": "google.cloud.ces.v1beta.AgentService.GetToolset", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_CreateToolset_sync", - "title": "Snippet for the create_toolset call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_toolset.", - "file": "agent_service/create_toolset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_toolset", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_toolset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateToolsetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Toolset", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "CreateToolset", - "full_name": "google.cloud.ces.v1beta.AgentService.CreateToolset", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_UpdateToolset_sync", - "title": "Snippet for the update_toolset call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#update_toolset.", - "file": "agent_service/update_toolset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_toolset", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#update_toolset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateToolsetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Toolset", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "UpdateToolset", - "full_name": "google.cloud.ces.v1beta.AgentService.UpdateToolset", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_DeleteToolset_sync", - "title": "Snippet for the delete_toolset call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_toolset.", - "file": "agent_service/delete_toolset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_toolset", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_toolset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteToolsetRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "DeleteToolset", - "full_name": "google.cloud.ces.v1beta.AgentService.DeleteToolset", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ListAppVersions_sync", - "title": "Snippet for the list_app_versions call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions.", - "file": "agent_service/list_app_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_app_versions", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_app_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListAppVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListAppVersionsResponse", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ListAppVersions", - "full_name": "google.cloud.ces.v1beta.AgentService.ListAppVersions", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetAppVersion_sync", - "title": "Snippet for the get_app_version call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_app_version.", - "file": "agent_service/get_app_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_app_version", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_app_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetAppVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::AppVersion", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetAppVersion", - "full_name": "google.cloud.ces.v1beta.AgentService.GetAppVersion", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_CreateAppVersion_sync", - "title": "Snippet for the create_app_version call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#create_app_version.", - "file": "agent_service/create_app_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_app_version", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#create_app_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateAppVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::AppVersion", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "CreateAppVersion", - "full_name": "google.cloud.ces.v1beta.AgentService.CreateAppVersion", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_DeleteAppVersion_sync", - "title": "Snippet for the delete_app_version call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#delete_app_version.", - "file": "agent_service/delete_app_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_app_version", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#delete_app_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "DeleteAppVersion", - "full_name": "google.cloud.ces.v1beta.AgentService.DeleteAppVersion", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_RestoreAppVersion_sync", - "title": "Snippet for the restore_app_version call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#restore_app_version.", - "file": "agent_service/restore_app_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "restore_app_version", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#restore_app_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "RestoreAppVersion", - "full_name": "google.cloud.ces.v1beta.AgentService.RestoreAppVersion", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GenerateAppResource_sync", - "title": "Snippet for the generate_app_resource call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource.", - "file": "agent_service/generate_app_resource.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_app_resource", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#generate_app_resource", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GenerateAppResource", - "full_name": "google.cloud.ces.v1beta.AgentService.GenerateAppResource", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_ListChangelogs_sync", - "title": "Snippet for the list_changelogs call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs.", - "file": "agent_service/list_changelogs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_changelogs", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#list_changelogs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListChangelogsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListChangelogsResponse", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "ListChangelogs", - "full_name": "google.cloud.ces.v1beta.AgentService.ListChangelogs", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_AgentService_GetChangelog_sync", - "title": "Snippet for the get_changelog call in the AgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::AgentService::Client#get_changelog.", - "file": "agent_service/get_changelog.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_changelog", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client#get_changelog", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetChangelogRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Changelog", - "client": { - "short_name": "AgentService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::AgentService::Client" - }, - "method": { - "short_name": "GetChangelog", - "full_name": "google.cloud.ces.v1beta.AgentService.GetChangelog", - "service": { - "short_name": "AgentService", - "full_name": "google.cloud.ces.v1beta.AgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_RunEvaluation_sync", - "title": "Snippet for the run_evaluation call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation.", - "file": "evaluation_service/run_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_evaluation", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::RunEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "RunEvaluation", - "full_name": "google.cloud.ces.v1beta.EvaluationService.RunEvaluation", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_UploadEvaluationAudio_sync", - "title": "Snippet for the upload_evaluation_audio call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#upload_evaluation_audio.", - "file": "evaluation_service/upload_evaluation_audio.rb", - "language": "RUBY", - "client_method": { - "short_name": "upload_evaluation_audio", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#upload_evaluation_audio", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "UploadEvaluationAudio", - "full_name": "google.cloud.ces.v1beta.EvaluationService.UploadEvaluationAudio", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_CreateEvaluation_sync", - "title": "Snippet for the create_evaluation call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation.", - "file": "evaluation_service/create_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_evaluation", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Evaluation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "CreateEvaluation", - "full_name": "google.cloud.ces.v1beta.EvaluationService.CreateEvaluation", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_GenerateEvaluation_sync", - "title": "Snippet for the generate_evaluation call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#generate_evaluation.", - "file": "evaluation_service/generate_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_evaluation", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#generate_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "GenerateEvaluation", - "full_name": "google.cloud.ces.v1beta.EvaluationService.GenerateEvaluation", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_ImportEvaluations_sync", - "title": "Snippet for the import_evaluations call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations.", - "file": "evaluation_service/import_evaluations.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_evaluations", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#import_evaluations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "ImportEvaluations", - "full_name": "google.cloud.ces.v1beta.EvaluationService.ImportEvaluations", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_CreateEvaluationDataset_sync", - "title": "Snippet for the create_evaluation_dataset call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_dataset.", - "file": "evaluation_service/create_evaluation_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_evaluation_dataset", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::EvaluationDataset", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "CreateEvaluationDataset", - "full_name": "google.cloud.ces.v1beta.EvaluationService.CreateEvaluationDataset", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_UpdateEvaluation_sync", - "title": "Snippet for the update_evaluation call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation.", - "file": "evaluation_service/update_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_evaluation", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Evaluation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "UpdateEvaluation", - "full_name": "google.cloud.ces.v1beta.EvaluationService.UpdateEvaluation", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_UpdateEvaluationDataset_sync", - "title": "Snippet for the update_evaluation_dataset call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_dataset.", - "file": "evaluation_service/update_evaluation_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_evaluation_dataset", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::EvaluationDataset", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "UpdateEvaluationDataset", - "full_name": "google.cloud.ces.v1beta.EvaluationService.UpdateEvaluationDataset", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_DeleteEvaluation_sync", - "title": "Snippet for the delete_evaluation call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation.", - "file": "evaluation_service/delete_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_evaluation", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "DeleteEvaluation", - "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteEvaluation", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_DeleteEvaluationResult_sync", - "title": "Snippet for the delete_evaluation_result call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_result.", - "file": "evaluation_service/delete_evaluation_result.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_evaluation_result", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_result", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "DeleteEvaluationResult", - "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationResult", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_DeleteEvaluationDataset_sync", - "title": "Snippet for the delete_evaluation_dataset call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_dataset.", - "file": "evaluation_service/delete_evaluation_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_evaluation_dataset", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "DeleteEvaluationDataset", - "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationDataset", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_DeleteEvaluationRun_sync", - "title": "Snippet for the delete_evaluation_run call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_run.", - "file": "evaluation_service/delete_evaluation_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_evaluation_run", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "DeleteEvaluationRun", - "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationRun", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_GetEvaluation_sync", - "title": "Snippet for the get_evaluation call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation.", - "file": "evaluation_service/get_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_evaluation", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::Evaluation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "GetEvaluation", - "full_name": "google.cloud.ces.v1beta.EvaluationService.GetEvaluation", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_GetEvaluationResult_sync", - "title": "Snippet for the get_evaluation_result call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_result.", - "file": "evaluation_service/get_evaluation_result.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_evaluation_result", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_result", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::EvaluationResult", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "GetEvaluationResult", - "full_name": "google.cloud.ces.v1beta.EvaluationService.GetEvaluationResult", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_GetEvaluationDataset_sync", - "title": "Snippet for the get_evaluation_dataset call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_dataset.", - "file": "evaluation_service/get_evaluation_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_evaluation_dataset", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::EvaluationDataset", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "GetEvaluationDataset", - "full_name": "google.cloud.ces.v1beta.EvaluationService.GetEvaluationDataset", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_GetEvaluationRun_sync", - "title": "Snippet for the get_evaluation_run call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_run.", - "file": "evaluation_service/get_evaluation_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_evaluation_run", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::EvaluationRun", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "GetEvaluationRun", - "full_name": "google.cloud.ces.v1beta.EvaluationService.GetEvaluationRun", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_ListEvaluations_sync", - "title": "Snippet for the list_evaluations call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations.", - "file": "evaluation_service/list_evaluations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_evaluations", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListEvaluationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListEvaluationsResponse", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "ListEvaluations", - "full_name": "google.cloud.ces.v1beta.EvaluationService.ListEvaluations", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_ListEvaluationResults_sync", - "title": "Snippet for the list_evaluation_results call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results.", - "file": "evaluation_service/list_evaluation_results.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_evaluation_results", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_results", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "ListEvaluationResults", - "full_name": "google.cloud.ces.v1beta.EvaluationService.ListEvaluationResults", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_ListEvaluationDatasets_sync", - "title": "Snippet for the list_evaluation_datasets call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets.", - "file": "evaluation_service/list_evaluation_datasets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_evaluation_datasets", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_datasets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "ListEvaluationDatasets", - "full_name": "google.cloud.ces.v1beta.EvaluationService.ListEvaluationDatasets", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_ListEvaluationRuns_sync", - "title": "Snippet for the list_evaluation_runs call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs.", - "file": "evaluation_service/list_evaluation_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_evaluation_runs", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "ListEvaluationRuns", - "full_name": "google.cloud.ces.v1beta.EvaluationService.ListEvaluationRuns", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_ListEvaluationExpectations_sync", - "title": "Snippet for the list_evaluation_expectations call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations.", - "file": "evaluation_service/list_evaluation_expectations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_evaluation_expectations", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_evaluation_expectations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "ListEvaluationExpectations", - "full_name": "google.cloud.ces.v1beta.EvaluationService.ListEvaluationExpectations", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_GetEvaluationExpectation_sync", - "title": "Snippet for the get_evaluation_expectation call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_expectation.", - "file": "evaluation_service/get_evaluation_expectation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_evaluation_expectation", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_evaluation_expectation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::EvaluationExpectation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "GetEvaluationExpectation", - "full_name": "google.cloud.ces.v1beta.EvaluationService.GetEvaluationExpectation", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_CreateEvaluationExpectation_sync", - "title": "Snippet for the create_evaluation_expectation call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_expectation.", - "file": "evaluation_service/create_evaluation_expectation.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_evaluation_expectation", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_evaluation_expectation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::EvaluationExpectation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "CreateEvaluationExpectation", - "full_name": "google.cloud.ces.v1beta.EvaluationService.CreateEvaluationExpectation", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_UpdateEvaluationExpectation_sync", - "title": "Snippet for the update_evaluation_expectation call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_expectation.", - "file": "evaluation_service/update_evaluation_expectation.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_evaluation_expectation", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_evaluation_expectation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::EvaluationExpectation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "UpdateEvaluationExpectation", - "full_name": "google.cloud.ces.v1beta.EvaluationService.UpdateEvaluationExpectation", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_DeleteEvaluationExpectation_sync", - "title": "Snippet for the delete_evaluation_expectation call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_expectation.", - "file": "evaluation_service/delete_evaluation_expectation.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_evaluation_expectation", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_evaluation_expectation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "DeleteEvaluationExpectation", - "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationExpectation", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_CreateScheduledEvaluationRun_sync", - "title": "Snippet for the create_scheduled_evaluation_run call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#create_scheduled_evaluation_run.", - "file": "evaluation_service/create_scheduled_evaluation_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_scheduled_evaluation_run", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#create_scheduled_evaluation_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "CreateScheduledEvaluationRun", - "full_name": "google.cloud.ces.v1beta.EvaluationService.CreateScheduledEvaluationRun", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_GetScheduledEvaluationRun_sync", - "title": "Snippet for the get_scheduled_evaluation_run call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#get_scheduled_evaluation_run.", - "file": "evaluation_service/get_scheduled_evaluation_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_scheduled_evaluation_run", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#get_scheduled_evaluation_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "GetScheduledEvaluationRun", - "full_name": "google.cloud.ces.v1beta.EvaluationService.GetScheduledEvaluationRun", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_ListScheduledEvaluationRuns_sync", - "title": "Snippet for the list_scheduled_evaluation_runs call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs.", - "file": "evaluation_service/list_scheduled_evaluation_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_scheduled_evaluation_runs", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#list_scheduled_evaluation_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "ListScheduledEvaluationRuns", - "full_name": "google.cloud.ces.v1beta.EvaluationService.ListScheduledEvaluationRuns", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_UpdateScheduledEvaluationRun_sync", - "title": "Snippet for the update_scheduled_evaluation_run call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#update_scheduled_evaluation_run.", - "file": "evaluation_service/update_scheduled_evaluation_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_scheduled_evaluation_run", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#update_scheduled_evaluation_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "UpdateScheduledEvaluationRun", - "full_name": "google.cloud.ces.v1beta.EvaluationService.UpdateScheduledEvaluationRun", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_DeleteScheduledEvaluationRun_sync", - "title": "Snippet for the delete_scheduled_evaluation_run call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_scheduled_evaluation_run.", - "file": "evaluation_service/delete_scheduled_evaluation_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_scheduled_evaluation_run", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#delete_scheduled_evaluation_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "DeleteScheduledEvaluationRun", - "full_name": "google.cloud.ces.v1beta.EvaluationService.DeleteScheduledEvaluationRun", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_TestPersonaVoice_sync", - "title": "Snippet for the test_persona_voice call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#test_persona_voice.", - "file": "evaluation_service/test_persona_voice.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_persona_voice", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#test_persona_voice", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "TestPersonaVoice", - "full_name": "google.cloud.ces.v1beta.EvaluationService.TestPersonaVoice", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_ExportEvaluations_sync", - "title": "Snippet for the export_evaluations call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluations.", - "file": "evaluation_service/export_evaluations.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_evaluations", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "ExportEvaluations", - "full_name": "google.cloud.ces.v1beta.EvaluationService.ExportEvaluations", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_ExportEvaluationRuns_sync", - "title": "Snippet for the export_evaluation_runs call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs.", - "file": "evaluation_service/export_evaluation_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_evaluation_runs", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "ExportEvaluationRuns", - "full_name": "google.cloud.ces.v1beta.EvaluationService.ExportEvaluationRuns", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_ExportEvaluationResults_sync", - "title": "Snippet for the export_evaluation_results call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results.", - "file": "evaluation_service/export_evaluation_results.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_evaluation_results", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#export_evaluation_results", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "ExportEvaluationResults", - "full_name": "google.cloud.ces.v1beta.EvaluationService.ExportEvaluationResults", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_EvaluationService_RunEvaluationResultMetrics_sync", - "title": "Snippet for the run_evaluation_result_metrics call in the EvaluationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics.", - "file": "evaluation_service/run_evaluation_result_metrics.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_evaluation_result_metrics", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client#run_evaluation_result_metrics", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "EvaluationService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::EvaluationService::Client" - }, - "method": { - "short_name": "RunEvaluationResultMetrics", - "full_name": "google.cloud.ces.v1beta.EvaluationService.RunEvaluationResultMetrics", - "service": { - "short_name": "EvaluationService", - "full_name": "google.cloud.ces.v1beta.EvaluationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_ToolService_ExecuteTool_sync", - "title": "Snippet for the execute_tool call in the ToolService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::ToolService::Client#execute_tool.", - "file": "tool_service/execute_tool.rb", - "language": "RUBY", - "client_method": { - "short_name": "execute_tool", - "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client#execute_tool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::ExecuteToolRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::ExecuteToolResponse", - "client": { - "short_name": "ToolService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client" - }, - "method": { - "short_name": "ExecuteTool", - "full_name": "google.cloud.ces.v1beta.ToolService.ExecuteTool", - "service": { - "short_name": "ToolService", - "full_name": "google.cloud.ces.v1beta.ToolService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_ToolService_RetrieveToolSchema_sync", - "title": "Snippet for the retrieve_tool_schema call in the ToolService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tool_schema.", - "file": "tool_service/retrieve_tool_schema.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_tool_schema", - "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tool_schema", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse", - "client": { - "short_name": "ToolService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client" - }, - "method": { - "short_name": "RetrieveToolSchema", - "full_name": "google.cloud.ces.v1beta.ToolService.RetrieveToolSchema", - "service": { - "short_name": "ToolService", - "full_name": "google.cloud.ces.v1beta.ToolService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_ToolService_RetrieveTools_sync", - "title": "Snippet for the retrieve_tools call in the ToolService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tools.", - "file": "tool_service/retrieve_tools.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_tools", - "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tools", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::RetrieveToolsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::RetrieveToolsResponse", - "client": { - "short_name": "ToolService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::ToolService::Client" - }, - "method": { - "short_name": "RetrieveTools", - "full_name": "google.cloud.ces.v1beta.ToolService.RetrieveTools", - "service": { - "short_name": "ToolService", - "full_name": "google.cloud.ces.v1beta.ToolService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "ces_v1beta_generated_WidgetService_GenerateChatToken_sync", - "title": "Snippet for the generate_chat_token call in the WidgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Ces::V1beta::WidgetService::Client#generate_chat_token.", - "file": "widget_service/generate_chat_token.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_chat_token", - "full_name": "::Google::Cloud::Ces::V1beta::WidgetService::Client#generate_chat_token", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse", - "client": { - "short_name": "WidgetService::Client", - "full_name": "::Google::Cloud::Ces::V1beta::WidgetService::Client" - }, - "method": { - "short_name": "GenerateChatToken", - "full_name": "google.cloud.ces.v1beta.WidgetService.GenerateChatToken", - "service": { - "short_name": "WidgetService", - "full_name": "google.cloud.ces.v1beta.WidgetService" - } - } - }, - "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-ces-v1beta/snippets/tool_service/execute_tool.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/execute_tool.rb deleted file mode 100644 index 6703b432d710..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/execute_tool.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_ToolService_ExecuteTool_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the execute_tool call in the ToolService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::ToolService::Client#execute_tool. -# -def execute_tool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::ToolService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::ExecuteToolRequest.new - - # Call the execute_tool method. - result = client.execute_tool request - - # The returned object is of type Google::Cloud::Ces::V1beta::ExecuteToolResponse. - p result -end -# [END ces_v1beta_generated_ToolService_ExecuteTool_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tool_schema.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tool_schema.rb deleted file mode 100644 index 6ddf67b348a9..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tool_schema.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_ToolService_RetrieveToolSchema_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the retrieve_tool_schema call in the ToolService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tool_schema. -# -def retrieve_tool_schema - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::ToolService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new - - # Call the retrieve_tool_schema method. - result = client.retrieve_tool_schema request - - # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse. - p result -end -# [END ces_v1beta_generated_ToolService_RetrieveToolSchema_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tools.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tools.rb deleted file mode 100644 index a6778d617a30..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/tool_service/retrieve_tools.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_ToolService_RetrieveTools_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the retrieve_tools call in the ToolService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::ToolService::Client#retrieve_tools. -# -def retrieve_tools - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::ToolService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new - - # Call the retrieve_tools method. - result = client.retrieve_tools request - - # The returned object is of type Google::Cloud::Ces::V1beta::RetrieveToolsResponse. - p result -end -# [END ces_v1beta_generated_ToolService_RetrieveTools_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/snippets/widget_service/generate_chat_token.rb b/owl-bot-staging/google-cloud-ces-v1beta/snippets/widget_service/generate_chat_token.rb deleted file mode 100644 index 467330d2c2bf..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/snippets/widget_service/generate_chat_token.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START ces_v1beta_generated_WidgetService_GenerateChatToken_sync] -require "google/cloud/ces/v1beta" - -## -# Snippet for the generate_chat_token call in the WidgetService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Ces::V1beta::WidgetService::Client#generate_chat_token. -# -def generate_chat_token - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Ces::V1beta::WidgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new - - # Call the generate_chat_token method. - result = client.generate_chat_token request - - # The returned object is of type Google::Cloud::Ces::V1beta::GenerateChatTokenResponse. - p result -end -# [END ces_v1beta_generated_WidgetService_GenerateChatToken_sync] diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_operations_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_operations_test.rb deleted file mode 100644 index 9592fc1ca1ae..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/ces/v1beta/agent_service_pb" -require "google/cloud/ces/v1beta/agent_service_services_pb" -require "google/cloud/ces/v1beta/agent_service" - -class ::Google::Cloud::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_paths_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_paths_test.rb deleted file mode 100644 index cf90cd39220f..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_paths_test.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/agent_service" - -class ::Google::Cloud::Ces::V1beta::AgentService::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_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::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.agent_path project: "value0", location: "value1", app: "value2", agent: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/agents/value3", path - end - end - - def test_app_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_path project: "value0", location: "value1", app: "value2" - assert_equal "projects/value0/locations/value1/apps/value2", path - end - end - - def test_app_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_version_path project: "value0", location: "value1", app: "value2", version: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/versions/value3", path - end - end - - def test_changelog_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.changelog_path project: "value0", location: "value1", app: "value2", changelog: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/changelogs/value3", path - 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::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.conversation_path project: "value0", location: "value1", app: "value2", conversation: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/conversations/value3", path - end - end - - def test_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", location: "value1", dataset: "value2" - assert_equal "projects/value0/locations/value1/datasets/value2", path - end - end - - def test_deidentify_template_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.deidentify_template_path organization: "value0", location: "value1", deidentify_template: "value2" - assert_equal "organizations/value0/locations/value1/deidentifyTemplates/value2", path - - path = client.deidentify_template_path project: "value0", location: "value1", deidentify_template: "value2" - assert_equal "projects/value0/locations/value1/deidentifyTemplates/value2", path - end - end - - def test_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.deployment_path project: "value0", location: "value1", app: "value2", deployment: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/deployments/value3", path - end - end - - def test_dialogflow_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::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dialogflow_agent_path project: "value0", location: "value1", agent: "value2" - assert_equal "projects/value0/locations/value1/agents/value2", path - end - end - - def test_engine_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.engine_path project: "value0", location: "value1", collection: "value2", engine: "value3" - assert_equal "projects/value0/locations/value1/collections/value2/engines/value3", path - end - end - - def test_evaluation_run_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.evaluation_run_path project: "value0", location: "value1", app: "value2", evaluation_run: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/evaluationRuns/value3", path - end - end - - def test_example_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.example_path project: "value0", location: "value1", app: "value2", example: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/examples/value3", path - end - end - - def test_guardrail_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.guardrail_path project: "value0", location: "value1", app: "value2", guardrail: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/guardrails/value3", path - end - end - - def test_inspect_template_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.inspect_template_path organization: "value0", location: "value1", inspect_template: "value2" - assert_equal "organizations/value0/locations/value1/inspectTemplates/value2", path - - path = client.inspect_template_path project: "value0", location: "value1", inspect_template: "value2" - assert_equal "projects/value0/locations/value1/inspectTemplates/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::Ces::V1beta::AgentService::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_secret_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" - assert_equal "projects/value0/secrets/value1/versions/value2", path - end - end - - def test_security_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_settings_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1/securitySettings", path - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" - assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path - end - end - - def test_tool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tool_path project: "value0", location: "value1", app: "value2", tool: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/tools/value3", path - end - end - - def test_toolset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.toolset_path project: "value0", location: "value1", app: "value2", toolset: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/toolsets/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_rest_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_rest_test.rb deleted file mode 100644 index 270907c2d238..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_rest_test.rb +++ /dev/null @@ -1,2948 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/agent_service_pb" -require "google/cloud/ces/v1beta/agent_service/rest" - - -class ::Google::Cloud::Ces::V1beta::AgentService::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_apps - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListAppsResponse.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" - - list_apps_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_apps_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_apps_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_apps({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_apps parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_apps ::Google::Cloud::Ces::V1beta::ListAppsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_apps({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_apps(::Google::Cloud::Ces::V1beta::ListAppsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_apps_client_stub.call_count - end - end - end - - def test_get_app - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::App.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_app_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_app({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_app name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_app ::Google::Cloud::Ces::V1beta::GetAppRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_app({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_app(::Google::Cloud::Ces::V1beta::GetAppRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_app_client_stub.call_count - end - end - end - - def test_create_app - # 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" - app_id = "hello world" - app = {} - - create_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_app_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_app({ parent: parent, app_id: app_id, app: app }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_app parent: parent, app_id: app_id, app: app do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_app ::Google::Cloud::Ces::V1beta::CreateAppRequest.new(parent: parent, app_id: app_id, app: app) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_app({ parent: parent, app_id: app_id, app: app }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_app(::Google::Cloud::Ces::V1beta::CreateAppRequest.new(parent: parent, app_id: app_id, app: app), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_app_client_stub.call_count - end - end - end - - def test_update_app - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::App.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - app = {} - update_mask = {} - - update_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_app_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_app({ app: app, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_app app: app, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_app ::Google::Cloud::Ces::V1beta::UpdateAppRequest.new(app: app, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_app({ app: app, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_app(::Google::Cloud::Ces::V1beta::UpdateAppRequest.new(app: app, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_app_client_stub.call_count - end - end - end - - def test_delete_app - # 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" - etag = "hello world" - - delete_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_app_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_app({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_app name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_app ::Google::Cloud::Ces::V1beta::DeleteAppRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_app({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_app(::Google::Cloud::Ces::V1beta::DeleteAppRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_app_client_stub.call_count - end - end - end - - def test_export_app - # 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" - export_format = :EXPORT_FORMAT_UNSPECIFIED - gcs_uri = "hello world" - app_version = "hello world" - - export_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_export_app_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_app({ name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_app name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_app ::Google::Cloud::Ces::V1beta::ExportAppRequest.new(name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_app({ name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_app(::Google::Cloud::Ces::V1beta::ExportAppRequest.new(name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_app_client_stub.call_count - end - end - end - - def test_import_app - # 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. - gcs_uri = "hello world" - parent = "hello world" - display_name = "hello world" - app_id = "hello world" - import_options = {} - ignore_app_lock = true - - import_app_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_import_app_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_app({ gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_app gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_app ::Google::Cloud::Ces::V1beta::ImportAppRequest.new(gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_app({ gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_app(::Google::Cloud::Ces::V1beta::ImportAppRequest.new(gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_app_client_stub.call_count - end - end - end - - def test_get_security_settings - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::SecuritySettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_security_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_security_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_security_settings_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_security_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_security_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_security_settings ::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_security_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_security_settings(::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_security_settings_client_stub.call_count - end - end - end - - def test_update_security_settings - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::SecuritySettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - security_settings = {} - update_mask = {} - - update_security_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_security_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_security_settings_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_security_settings({ security_settings: security_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_security_settings security_settings: security_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_security_settings ::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new(security_settings: security_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_security_settings({ security_settings: security_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_security_settings(::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new(security_settings: security_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_security_settings_client_stub.call_count - end - end - end - - def test_list_agents - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListAgentsResponse.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" - - list_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_agents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_agents_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_agents ::Google::Cloud::Ces::V1beta::ListAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_agents(::Google::Cloud::Ces::V1beta::ListAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_agents_client_stub.call_count - end - end - end - - def test_get_agent - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Agent.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_agent_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_agent_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_agent({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_agent name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_agent ::Google::Cloud::Ces::V1beta::GetAgentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_agent({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_agent(::Google::Cloud::Ces::V1beta::GetAgentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_agent_client_stub.call_count - end - end - end - - def test_create_agent - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Agent.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - agent_id = "hello world" - agent = {} - - create_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_agent_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_agent_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_agent({ parent: parent, agent_id: agent_id, agent: agent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_agent parent: parent, agent_id: agent_id, agent: agent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_agent ::Google::Cloud::Ces::V1beta::CreateAgentRequest.new(parent: parent, agent_id: agent_id, agent: agent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_agent({ parent: parent, agent_id: agent_id, agent: agent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_agent(::Google::Cloud::Ces::V1beta::CreateAgentRequest.new(parent: parent, agent_id: agent_id, agent: agent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_agent_client_stub.call_count - end - end - end - - def test_update_agent - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Agent.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - agent = {} - update_mask = {} - - update_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_agent_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_agent_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_agent({ agent: agent, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_agent agent: agent, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_agent ::Google::Cloud::Ces::V1beta::UpdateAgentRequest.new(agent: agent, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_agent({ agent: agent, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_agent(::Google::Cloud::Ces::V1beta::UpdateAgentRequest.new(agent: agent, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_agent_client_stub.call_count - end - end - end - - def test_delete_agent - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - etag = "hello world" - - delete_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_agent_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_agent_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_agent({ name: name, force: force, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_agent name: name, force: force, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_agent ::Google::Cloud::Ces::V1beta::DeleteAgentRequest.new(name: name, force: force, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_agent({ name: name, force: force, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_agent(::Google::Cloud::Ces::V1beta::DeleteAgentRequest.new(name: name, force: force, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_agent_client_stub.call_count - end - end - end - - def test_list_examples - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListExamplesResponse.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" - - list_examples_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_examples_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_examples_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_examples({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_examples parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_examples ::Google::Cloud::Ces::V1beta::ListExamplesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_examples({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_examples(::Google::Cloud::Ces::V1beta::ListExamplesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_examples_client_stub.call_count - end - end - end - - def test_get_example - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Example.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_example_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_example_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_example_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_example({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_example name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_example ::Google::Cloud::Ces::V1beta::GetExampleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_example({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_example(::Google::Cloud::Ces::V1beta::GetExampleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_example_client_stub.call_count - end - end - end - - def test_create_example - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Example.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - example_id = "hello world" - example = {} - - create_example_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_example_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_example_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_example({ parent: parent, example_id: example_id, example: example }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_example parent: parent, example_id: example_id, example: example do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_example ::Google::Cloud::Ces::V1beta::CreateExampleRequest.new(parent: parent, example_id: example_id, example: example) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_example({ parent: parent, example_id: example_id, example: example }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_example(::Google::Cloud::Ces::V1beta::CreateExampleRequest.new(parent: parent, example_id: example_id, example: example), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_example_client_stub.call_count - end - end - end - - def test_update_example - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Example.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - example = {} - update_mask = {} - - update_example_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_example_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_example_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_example({ example: example, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_example example: example, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_example ::Google::Cloud::Ces::V1beta::UpdateExampleRequest.new(example: example, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_example({ example: example, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_example(::Google::Cloud::Ces::V1beta::UpdateExampleRequest.new(example: example, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_example_client_stub.call_count - end - end - end - - def test_delete_example - # 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" - etag = "hello world" - - delete_example_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_example_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_example_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_example({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_example name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_example ::Google::Cloud::Ces::V1beta::DeleteExampleRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_example({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_example(::Google::Cloud::Ces::V1beta::DeleteExampleRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_example_client_stub.call_count - end - end - end - - def test_list_tools - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListToolsResponse.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" - - list_tools_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_tools_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tools_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tools parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tools ::Google::Cloud::Ces::V1beta::ListToolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_tools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_tools(::Google::Cloud::Ces::V1beta::ListToolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tools_client_stub.call_count - end - end - end - - def test_get_tool - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Tool.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_tool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_tool_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_tool({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_tool name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_tool ::Google::Cloud::Ces::V1beta::GetToolRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_tool({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_tool(::Google::Cloud::Ces::V1beta::GetToolRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_tool_client_stub.call_count - end - end - end - - def test_list_conversations - # Create test objects. - client_result = ::Google::Cloud::Ces::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" - source = :SOURCE_UNSPECIFIED - sources = [:SOURCE_UNSPECIFIED] - - 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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_conversations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_conversations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::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, source: source, sources: sources }) 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, source: source, sources: sources do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_conversations ::Google::Cloud::Ces::V1beta::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, source: source, sources: sources) 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, source: source, sources: sources }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_conversations(::Google::Cloud::Ces::V1beta::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, source: source, sources: sources), 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_get_conversation - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Conversation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - source = :SOURCE_UNSPECIFIED - - 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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_conversation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_conversation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_conversation({ name: name, source: source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_conversation name: name, source: source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_conversation ::Google::Cloud::Ces::V1beta::GetConversationRequest.new(name: name, source: source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_conversation({ name: name, source: source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_conversation(::Google::Cloud::Ces::V1beta::GetConversationRequest.new(name: name, source: source), 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_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" - source = :SOURCE_UNSPECIFIED - - 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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_conversation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_conversation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_conversation({ name: name, source: source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_conversation name: name, source: source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_conversation ::Google::Cloud::Ces::V1beta::DeleteConversationRequest.new(name: name, source: source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_conversation({ name: name, source: source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_conversation(::Google::Cloud::Ces::V1beta::DeleteConversationRequest.new(name: name, source: source), 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_batch_delete_conversations - # 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" - conversations = ["hello world"] - - batch_delete_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::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_batch_delete_conversations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_delete_conversations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_delete_conversations({ parent: parent, conversations: conversations }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_delete_conversations parent: parent, conversations: conversations do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_delete_conversations ::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new(parent: parent, conversations: conversations) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_delete_conversations({ parent: parent, conversations: conversations }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_delete_conversations(::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new(parent: parent, conversations: conversations), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_delete_conversations_client_stub.call_count - end - end - end - - def test_create_tool - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Tool.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tool_id = "hello world" - tool = {} - - create_tool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_tool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_tool_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_tool({ parent: parent, tool_id: tool_id, tool: tool }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_tool parent: parent, tool_id: tool_id, tool: tool do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_tool ::Google::Cloud::Ces::V1beta::CreateToolRequest.new(parent: parent, tool_id: tool_id, tool: tool) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_tool({ parent: parent, tool_id: tool_id, tool: tool }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_tool(::Google::Cloud::Ces::V1beta::CreateToolRequest.new(parent: parent, tool_id: tool_id, tool: tool), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_tool_client_stub.call_count - end - end - end - - def test_update_tool - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Tool.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - tool = {} - update_mask = {} - - update_tool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_tool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_tool_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_tool({ tool: tool, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_tool tool: tool, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_tool ::Google::Cloud::Ces::V1beta::UpdateToolRequest.new(tool: tool, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_tool({ tool: tool, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_tool(::Google::Cloud::Ces::V1beta::UpdateToolRequest.new(tool: tool, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_tool_client_stub.call_count - end - end - end - - def test_delete_tool - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - etag = "hello world" - - delete_tool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_tool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_tool_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_tool({ name: name, force: force, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_tool name: name, force: force, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_tool ::Google::Cloud::Ces::V1beta::DeleteToolRequest.new(name: name, force: force, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_tool({ name: name, force: force, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_tool(::Google::Cloud::Ces::V1beta::DeleteToolRequest.new(name: name, force: force, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_tool_client_stub.call_count - end - end - end - - def test_list_guardrails - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListGuardrailsResponse.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" - - list_guardrails_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_guardrails_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_guardrails_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_guardrails({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_guardrails parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_guardrails ::Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_guardrails({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_guardrails(::Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_guardrails_client_stub.call_count - end - end - end - - def test_get_guardrail - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Guardrail.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_guardrail_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_guardrail_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_guardrail_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_guardrail({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_guardrail name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_guardrail ::Google::Cloud::Ces::V1beta::GetGuardrailRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_guardrail({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_guardrail(::Google::Cloud::Ces::V1beta::GetGuardrailRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_guardrail_client_stub.call_count - end - end - end - - def test_create_guardrail - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Guardrail.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - guardrail_id = "hello world" - guardrail = {} - - create_guardrail_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_guardrail_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_guardrail_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_guardrail({ parent: parent, guardrail_id: guardrail_id, guardrail: guardrail }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_guardrail parent: parent, guardrail_id: guardrail_id, guardrail: guardrail do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_guardrail ::Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new(parent: parent, guardrail_id: guardrail_id, guardrail: guardrail) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_guardrail({ parent: parent, guardrail_id: guardrail_id, guardrail: guardrail }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_guardrail(::Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new(parent: parent, guardrail_id: guardrail_id, guardrail: guardrail), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_guardrail_client_stub.call_count - end - end - end - - def test_update_guardrail - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Guardrail.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - guardrail = {} - update_mask = {} - - update_guardrail_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_guardrail_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_guardrail_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_guardrail({ guardrail: guardrail, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_guardrail guardrail: guardrail, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_guardrail ::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new(guardrail: guardrail, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_guardrail({ guardrail: guardrail, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_guardrail(::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new(guardrail: guardrail, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_guardrail_client_stub.call_count - end - end - end - - def test_delete_guardrail - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - etag = "hello world" - - delete_guardrail_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_guardrail_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_guardrail_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_guardrail({ name: name, force: force, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_guardrail name: name, force: force, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_guardrail ::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new(name: name, force: force, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_guardrail({ name: name, force: force, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_guardrail(::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new(name: name, force: force, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_guardrail_client_stub.call_count - end - end - end - - def test_list_deployments - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListDeploymentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - - list_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_deployments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_deployments_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_deployments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_deployments parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_deployments ::Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_deployments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_deployments(::Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_deployments_client_stub.call_count - end - end - end - - def test_get_deployment - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Deployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_deployment_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_deployment ::Google::Cloud::Ces::V1beta::GetDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_deployment(::Google::Cloud::Ces::V1beta::GetDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_deployment_client_stub.call_count - end - end - end - - def test_create_deployment - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Deployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - deployment_id = "hello world" - deployment = {} - - create_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_deployment_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_deployment parent: parent, deployment_id: deployment_id, deployment: deployment do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_deployment ::Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_deployment(::Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_deployment_client_stub.call_count - end - end - end - - def test_update_deployment - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Deployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - deployment = {} - update_mask = {} - - update_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_deployment_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_deployment({ deployment: deployment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_deployment deployment: deployment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_deployment ::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_deployment({ deployment: deployment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_deployment(::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_deployment_client_stub.call_count - end - end - end - - def test_delete_deployment - # 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" - etag = "hello world" - - delete_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_deployment_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_deployment({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_deployment name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_deployment ::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_deployment({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_deployment(::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_deployment_client_stub.call_count - end - end - end - - def test_list_toolsets - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListToolsetsResponse.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" - - list_toolsets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_toolsets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_toolsets_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_toolsets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_toolsets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_toolsets ::Google::Cloud::Ces::V1beta::ListToolsetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_toolsets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_toolsets(::Google::Cloud::Ces::V1beta::ListToolsetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_toolsets_client_stub.call_count - end - end - end - - def test_get_toolset - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Toolset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_toolset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_toolset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_toolset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_toolset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_toolset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_toolset ::Google::Cloud::Ces::V1beta::GetToolsetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_toolset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_toolset(::Google::Cloud::Ces::V1beta::GetToolsetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_toolset_client_stub.call_count - end - end - end - - def test_create_toolset - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Toolset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - toolset_id = "hello world" - toolset = {} - - create_toolset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_toolset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_toolset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_toolset({ parent: parent, toolset_id: toolset_id, toolset: toolset }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_toolset parent: parent, toolset_id: toolset_id, toolset: toolset do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_toolset ::Google::Cloud::Ces::V1beta::CreateToolsetRequest.new(parent: parent, toolset_id: toolset_id, toolset: toolset) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_toolset({ parent: parent, toolset_id: toolset_id, toolset: toolset }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_toolset(::Google::Cloud::Ces::V1beta::CreateToolsetRequest.new(parent: parent, toolset_id: toolset_id, toolset: toolset), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_toolset_client_stub.call_count - end - end - end - - def test_update_toolset - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Toolset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - toolset = {} - update_mask = {} - - update_toolset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_update_toolset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_toolset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_toolset({ toolset: toolset, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_toolset toolset: toolset, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_toolset ::Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new(toolset: toolset, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_toolset({ toolset: toolset, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_toolset(::Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new(toolset: toolset, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_toolset_client_stub.call_count - end - end - end - - def test_delete_toolset - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - etag = "hello world" - - delete_toolset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_toolset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_toolset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_toolset({ name: name, force: force, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_toolset name: name, force: force, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_toolset ::Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new(name: name, force: force, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_toolset({ name: name, force: force, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_toolset(::Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new(name: name, force: force, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_toolset_client_stub.call_count - end - end - end - - def test_list_app_versions - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListAppVersionsResponse.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" - - list_app_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_app_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_app_versions_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_app_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_app_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_app_versions ::Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_app_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_app_versions(::Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_app_versions_client_stub.call_count - end - end - end - - def test_get_app_version - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::AppVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_app_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_app_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_app_version_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_app_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_app_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_app_version ::Google::Cloud::Ces::V1beta::GetAppVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_app_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_app_version(::Google::Cloud::Ces::V1beta::GetAppVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_app_version_client_stub.call_count - end - end - end - - def test_create_app_version - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::AppVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - app_version_id = "hello world" - app_version = {} - - create_app_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_create_app_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_app_version_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_app_version({ parent: parent, app_version_id: app_version_id, app_version: app_version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_app_version parent: parent, app_version_id: app_version_id, app_version: app_version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_app_version ::Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new(parent: parent, app_version_id: app_version_id, app_version: app_version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_app_version({ parent: parent, app_version_id: app_version_id, app_version: app_version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_app_version(::Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new(parent: parent, app_version_id: app_version_id, app_version: app_version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_app_version_client_stub.call_count - end - end - end - - def test_delete_app_version - # 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" - etag = "hello world" - - delete_app_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_delete_app_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_app_version_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_app_version({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_app_version name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_app_version ::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_app_version({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_app_version(::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_app_version_client_stub.call_count - end - end - end - - def test_restore_app_version - # 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" - - restore_app_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_restore_app_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restore_app_version_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.restore_app_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.restore_app_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.restore_app_version ::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.restore_app_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.restore_app_version(::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restore_app_version_client_stub.call_count - end - end - end - - def test_generate_app_resource - # 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. - agent = {} - parent = "hello world" - refine_instructions = [{}] - tool_generation_config = {} - app_generation_config = {} - evaluation_generation_config = {} - evaluation_personas_generation_config = {} - quality_report_generation_config = {} - hill_climbing_fix_config = {} - - generate_app_resource_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_generate_app_resource_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_app_resource_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_app_resource({ agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_app_resource agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_app_resource ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new(agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_app_resource({ agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_app_resource(::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new(agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_app_resource_client_stub.call_count - end - end - end - - def test_list_changelogs - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListChangelogsResponse.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" - - list_changelogs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_list_changelogs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_changelogs_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_changelogs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_changelogs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_changelogs ::Google::Cloud::Ces::V1beta::ListChangelogsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_changelogs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_changelogs(::Google::Cloud::Ces::V1beta::ListChangelogsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_changelogs_client_stub.call_count - end - end - end - - def test_get_changelog - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Changelog.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_changelog_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::AgentService::Rest::ServiceStub.stub :transcode_get_changelog_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_changelog_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_changelog({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_changelog name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_changelog ::Google::Cloud::Ces::V1beta::GetChangelogRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_changelog({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_changelog(::Google::Cloud::Ces::V1beta::GetChangelogRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_changelog_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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_test.rb deleted file mode 100644 index 305a13412200..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/agent_service_test.rb +++ /dev/null @@ -1,3353 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/agent_service_pb" -require "google/cloud/ces/v1beta/agent_service" - -class ::Google::Cloud::Ces::V1beta::AgentService::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_apps - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListAppsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_apps_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_apps, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListAppsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_apps_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_apps({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_apps parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_apps ::Google::Cloud::Ces::V1beta::ListAppsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_apps({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_apps(::Google::Cloud::Ces::V1beta::ListAppsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_apps_client_stub.call_rpc_count - end - end - - def test_get_app - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::App.new - grpc_operation = GRPC::ActiveCall::Operation.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_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_app, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetAppRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_app({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_app name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_app ::Google::Cloud::Ces::V1beta::GetAppRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_app({ 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_app(::Google::Cloud::Ces::V1beta::GetAppRequest.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_app_client_stub.call_rpc_count - end - end - - def test_create_app - # 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" - app_id = "hello world" - app = {} - - create_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_app, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateAppRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["app_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::App), request["app"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_app({ parent: parent, app_id: app_id, app: app }) 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_app parent: parent, app_id: app_id, app: app 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_app ::Google::Cloud::Ces::V1beta::CreateAppRequest.new(parent: parent, app_id: app_id, app: app) 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_app({ parent: parent, app_id: app_id, app: app }, 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_app(::Google::Cloud::Ces::V1beta::CreateAppRequest.new(parent: parent, app_id: app_id, app: app), 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_app_client_stub.call_rpc_count - end - end - - def test_update_app - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::App.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - app = {} - update_mask = {} - - update_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_app, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateAppRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::App), request["app"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_app({ app: app, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_app app: app, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_app ::Google::Cloud::Ces::V1beta::UpdateAppRequest.new(app: app, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_app({ app: app, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_app(::Google::Cloud::Ces::V1beta::UpdateAppRequest.new(app: app, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_app_client_stub.call_rpc_count - end - end - - def test_delete_app - # 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" - etag = "hello world" - - delete_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_app, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteAppRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_app({ name: name, etag: etag }) 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_app name: name, etag: etag 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_app ::Google::Cloud::Ces::V1beta::DeleteAppRequest.new(name: name, etag: etag) 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_app({ name: name, etag: etag }, 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_app(::Google::Cloud::Ces::V1beta::DeleteAppRequest.new(name: name, etag: etag), 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_app_client_stub.call_rpc_count - end - end - - def test_export_app - # 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" - export_format = :EXPORT_FORMAT_UNSPECIFIED - gcs_uri = "hello world" - app_version = "hello world" - - export_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_app, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ExportAppRequest, request - assert_equal "hello world", request["name"] - assert_equal :EXPORT_FORMAT_UNSPECIFIED, request["export_format"] - assert_equal "hello world", request["gcs_uri"] - assert_equal "hello world", request["app_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_app({ name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version }) 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.export_app name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version 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.export_app ::Google::Cloud::Ces::V1beta::ExportAppRequest.new(name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version) 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.export_app({ name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version }, 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.export_app(::Google::Cloud::Ces::V1beta::ExportAppRequest.new(name: name, export_format: export_format, gcs_uri: gcs_uri, app_version: app_version), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_app_client_stub.call_rpc_count - end - end - - def test_import_app - # 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. - gcs_uri = "hello world" - parent = "hello world" - display_name = "hello world" - app_id = "hello world" - import_options = {} - ignore_app_lock = true - - import_app_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_app, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ImportAppRequest, request - assert_equal "hello world", request["gcs_uri"] - assert_equal :gcs_uri, request.app - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["display_name"] - assert_equal "hello world", request["app_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ImportAppRequest::ImportOptions), request["import_options"] - assert_equal true, request["ignore_app_lock"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_app_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_app({ gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock }) 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.import_app gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock 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.import_app ::Google::Cloud::Ces::V1beta::ImportAppRequest.new(gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock) 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.import_app({ gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock }, 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.import_app(::Google::Cloud::Ces::V1beta::ImportAppRequest.new(gcs_uri: gcs_uri, parent: parent, display_name: display_name, app_id: app_id, import_options: import_options, ignore_app_lock: ignore_app_lock), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_app_client_stub.call_rpc_count - end - end - - def test_get_security_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::SecuritySettings.new - grpc_operation = GRPC::ActiveCall::Operation.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_security_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_security_settings, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_security_settings_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_security_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_security_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_security_settings ::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_security_settings({ 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_security_settings(::Google::Cloud::Ces::V1beta::GetSecuritySettingsRequest.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_security_settings_client_stub.call_rpc_count - end - end - - def test_update_security_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::SecuritySettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - security_settings = {} - update_mask = {} - - update_security_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_security_settings, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::SecuritySettings), request["security_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_security_settings_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_security_settings({ security_settings: security_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_security_settings security_settings: security_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_security_settings ::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new(security_settings: security_settings, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_security_settings({ security_settings: security_settings, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_security_settings(::Google::Cloud::Ces::V1beta::UpdateSecuritySettingsRequest.new(security_settings: security_settings, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_security_settings_client_stub.call_rpc_count - end - end - - def test_list_agents - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListAgentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_agents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_agents, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListAgentsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_agents_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_agents ::Google::Cloud::Ces::V1beta::ListAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_agents(::Google::Cloud::Ces::V1beta::ListAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_agents_client_stub.call_rpc_count - end - end - - def test_get_agent - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Agent.new - grpc_operation = GRPC::ActiveCall::Operation.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_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_agent, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetAgentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_agent_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_agent({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_agent name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_agent ::Google::Cloud::Ces::V1beta::GetAgentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_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_agent(::Google::Cloud::Ces::V1beta::GetAgentRequest.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_agent_client_stub.call_rpc_count - end - end - - def test_create_agent - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Agent.new - grpc_operation = GRPC::ActiveCall::Operation.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" - agent_id = "hello world" - agent = {} - - create_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_agent, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateAgentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["agent_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Agent), request["agent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_agent_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_agent({ parent: parent, agent_id: agent_id, agent: agent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_agent parent: parent, agent_id: agent_id, agent: agent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_agent ::Google::Cloud::Ces::V1beta::CreateAgentRequest.new(parent: parent, agent_id: agent_id, agent: agent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_agent({ parent: parent, agent_id: agent_id, agent: agent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_agent(::Google::Cloud::Ces::V1beta::CreateAgentRequest.new(parent: parent, agent_id: agent_id, agent: agent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_agent_client_stub.call_rpc_count - end - end - - def test_update_agent - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Agent.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - agent = {} - update_mask = {} - - update_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_agent, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateAgentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Agent), request["agent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_agent_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_agent({ agent: agent, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_agent agent: agent, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_agent ::Google::Cloud::Ces::V1beta::UpdateAgentRequest.new(agent: agent, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_agent({ agent: agent, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_agent(::Google::Cloud::Ces::V1beta::UpdateAgentRequest.new(agent: agent, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_agent_client_stub.call_rpc_count - end - end - - def test_delete_agent - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - etag = "hello world" - - delete_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_agent, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteAgentRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_agent_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_agent({ name: name, force: force, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_agent name: name, force: force, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_agent ::Google::Cloud::Ces::V1beta::DeleteAgentRequest.new(name: name, force: force, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_agent({ name: name, force: force, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_agent(::Google::Cloud::Ces::V1beta::DeleteAgentRequest.new(name: name, force: force, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_agent_client_stub.call_rpc_count - end - end - - def test_list_examples - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListExamplesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_examples_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_examples, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListExamplesRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_examples_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_examples({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_examples parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_examples ::Google::Cloud::Ces::V1beta::ListExamplesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_examples({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_examples(::Google::Cloud::Ces::V1beta::ListExamplesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_examples_client_stub.call_rpc_count - end - end - - def test_get_example - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Example.new - grpc_operation = GRPC::ActiveCall::Operation.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_example_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_example, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetExampleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_example_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_example({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_example name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_example ::Google::Cloud::Ces::V1beta::GetExampleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_example({ 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_example(::Google::Cloud::Ces::V1beta::GetExampleRequest.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_example_client_stub.call_rpc_count - end - end - - def test_create_example - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Example.new - grpc_operation = GRPC::ActiveCall::Operation.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" - example_id = "hello world" - example = {} - - create_example_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_example, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateExampleRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["example_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Example), request["example"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_example_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_example({ parent: parent, example_id: example_id, example: example }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_example parent: parent, example_id: example_id, example: example do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_example ::Google::Cloud::Ces::V1beta::CreateExampleRequest.new(parent: parent, example_id: example_id, example: example) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_example({ parent: parent, example_id: example_id, example: example }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_example(::Google::Cloud::Ces::V1beta::CreateExampleRequest.new(parent: parent, example_id: example_id, example: example), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_example_client_stub.call_rpc_count - end - end - - def test_update_example - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Example.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - example = {} - update_mask = {} - - update_example_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_example, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateExampleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Example), request["example"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_example_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_example({ example: example, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_example example: example, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_example ::Google::Cloud::Ces::V1beta::UpdateExampleRequest.new(example: example, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_example({ example: example, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_example(::Google::Cloud::Ces::V1beta::UpdateExampleRequest.new(example: example, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_example_client_stub.call_rpc_count - end - end - - def test_delete_example - # 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" - etag = "hello world" - - delete_example_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_example, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteExampleRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_example_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_example({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_example name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_example ::Google::Cloud::Ces::V1beta::DeleteExampleRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_example({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_example(::Google::Cloud::Ces::V1beta::DeleteExampleRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_example_client_stub.call_rpc_count - end - end - - def test_list_tools - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListToolsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_tools_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tools, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListToolsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tools_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_tools parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_tools ::Google::Cloud::Ces::V1beta::ListToolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_tools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_tools(::Google::Cloud::Ces::V1beta::ListToolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_tools_client_stub.call_rpc_count - end - end - - def test_get_tool - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Tool.new - grpc_operation = GRPC::ActiveCall::Operation.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_tool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tool, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetToolRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tool_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_tool({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_tool name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_tool ::Google::Cloud::Ces::V1beta::GetToolRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_tool({ 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_tool(::Google::Cloud::Ces::V1beta::GetToolRequest.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_tool_client_stub.call_rpc_count - end - end - - def test_list_conversations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::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" - source = :SOURCE_UNSPECIFIED - sources = [:SOURCE_UNSPECIFIED] - - list_conversations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_conversations, name - assert_kind_of ::Google::Cloud::Ces::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"] - assert_equal :SOURCE_UNSPECIFIED, request["source"] - assert_equal [:SOURCE_UNSPECIFIED], request["sources"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_conversations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::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, source: source, sources: sources }) 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, source: source, sources: sources 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::Ces::V1beta::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, source: source, sources: sources) 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, source: source, sources: sources }, 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::Ces::V1beta::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, source: source, sources: sources), 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_get_conversation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::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" - source = :SOURCE_UNSPECIFIED - - get_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_conversation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetConversationRequest, request - assert_equal "hello world", request["name"] - assert_equal :SOURCE_UNSPECIFIED, request["source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_conversation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_conversation({ name: name, source: source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_conversation name: name, source: source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_conversation ::Google::Cloud::Ces::V1beta::GetConversationRequest.new(name: name, source: source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_conversation({ name: name, source: source }, 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::Ces::V1beta::GetConversationRequest.new(name: name, source: source), 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_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" - source = :SOURCE_UNSPECIFIED - - delete_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_conversation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteConversationRequest, request - assert_equal "hello world", request["name"] - assert_equal :SOURCE_UNSPECIFIED, request["source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_conversation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_conversation({ name: name, source: source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_conversation name: name, source: source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_conversation ::Google::Cloud::Ces::V1beta::DeleteConversationRequest.new(name: name, source: source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_conversation({ name: name, source: source }, 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::Ces::V1beta::DeleteConversationRequest.new(name: name, source: source), 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_batch_delete_conversations - # 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" - conversations = ["hello world"] - - batch_delete_conversations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_delete_conversations, name - assert_kind_of ::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["conversations"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_delete_conversations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_delete_conversations({ parent: parent, conversations: conversations }) 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.batch_delete_conversations parent: parent, conversations: conversations 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.batch_delete_conversations ::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new(parent: parent, conversations: conversations) 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.batch_delete_conversations({ parent: parent, conversations: conversations }, 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.batch_delete_conversations(::Google::Cloud::Ces::V1beta::BatchDeleteConversationsRequest.new(parent: parent, conversations: conversations), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_delete_conversations_client_stub.call_rpc_count - end - end - - def test_create_tool - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Tool.new - grpc_operation = GRPC::ActiveCall::Operation.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" - tool_id = "hello world" - tool = {} - - create_tool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_tool, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateToolRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["tool_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Tool), request["tool"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_tool_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_tool({ parent: parent, tool_id: tool_id, tool: tool }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_tool parent: parent, tool_id: tool_id, tool: tool do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_tool ::Google::Cloud::Ces::V1beta::CreateToolRequest.new(parent: parent, tool_id: tool_id, tool: tool) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_tool({ parent: parent, tool_id: tool_id, tool: tool }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_tool(::Google::Cloud::Ces::V1beta::CreateToolRequest.new(parent: parent, tool_id: tool_id, tool: tool), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_tool_client_stub.call_rpc_count - end - end - - def test_update_tool - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Tool.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - tool = {} - update_mask = {} - - update_tool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_tool, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateToolRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Tool), request["tool"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_tool_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_tool({ tool: tool, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_tool tool: tool, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_tool ::Google::Cloud::Ces::V1beta::UpdateToolRequest.new(tool: tool, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_tool({ tool: tool, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_tool(::Google::Cloud::Ces::V1beta::UpdateToolRequest.new(tool: tool, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_tool_client_stub.call_rpc_count - end - end - - def test_delete_tool - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - etag = "hello world" - - delete_tool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_tool, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteToolRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_tool_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_tool({ name: name, force: force, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_tool name: name, force: force, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_tool ::Google::Cloud::Ces::V1beta::DeleteToolRequest.new(name: name, force: force, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_tool({ name: name, force: force, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_tool(::Google::Cloud::Ces::V1beta::DeleteToolRequest.new(name: name, force: force, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_tool_client_stub.call_rpc_count - end - end - - def test_list_guardrails - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListGuardrailsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_guardrails_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_guardrails, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListGuardrailsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_guardrails_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_guardrails({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_guardrails parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_guardrails ::Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_guardrails({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_guardrails(::Google::Cloud::Ces::V1beta::ListGuardrailsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_guardrails_client_stub.call_rpc_count - end - end - - def test_get_guardrail - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Guardrail.new - grpc_operation = GRPC::ActiveCall::Operation.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_guardrail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_guardrail, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetGuardrailRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_guardrail_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_guardrail({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_guardrail name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_guardrail ::Google::Cloud::Ces::V1beta::GetGuardrailRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_guardrail({ 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_guardrail(::Google::Cloud::Ces::V1beta::GetGuardrailRequest.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_guardrail_client_stub.call_rpc_count - end - end - - def test_create_guardrail - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Guardrail.new - grpc_operation = GRPC::ActiveCall::Operation.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" - guardrail_id = "hello world" - guardrail = {} - - create_guardrail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_guardrail, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateGuardrailRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["guardrail_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Guardrail), request["guardrail"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_guardrail_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_guardrail({ parent: parent, guardrail_id: guardrail_id, guardrail: guardrail }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_guardrail parent: parent, guardrail_id: guardrail_id, guardrail: guardrail do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_guardrail ::Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new(parent: parent, guardrail_id: guardrail_id, guardrail: guardrail) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_guardrail({ parent: parent, guardrail_id: guardrail_id, guardrail: guardrail }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_guardrail(::Google::Cloud::Ces::V1beta::CreateGuardrailRequest.new(parent: parent, guardrail_id: guardrail_id, guardrail: guardrail), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_guardrail_client_stub.call_rpc_count - end - end - - def test_update_guardrail - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Guardrail.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - guardrail = {} - update_mask = {} - - update_guardrail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_guardrail, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Guardrail), request["guardrail"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_guardrail_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_guardrail({ guardrail: guardrail, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_guardrail guardrail: guardrail, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_guardrail ::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new(guardrail: guardrail, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_guardrail({ guardrail: guardrail, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_guardrail(::Google::Cloud::Ces::V1beta::UpdateGuardrailRequest.new(guardrail: guardrail, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_guardrail_client_stub.call_rpc_count - end - end - - def test_delete_guardrail - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - etag = "hello world" - - delete_guardrail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_guardrail, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_guardrail_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_guardrail({ name: name, force: force, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_guardrail name: name, force: force, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_guardrail ::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new(name: name, force: force, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_guardrail({ name: name, force: force, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_guardrail(::Google::Cloud::Ces::V1beta::DeleteGuardrailRequest.new(name: name, force: force, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_guardrail_client_stub.call_rpc_count - end - end - - def test_list_deployments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListDeploymentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - - list_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_deployments, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListDeploymentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_deployments_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_deployments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_deployments parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_deployments ::Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_deployments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_deployments(::Google::Cloud::Ces::V1beta::ListDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_deployments_client_stub.call_rpc_count - end - end - - def test_get_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Deployment.new - grpc_operation = GRPC::ActiveCall::Operation.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_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_deployment, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_deployment_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_deployment ::Google::Cloud::Ces::V1beta::GetDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_deployment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_deployment(::Google::Cloud::Ces::V1beta::GetDeploymentRequest.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_deployment_client_stub.call_rpc_count - end - end - - def test_create_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Deployment.new - grpc_operation = GRPC::ActiveCall::Operation.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" - deployment_id = "hello world" - deployment = {} - - create_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_deployment, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateDeploymentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["deployment_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Deployment), request["deployment"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_deployment_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_deployment parent: parent, deployment_id: deployment_id, deployment: deployment do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_deployment ::Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_deployment(::Google::Cloud::Ces::V1beta::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_deployment_client_stub.call_rpc_count - end - end - - def test_update_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Deployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - deployment = {} - update_mask = {} - - update_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_deployment, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Deployment), request["deployment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_deployment_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_deployment({ deployment: deployment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_deployment deployment: deployment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_deployment ::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_deployment({ deployment: deployment, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_deployment(::Google::Cloud::Ces::V1beta::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_deployment_client_stub.call_rpc_count - end - end - - def test_delete_deployment - # 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" - etag = "hello world" - - delete_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_deployment, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_deployment_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_deployment({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_deployment name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_deployment ::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_deployment({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_deployment(::Google::Cloud::Ces::V1beta::DeleteDeploymentRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_deployment_client_stub.call_rpc_count - end - end - - def test_list_toolsets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListToolsetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_toolsets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_toolsets, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListToolsetsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_toolsets_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_toolsets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_toolsets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_toolsets ::Google::Cloud::Ces::V1beta::ListToolsetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_toolsets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_toolsets(::Google::Cloud::Ces::V1beta::ListToolsetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_toolsets_client_stub.call_rpc_count - end - end - - def test_get_toolset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Toolset.new - grpc_operation = GRPC::ActiveCall::Operation.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_toolset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_toolset, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetToolsetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_toolset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_toolset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_toolset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_toolset ::Google::Cloud::Ces::V1beta::GetToolsetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_toolset({ 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_toolset(::Google::Cloud::Ces::V1beta::GetToolsetRequest.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_toolset_client_stub.call_rpc_count - end - end - - def test_create_toolset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Toolset.new - grpc_operation = GRPC::ActiveCall::Operation.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" - toolset_id = "hello world" - toolset = {} - - create_toolset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_toolset, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateToolsetRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["toolset_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Toolset), request["toolset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_toolset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_toolset({ parent: parent, toolset_id: toolset_id, toolset: toolset }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_toolset parent: parent, toolset_id: toolset_id, toolset: toolset do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_toolset ::Google::Cloud::Ces::V1beta::CreateToolsetRequest.new(parent: parent, toolset_id: toolset_id, toolset: toolset) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_toolset({ parent: parent, toolset_id: toolset_id, toolset: toolset }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_toolset(::Google::Cloud::Ces::V1beta::CreateToolsetRequest.new(parent: parent, toolset_id: toolset_id, toolset: toolset), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_toolset_client_stub.call_rpc_count - end - end - - def test_update_toolset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Toolset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - toolset = {} - update_mask = {} - - update_toolset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_toolset, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateToolsetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Toolset), request["toolset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_toolset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_toolset({ toolset: toolset, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_toolset toolset: toolset, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_toolset ::Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new(toolset: toolset, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_toolset({ toolset: toolset, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_toolset(::Google::Cloud::Ces::V1beta::UpdateToolsetRequest.new(toolset: toolset, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_toolset_client_stub.call_rpc_count - end - end - - def test_delete_toolset - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - etag = "hello world" - - delete_toolset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_toolset, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteToolsetRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_toolset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_toolset({ name: name, force: force, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_toolset name: name, force: force, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_toolset ::Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new(name: name, force: force, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_toolset({ name: name, force: force, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_toolset(::Google::Cloud::Ces::V1beta::DeleteToolsetRequest.new(name: name, force: force, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_toolset_client_stub.call_rpc_count - end - end - - def test_list_app_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListAppVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_app_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_app_versions, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListAppVersionsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_app_versions_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_app_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_app_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_app_versions ::Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_app_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_app_versions(::Google::Cloud::Ces::V1beta::ListAppVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_app_versions_client_stub.call_rpc_count - end - end - - def test_get_app_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::AppVersion.new - grpc_operation = GRPC::ActiveCall::Operation.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_app_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_app_version, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetAppVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_app_version_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_app_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_app_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_app_version ::Google::Cloud::Ces::V1beta::GetAppVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_app_version({ 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_app_version(::Google::Cloud::Ces::V1beta::GetAppVersionRequest.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_app_version_client_stub.call_rpc_count - end - end - - def test_create_app_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::AppVersion.new - grpc_operation = GRPC::ActiveCall::Operation.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" - app_version_id = "hello world" - app_version = {} - - create_app_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_app_version, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateAppVersionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["app_version_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::AppVersion), request["app_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_app_version_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_app_version({ parent: parent, app_version_id: app_version_id, app_version: app_version }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_app_version parent: parent, app_version_id: app_version_id, app_version: app_version do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_app_version ::Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new(parent: parent, app_version_id: app_version_id, app_version: app_version) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_app_version({ parent: parent, app_version_id: app_version_id, app_version: app_version }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_app_version(::Google::Cloud::Ces::V1beta::CreateAppVersionRequest.new(parent: parent, app_version_id: app_version_id, app_version: app_version), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_app_version_client_stub.call_rpc_count - end - end - - def test_delete_app_version - # 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" - etag = "hello world" - - delete_app_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_app_version, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_app_version_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_app_version({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_app_version name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_app_version ::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_app_version({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_app_version(::Google::Cloud::Ces::V1beta::DeleteAppVersionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_app_version_client_stub.call_rpc_count - end - end - - def test_restore_app_version - # 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" - - restore_app_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restore_app_version, name - assert_kind_of ::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, restore_app_version_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.restore_app_version({ 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.restore_app_version 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.restore_app_version ::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.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.restore_app_version({ 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.restore_app_version(::Google::Cloud::Ces::V1beta::RestoreAppVersionRequest.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, restore_app_version_client_stub.call_rpc_count - end - end - - def test_generate_app_resource - # 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. - agent = {} - parent = "hello world" - refine_instructions = [{}] - tool_generation_config = {} - app_generation_config = {} - evaluation_generation_config = {} - evaluation_personas_generation_config = {} - quality_report_generation_config = {} - hill_climbing_fix_config = {} - - generate_app_resource_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_app_resource, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Agent), request["agent"] - assert_equal :agent, request.resource - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::RefineInstructions, request["refine_instructions"].first - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::ToolGenerationConfig), request["tool_generation_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::AppGenerationConfig), request["app_generation_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationGenerationConfig), request["evaluation_generation_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::EvaluationPersonasGenerationConfig), request["evaluation_personas_generation_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::QualityReportGenerationConfig), request["quality_report_generation_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest::HillClimbingFixConfig), request["hill_climbing_fix_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_app_resource_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_app_resource({ agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_app_resource agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_app_resource ::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new(agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_app_resource({ agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_app_resource(::Google::Cloud::Ces::V1beta::GenerateAppResourceRequest.new(agent: agent, parent: parent, refine_instructions: refine_instructions, tool_generation_config: tool_generation_config, app_generation_config: app_generation_config, evaluation_generation_config: evaluation_generation_config, evaluation_personas_generation_config: evaluation_personas_generation_config, quality_report_generation_config: quality_report_generation_config, hill_climbing_fix_config: hill_climbing_fix_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_app_resource_client_stub.call_rpc_count - end - end - - def test_list_changelogs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListChangelogsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_changelogs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_changelogs, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListChangelogsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_changelogs_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_changelogs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_changelogs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_changelogs ::Google::Cloud::Ces::V1beta::ListChangelogsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_changelogs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_changelogs(::Google::Cloud::Ces::V1beta::ListChangelogsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_changelogs_client_stub.call_rpc_count - end - end - - def test_get_changelog - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Changelog.new - grpc_operation = GRPC::ActiveCall::Operation.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_changelog_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_changelog, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetChangelogRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_changelog_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_changelog({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_changelog name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_changelog ::Google::Cloud::Ces::V1beta::GetChangelogRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_changelog({ 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_changelog(::Google::Cloud::Ces::V1beta::GetChangelogRequest.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_changelog_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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Ces::V1beta::AgentService::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::Ces::V1beta::AgentService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Ces::V1beta::AgentService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_operations_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_operations_test.rb deleted file mode 100644 index 8f5161ff35b8..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/ces/v1beta/evaluation_service_pb" -require "google/cloud/ces/v1beta/evaluation_service_services_pb" -require "google/cloud/ces/v1beta/evaluation_service" - -class ::Google::Cloud::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_paths_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_paths_test.rb deleted file mode 100644 index a1433e91ff99..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_paths_test.rb +++ /dev/null @@ -1,199 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/evaluation_service" - -class ::Google::Cloud::Ces::V1beta::EvaluationService::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_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::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.agent_path project: "value0", location: "value1", app: "value2", agent: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/agents/value3", path - end - end - - def test_app_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_path project: "value0", location: "value1", app: "value2" - assert_equal "projects/value0/locations/value1/apps/value2", path - end - end - - def test_app_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_version_path project: "value0", location: "value1", app: "value2", version: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/versions/value3", path - end - end - - def test_changelog_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.changelog_path project: "value0", location: "value1", app: "value2", changelog: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/changelogs/value3", path - 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::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.conversation_path project: "value0", location: "value1", app: "value2", conversation: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/conversations/value3", path - end - end - - def test_evaluation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.evaluation_path project: "value0", location: "value1", app: "value2", evaluation: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/evaluations/value3", path - end - end - - def test_evaluation_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.evaluation_dataset_path project: "value0", location: "value1", app: "value2", evaluation_dataset: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/evaluationDatasets/value3", path - end - end - - def test_evaluation_expectation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.evaluation_expectation_path project: "value0", location: "value1", app: "value2", evaluation_expectation: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/evaluationExpectations/value3", path - end - end - - def test_evaluation_result_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.evaluation_result_path project: "value0", location: "value1", app: "value2", evaluation: "value3", evaluation_result: "value4" - assert_equal "projects/value0/locations/value1/apps/value2/evaluations/value3/results/value4", path - end - end - - def test_evaluation_run_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.evaluation_run_path project: "value0", location: "value1", app: "value2", evaluation_run: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/evaluationRuns/value3", path - end - end - - def test_scheduled_evaluation_run_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.scheduled_evaluation_run_path project: "value0", location: "value1", app: "value2", scheduled_evaluation_run: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/scheduledEvaluationRuns/value3", path - end - end - - def test_tool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tool_path project: "value0", location: "value1", app: "value2", tool: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/tools/value3", path - end - end - - def test_toolset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.toolset_path project: "value0", location: "value1", app: "value2", toolset: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/toolsets/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb deleted file mode 100644 index 5d266592e5a2..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_rest_test.rb +++ /dev/null @@ -1,2059 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/evaluation_service_pb" -require "google/cloud/ces/v1beta/evaluation_service/rest" - - -class ::Google::Cloud::Ces::V1beta::EvaluationService::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_run_evaluation - # 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. - app = "hello world" - evaluations = ["hello world"] - evaluation_dataset = "hello world" - display_name = "hello world" - app_version = "hello world" - config = {} - run_count = 42 - persona_run_configs = [{}] - optimization_config = {} - scheduled_evaluation_run = "hello world" - golden_run_method = :GOLDEN_RUN_METHOD_UNSPECIFIED - generate_latency_report = true - - run_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_run_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_evaluation({ app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_evaluation app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_evaluation ::Google::Cloud::Ces::V1beta::RunEvaluationRequest.new(app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_evaluation({ app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_evaluation(::Google::Cloud::Ces::V1beta::RunEvaluationRequest.new(app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_evaluation_client_stub.call_count - end - end - end - - def test_upload_evaluation_audio - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - audio_content = "hello world" - previous_audio_gcs_uri = "hello world" - - upload_evaluation_audio_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_upload_evaluation_audio_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, upload_evaluation_audio_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.upload_evaluation_audio({ name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.upload_evaluation_audio name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.upload_evaluation_audio ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new(name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.upload_evaluation_audio({ name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.upload_evaluation_audio(::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new(name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, upload_evaluation_audio_client_stub.call_count - end - end - end - - def test_create_evaluation - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Evaluation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - evaluation_id = "hello world" - evaluation = {} - - create_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_create_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_evaluation parent: parent, evaluation_id: evaluation_id, evaluation: evaluation do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_evaluation ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_evaluation(::Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_evaluation_client_stub.call_count - end - end - end - - def test_generate_evaluation - # 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. - conversation = "hello world" - source = :SOURCE_UNSPECIFIED - - generate_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_generate_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_evaluation({ conversation: conversation, source: source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_evaluation conversation: conversation, source: source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_evaluation ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new(conversation: conversation, source: source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_evaluation({ conversation: conversation, source: source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_evaluation(::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new(conversation: conversation, source: source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_evaluation_client_stub.call_count - end - end - end - - def test_import_evaluations - # 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. - conversation_list = {} - parent = "hello world" - import_options = {} - - import_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_import_evaluations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_evaluations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_evaluations({ conversation_list: conversation_list, parent: parent, import_options: import_options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_evaluations conversation_list: conversation_list, parent: parent, import_options: import_options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_evaluations ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new(conversation_list: conversation_list, parent: parent, import_options: import_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_evaluations({ conversation_list: conversation_list, parent: parent, import_options: import_options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_evaluations(::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new(conversation_list: conversation_list, parent: parent, import_options: import_options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_evaluations_client_stub.call_count - end - end - end - - def test_create_evaluation_dataset - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - evaluation_dataset_id = "hello world" - evaluation_dataset = {} - - create_evaluation_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_create_evaluation_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_evaluation_dataset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_evaluation_dataset({ parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_evaluation_dataset parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_evaluation_dataset ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new(parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_evaluation_dataset({ parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_evaluation_dataset(::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new(parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_evaluation_dataset_client_stub.call_count - end - end - end - - def test_update_evaluation - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Evaluation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - evaluation = {} - update_mask = {} - - update_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_update_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_evaluation({ evaluation: evaluation, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_evaluation evaluation: evaluation, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_evaluation ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new(evaluation: evaluation, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_evaluation({ evaluation: evaluation, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_evaluation(::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new(evaluation: evaluation, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_evaluation_client_stub.call_count - end - end - end - - def test_update_evaluation_dataset - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - evaluation_dataset = {} - update_mask = {} - - update_evaluation_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_update_evaluation_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_evaluation_dataset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_evaluation_dataset({ evaluation_dataset: evaluation_dataset, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_evaluation_dataset evaluation_dataset: evaluation_dataset, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_evaluation_dataset ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new(evaluation_dataset: evaluation_dataset, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_evaluation_dataset({ evaluation_dataset: evaluation_dataset, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_evaluation_dataset(::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new(evaluation_dataset: evaluation_dataset, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_evaluation_dataset_client_stub.call_count - end - end - end - - def test_delete_evaluation - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - etag = "hello world" - - delete_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_evaluation({ name: name, force: force, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_evaluation name: name, force: force, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_evaluation ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new(name: name, force: force, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_evaluation({ name: name, force: force, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_evaluation(::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new(name: name, force: force, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_evaluation_client_stub.call_count - end - end - end - - def test_delete_evaluation_result - # 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_evaluation_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_evaluation_result_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_evaluation_result_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_evaluation_result({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_evaluation_result name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_evaluation_result ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_evaluation_result({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_evaluation_result(::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_evaluation_result_client_stub.call_count - end - end - end - - def test_delete_evaluation_dataset - # 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" - etag = "hello world" - - delete_evaluation_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_evaluation_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_evaluation_dataset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_evaluation_dataset({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_evaluation_dataset name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_evaluation_dataset ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_evaluation_dataset({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_evaluation_dataset(::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_evaluation_dataset_client_stub.call_count - end - end - end - - def test_delete_evaluation_run - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_evaluation_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_evaluation_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_evaluation_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_evaluation_run ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_evaluation_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_evaluation_run(::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_evaluation_run_client_stub.call_count - end - end - end - - def test_get_evaluation - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::Evaluation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_evaluation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_evaluation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_evaluation ::Google::Cloud::Ces::V1beta::GetEvaluationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_evaluation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_evaluation(::Google::Cloud::Ces::V1beta::GetEvaluationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_evaluation_client_stub.call_count - end - end - end - - def test_get_evaluation_result - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::EvaluationResult.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_evaluation_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_evaluation_result_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_evaluation_result_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_evaluation_result({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_evaluation_result name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_evaluation_result ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_evaluation_result({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_evaluation_result(::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_evaluation_result_client_stub.call_count - end - end - end - - def test_get_evaluation_dataset - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_evaluation_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_evaluation_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_evaluation_dataset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_evaluation_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_evaluation_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_evaluation_dataset ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_evaluation_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_evaluation_dataset(::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_evaluation_dataset_client_stub.call_count - end - end - end - - def test_get_evaluation_run - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::EvaluationRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_evaluation_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_evaluation_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_evaluation_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_evaluation_run ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_evaluation_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_evaluation_run(::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_evaluation_run_client_stub.call_count - end - end - end - - def test_list_evaluations - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListEvaluationsResponse.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" - evaluation_filter = "hello world" - evaluation_run_filter = "hello world" - order_by = "hello world" - last_ten_results = true - - list_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_evaluations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_evaluations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_evaluations parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_evaluations ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_evaluations(::Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_evaluations_client_stub.call_count - end - end - end - - def test_list_evaluation_results - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse.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" - - list_evaluation_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_evaluation_results_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_evaluation_results_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_evaluation_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_evaluation_results parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_evaluation_results ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_evaluation_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_evaluation_results(::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_evaluation_results_client_stub.call_count - end - end - end - - def test_list_evaluation_datasets - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse.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" - - list_evaluation_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_evaluation_datasets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_evaluation_datasets_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_evaluation_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_evaluation_datasets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_evaluation_datasets ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_evaluation_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_evaluation_datasets(::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_evaluation_datasets_client_stub.call_count - end - end - end - - def test_list_evaluation_runs - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse.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" - - list_evaluation_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_evaluation_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_evaluation_runs_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_evaluation_runs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_evaluation_runs ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_evaluation_runs(::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_evaluation_runs_client_stub.call_count - end - end - end - - def test_list_evaluation_expectations - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse.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" - - list_evaluation_expectations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_evaluation_expectations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_evaluation_expectations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_evaluation_expectations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_evaluation_expectations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_evaluation_expectations ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_evaluation_expectations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_evaluation_expectations(::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_evaluation_expectations_client_stub.call_count - end - end - end - - def test_get_evaluation_expectation - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_evaluation_expectation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_evaluation_expectation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_evaluation_expectation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_evaluation_expectation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_evaluation_expectation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_evaluation_expectation ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_evaluation_expectation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_evaluation_expectation(::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_evaluation_expectation_client_stub.call_count - end - end - end - - def test_create_evaluation_expectation - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - evaluation_expectation_id = "hello world" - evaluation_expectation = {} - - create_evaluation_expectation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_create_evaluation_expectation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_evaluation_expectation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_evaluation_expectation({ parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_evaluation_expectation parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_evaluation_expectation ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new(parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_evaluation_expectation({ parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_evaluation_expectation(::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new(parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_evaluation_expectation_client_stub.call_count - end - end - end - - def test_update_evaluation_expectation - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - evaluation_expectation = {} - update_mask = {} - - update_evaluation_expectation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_update_evaluation_expectation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_evaluation_expectation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_evaluation_expectation({ evaluation_expectation: evaluation_expectation, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_evaluation_expectation evaluation_expectation: evaluation_expectation, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_evaluation_expectation ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new(evaluation_expectation: evaluation_expectation, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_evaluation_expectation({ evaluation_expectation: evaluation_expectation, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_evaluation_expectation(::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new(evaluation_expectation: evaluation_expectation, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_evaluation_expectation_client_stub.call_count - end - end - end - - def test_delete_evaluation_expectation - # 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" - etag = "hello world" - - delete_evaluation_expectation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_evaluation_expectation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_evaluation_expectation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_evaluation_expectation({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_evaluation_expectation name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_evaluation_expectation ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_evaluation_expectation({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_evaluation_expectation(::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_evaluation_expectation_client_stub.call_count - end - end - end - - def test_create_scheduled_evaluation_run - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - scheduled_evaluation_run_id = "hello world" - scheduled_evaluation_run = {} - - create_scheduled_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_create_scheduled_evaluation_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_scheduled_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_scheduled_evaluation_run({ parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_scheduled_evaluation_run parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new(parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_scheduled_evaluation_run({ parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new(parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_scheduled_evaluation_run_client_stub.call_count - end - end - end - - def test_get_scheduled_evaluation_run - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scheduled_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_get_scheduled_evaluation_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_scheduled_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_scheduled_evaluation_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_scheduled_evaluation_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_scheduled_evaluation_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_scheduled_evaluation_run_client_stub.call_count - end - end - end - - def test_list_scheduled_evaluation_runs - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse.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" - - list_scheduled_evaluation_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_list_scheduled_evaluation_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_scheduled_evaluation_runs_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_scheduled_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_scheduled_evaluation_runs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_scheduled_evaluation_runs ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_scheduled_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_scheduled_evaluation_runs(::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_scheduled_evaluation_runs_client_stub.call_count - end - end - end - - def test_update_scheduled_evaluation_run - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scheduled_evaluation_run = {} - update_mask = {} - - update_scheduled_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_update_scheduled_evaluation_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_scheduled_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_scheduled_evaluation_run({ scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_scheduled_evaluation_run scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new(scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_scheduled_evaluation_run({ scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new(scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_scheduled_evaluation_run_client_stub.call_count - end - end - end - - def test_delete_scheduled_evaluation_run - # 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" - etag = "hello world" - - delete_scheduled_evaluation_run_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_delete_scheduled_evaluation_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_scheduled_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_scheduled_evaluation_run({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_scheduled_evaluation_run name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_scheduled_evaluation_run({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_scheduled_evaluation_run_client_stub.call_count - end - end - end - - def test_test_persona_voice - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - app = "hello world" - persona_id = "hello world" - text = "hello world" - - test_persona_voice_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_test_persona_voice_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_persona_voice_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_persona_voice({ app: app, persona_id: persona_id, text: text }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_persona_voice app: app, persona_id: persona_id, text: text do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.test_persona_voice ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new(app: app, persona_id: persona_id, text: text) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.test_persona_voice({ app: app, persona_id: persona_id, text: text }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.test_persona_voice(::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new(app: app, persona_id: persona_id, text: text), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_persona_voice_client_stub.call_count - end - end - end - - def test_export_evaluations - # 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" - names = ["hello world"] - export_options = {} - include_evaluation_results = true - include_evaluations = true - - export_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_export_evaluations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_evaluations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_evaluations({ parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_evaluations parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_evaluations ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new(parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_evaluations({ parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_evaluations(::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new(parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_evaluations_client_stub.call_count - end - end - end - - def test_export_evaluation_runs - # 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" - names = ["hello world"] - export_options = {} - - export_evaluation_runs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_export_evaluation_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_evaluation_runs_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_evaluation_runs parent: parent, names: names, export_options: export_options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_evaluation_runs ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_evaluation_runs(::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_evaluation_runs_client_stub.call_count - end - end - end - - def test_export_evaluation_results - # 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" - names = ["hello world"] - export_options = {} - - export_evaluation_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_export_evaluation_results_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_evaluation_results_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_evaluation_results({ parent: parent, names: names, export_options: export_options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_evaluation_results parent: parent, names: names, export_options: export_options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_evaluation_results ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_evaluation_results({ parent: parent, names: names, export_options: export_options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_evaluation_results(::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_evaluation_results_client_stub.call_count - end - end - end - - def test_run_evaluation_result_metrics - # 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. - evaluation_result_id = "hello world" - - run_evaluation_result_metrics_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.stub :transcode_run_evaluation_result_metrics_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_evaluation_result_metrics_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_evaluation_result_metrics evaluation_result_id: evaluation_result_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_evaluation_result_metrics ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_evaluation_result_metrics(::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_evaluation_result_metrics_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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb deleted file mode 100644 index 021883c5e66d..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/evaluation_service_test.rb +++ /dev/null @@ -1,2360 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/evaluation_service_pb" -require "google/cloud/ces/v1beta/evaluation_service" - -class ::Google::Cloud::Ces::V1beta::EvaluationService::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_run_evaluation - # 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. - app = "hello world" - evaluations = ["hello world"] - evaluation_dataset = "hello world" - display_name = "hello world" - app_version = "hello world" - config = {} - run_count = 42 - persona_run_configs = [{}] - optimization_config = {} - scheduled_evaluation_run = "hello world" - golden_run_method = :GOLDEN_RUN_METHOD_UNSPECIFIED - generate_latency_report = true - - run_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_evaluation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::RunEvaluationRequest, request - assert_equal "hello world", request["app"] - assert_equal ["hello world"], request["evaluations"] - assert_equal "hello world", request["evaluation_dataset"] - assert_equal "hello world", request["display_name"] - assert_equal "hello world", request["app_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::EvaluationConfig), request["config"] - assert_equal 42, request["run_count"] - assert request.has_run_count? - assert_kind_of ::Google::Cloud::Ces::V1beta::PersonaRunConfig, request["persona_run_configs"].first - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::OptimizationConfig), request["optimization_config"] - assert_equal "hello world", request["scheduled_evaluation_run"] - assert_equal :GOLDEN_RUN_METHOD_UNSPECIFIED, request["golden_run_method"] - assert_equal true, request["generate_latency_report"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_evaluation({ app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report }) 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.run_evaluation app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report 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.run_evaluation ::Google::Cloud::Ces::V1beta::RunEvaluationRequest.new(app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report) 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.run_evaluation({ app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report }, 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.run_evaluation(::Google::Cloud::Ces::V1beta::RunEvaluationRequest.new(app: app, evaluations: evaluations, evaluation_dataset: evaluation_dataset, display_name: display_name, app_version: app_version, config: config, run_count: run_count, persona_run_configs: persona_run_configs, optimization_config: optimization_config, scheduled_evaluation_run: scheduled_evaluation_run, golden_run_method: golden_run_method, generate_latency_report: generate_latency_report), 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, run_evaluation_client_stub.call_rpc_count - end - end - - def test_upload_evaluation_audio - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - audio_content = "hello world" - previous_audio_gcs_uri = "hello world" - - upload_evaluation_audio_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :upload_evaluation_audio, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["audio_content"] - assert_equal "hello world", request["previous_audio_gcs_uri"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, upload_evaluation_audio_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.upload_evaluation_audio({ name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.upload_evaluation_audio name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.upload_evaluation_audio ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new(name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.upload_evaluation_audio({ name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.upload_evaluation_audio(::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new(name: name, audio_content: audio_content, previous_audio_gcs_uri: previous_audio_gcs_uri), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, upload_evaluation_audio_client_stub.call_rpc_count - end - end - - def test_create_evaluation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Evaluation.new - grpc_operation = GRPC::ActiveCall::Operation.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" - evaluation_id = "hello world" - evaluation = {} - - create_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_evaluation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["evaluation_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Evaluation), request["evaluation"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_evaluation parent: parent, evaluation_id: evaluation_id, evaluation: evaluation do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_evaluation ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_evaluation({ parent: parent, evaluation_id: evaluation_id, evaluation: evaluation }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_evaluation(::Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new(parent: parent, evaluation_id: evaluation_id, evaluation: evaluation), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_evaluation_client_stub.call_rpc_count - end - end - - def test_generate_evaluation - # 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. - conversation = "hello world" - source = :SOURCE_UNSPECIFIED - - generate_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_evaluation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest, request - assert_equal "hello world", request["conversation"] - assert_equal :SOURCE_UNSPECIFIED, request["source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_evaluation({ conversation: conversation, source: source }) 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.generate_evaluation conversation: conversation, source: source 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.generate_evaluation ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new(conversation: conversation, source: source) 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.generate_evaluation({ conversation: conversation, source: source }, 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.generate_evaluation(::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new(conversation: conversation, source: source), 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, generate_evaluation_client_stub.call_rpc_count - end - end - - def test_import_evaluations - # 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. - conversation_list = {} - parent = "hello world" - import_options = {} - - import_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_evaluations, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ConversationList), request["conversation_list"] - assert_equal :conversation_list, request.source - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions), request["import_options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_evaluations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_evaluations({ conversation_list: conversation_list, parent: parent, import_options: import_options }) 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.import_evaluations conversation_list: conversation_list, parent: parent, import_options: import_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 - client.import_evaluations ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new(conversation_list: conversation_list, parent: parent, import_options: import_options) 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.import_evaluations({ conversation_list: conversation_list, parent: parent, import_options: import_options }, 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.import_evaluations(::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new(conversation_list: conversation_list, parent: parent, import_options: import_options), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_evaluations_client_stub.call_rpc_count - end - end - - def test_create_evaluation_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new - grpc_operation = GRPC::ActiveCall::Operation.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" - evaluation_dataset_id = "hello world" - evaluation_dataset = {} - - create_evaluation_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_evaluation_dataset, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["evaluation_dataset_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::EvaluationDataset), request["evaluation_dataset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_evaluation_dataset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_evaluation_dataset({ parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_evaluation_dataset parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_evaluation_dataset ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new(parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_evaluation_dataset({ parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_evaluation_dataset(::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new(parent: parent, evaluation_dataset_id: evaluation_dataset_id, evaluation_dataset: evaluation_dataset), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_evaluation_dataset_client_stub.call_rpc_count - end - end - - def test_update_evaluation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Evaluation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - evaluation = {} - update_mask = {} - - update_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_evaluation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::Evaluation), request["evaluation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_evaluation({ evaluation: evaluation, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_evaluation evaluation: evaluation, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_evaluation ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new(evaluation: evaluation, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_evaluation({ evaluation: evaluation, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_evaluation(::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new(evaluation: evaluation, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_evaluation_client_stub.call_rpc_count - end - end - - def test_update_evaluation_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - evaluation_dataset = {} - update_mask = {} - - update_evaluation_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_evaluation_dataset, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::EvaluationDataset), request["evaluation_dataset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_evaluation_dataset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_evaluation_dataset({ evaluation_dataset: evaluation_dataset, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_evaluation_dataset evaluation_dataset: evaluation_dataset, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_evaluation_dataset ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new(evaluation_dataset: evaluation_dataset, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_evaluation_dataset({ evaluation_dataset: evaluation_dataset, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_evaluation_dataset(::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new(evaluation_dataset: evaluation_dataset, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_evaluation_dataset_client_stub.call_rpc_count - end - end - - def test_delete_evaluation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - etag = "hello world" - - delete_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_evaluation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_evaluation({ name: name, force: force, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_evaluation name: name, force: force, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_evaluation ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new(name: name, force: force, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_evaluation({ name: name, force: force, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_evaluation(::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new(name: name, force: force, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_evaluation_client_stub.call_rpc_count - end - end - - def test_delete_evaluation_result - # 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_evaluation_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_evaluation_result, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_evaluation_result_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_evaluation_result({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_evaluation_result name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_evaluation_result ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_evaluation_result({ 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_evaluation_result(::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.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_evaluation_result_client_stub.call_rpc_count - end - end - - def test_delete_evaluation_dataset - # 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" - etag = "hello world" - - delete_evaluation_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_evaluation_dataset, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_evaluation_dataset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_evaluation_dataset({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_evaluation_dataset name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_evaluation_dataset ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_evaluation_dataset({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_evaluation_dataset(::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_evaluation_dataset_client_stub.call_rpc_count - end - end - - def test_delete_evaluation_run - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_evaluation_run, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_evaluation_run({ 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.delete_evaluation_run 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.delete_evaluation_run ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.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.delete_evaluation_run({ 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.delete_evaluation_run(::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_evaluation_run_client_stub.call_rpc_count - end - end - - def test_get_evaluation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::Evaluation.new - grpc_operation = GRPC::ActiveCall::Operation.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_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_evaluation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetEvaluationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_evaluation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_evaluation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_evaluation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_evaluation ::Google::Cloud::Ces::V1beta::GetEvaluationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_evaluation({ 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_evaluation(::Google::Cloud::Ces::V1beta::GetEvaluationRequest.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_evaluation_client_stub.call_rpc_count - end - end - - def test_get_evaluation_result - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationResult.new - grpc_operation = GRPC::ActiveCall::Operation.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_evaluation_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_evaluation_result, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_evaluation_result_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_evaluation_result({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_evaluation_result name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_evaluation_result ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_evaluation_result({ 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_evaluation_result(::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.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_evaluation_result_client_stub.call_rpc_count - end - end - - def test_get_evaluation_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationDataset.new - grpc_operation = GRPC::ActiveCall::Operation.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_evaluation_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_evaluation_dataset, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_evaluation_dataset_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_evaluation_dataset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_evaluation_dataset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_evaluation_dataset ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_evaluation_dataset({ 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_evaluation_dataset(::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.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_evaluation_dataset_client_stub.call_rpc_count - end - end - - def test_get_evaluation_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationRun.new - grpc_operation = GRPC::ActiveCall::Operation.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_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_evaluation_run, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_evaluation_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_evaluation_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_evaluation_run ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_evaluation_run({ 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_evaluation_run(::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.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_evaluation_run_client_stub.call_rpc_count - end - end - - def test_list_evaluations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListEvaluationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - evaluation_filter = "hello world" - evaluation_run_filter = "hello world" - order_by = "hello world" - last_ten_results = true - - list_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_evaluations, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest, 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["evaluation_filter"] - assert_equal "hello world", request["evaluation_run_filter"] - assert_equal "hello world", request["order_by"] - assert_equal true, request["last_ten_results"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_evaluations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results }) 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_evaluations parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results 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_evaluations ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results) 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_evaluations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results }, 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_evaluations(::Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, evaluation_filter: evaluation_filter, evaluation_run_filter: evaluation_run_filter, order_by: order_by, last_ten_results: last_ten_results), 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_evaluations_client_stub.call_rpc_count - end - end - - def test_list_evaluation_results - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_evaluation_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_evaluation_results, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_evaluation_results_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_evaluation_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_evaluation_results parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_evaluation_results ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_evaluation_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_evaluation_results(::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_evaluation_results_client_stub.call_rpc_count - end - end - - def test_list_evaluation_datasets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_evaluation_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_evaluation_datasets, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_evaluation_datasets_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_evaluation_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_evaluation_datasets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_evaluation_datasets ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_evaluation_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_evaluation_datasets(::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_evaluation_datasets_client_stub.call_rpc_count - end - end - - def test_list_evaluation_runs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_evaluation_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_evaluation_runs, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_evaluation_runs_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_evaluation_runs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_evaluation_runs ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_evaluation_runs(::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_evaluation_runs_client_stub.call_rpc_count - end - end - - def test_list_evaluation_expectations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_evaluation_expectations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_evaluation_expectations, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_evaluation_expectations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_evaluation_expectations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_evaluation_expectations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_evaluation_expectations ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_evaluation_expectations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_evaluation_expectations(::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_evaluation_expectations_client_stub.call_rpc_count - end - end - - def test_get_evaluation_expectation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new - grpc_operation = GRPC::ActiveCall::Operation.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_evaluation_expectation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_evaluation_expectation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_evaluation_expectation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_evaluation_expectation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_evaluation_expectation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_evaluation_expectation ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_evaluation_expectation({ 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_evaluation_expectation(::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.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_evaluation_expectation_client_stub.call_rpc_count - end - end - - def test_create_evaluation_expectation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new - grpc_operation = GRPC::ActiveCall::Operation.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" - evaluation_expectation_id = "hello world" - evaluation_expectation = {} - - create_evaluation_expectation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_evaluation_expectation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["evaluation_expectation_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::EvaluationExpectation), request["evaluation_expectation"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_evaluation_expectation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_evaluation_expectation({ parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_evaluation_expectation parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_evaluation_expectation ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new(parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_evaluation_expectation({ parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_evaluation_expectation(::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new(parent: parent, evaluation_expectation_id: evaluation_expectation_id, evaluation_expectation: evaluation_expectation), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_evaluation_expectation_client_stub.call_rpc_count - end - end - - def test_update_evaluation_expectation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::EvaluationExpectation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - evaluation_expectation = {} - update_mask = {} - - update_evaluation_expectation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_evaluation_expectation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::EvaluationExpectation), request["evaluation_expectation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_evaluation_expectation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_evaluation_expectation({ evaluation_expectation: evaluation_expectation, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_evaluation_expectation evaluation_expectation: evaluation_expectation, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_evaluation_expectation ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new(evaluation_expectation: evaluation_expectation, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_evaluation_expectation({ evaluation_expectation: evaluation_expectation, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_evaluation_expectation(::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new(evaluation_expectation: evaluation_expectation, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_evaluation_expectation_client_stub.call_rpc_count - end - end - - def test_delete_evaluation_expectation - # 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" - etag = "hello world" - - delete_evaluation_expectation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_evaluation_expectation, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_evaluation_expectation_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_evaluation_expectation({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_evaluation_expectation name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_evaluation_expectation ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_evaluation_expectation({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_evaluation_expectation(::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_evaluation_expectation_client_stub.call_rpc_count - end - end - - def test_create_scheduled_evaluation_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new - grpc_operation = GRPC::ActiveCall::Operation.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" - scheduled_evaluation_run_id = "hello world" - scheduled_evaluation_run = {} - - create_scheduled_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_scheduled_evaluation_run, name - assert_kind_of ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["scheduled_evaluation_run_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun), request["scheduled_evaluation_run"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_scheduled_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_scheduled_evaluation_run({ parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_scheduled_evaluation_run parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new(parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_scheduled_evaluation_run({ parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new(parent: parent, scheduled_evaluation_run_id: scheduled_evaluation_run_id, scheduled_evaluation_run: scheduled_evaluation_run), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_scheduled_evaluation_run_client_stub.call_rpc_count - end - end - - def test_get_scheduled_evaluation_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new - grpc_operation = GRPC::ActiveCall::Operation.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_scheduled_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_scheduled_evaluation_run, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_scheduled_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_scheduled_evaluation_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_scheduled_evaluation_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_scheduled_evaluation_run({ 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_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.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_scheduled_evaluation_run_client_stub.call_rpc_count - end - end - - def test_list_scheduled_evaluation_runs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - - list_scheduled_evaluation_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_scheduled_evaluation_runs, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_scheduled_evaluation_runs_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_scheduled_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_scheduled_evaluation_runs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_scheduled_evaluation_runs ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_scheduled_evaluation_runs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_scheduled_evaluation_runs(::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_scheduled_evaluation_runs_client_stub.call_rpc_count - end - end - - def test_update_scheduled_evaluation_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scheduled_evaluation_run = {} - update_mask = {} - - update_scheduled_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_scheduled_evaluation_run, name - assert_kind_of ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun), request["scheduled_evaluation_run"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_scheduled_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_scheduled_evaluation_run({ scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_scheduled_evaluation_run scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new(scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_scheduled_evaluation_run({ scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new(scheduled_evaluation_run: scheduled_evaluation_run, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_scheduled_evaluation_run_client_stub.call_rpc_count - end - end - - def test_delete_scheduled_evaluation_run - # 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" - etag = "hello world" - - delete_scheduled_evaluation_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_scheduled_evaluation_run, name - assert_kind_of ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_scheduled_evaluation_run_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_scheduled_evaluation_run({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_scheduled_evaluation_run name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_scheduled_evaluation_run ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_scheduled_evaluation_run({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_scheduled_evaluation_run(::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_scheduled_evaluation_run_client_stub.call_rpc_count - end - end - - def test_test_persona_voice - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - app = "hello world" - persona_id = "hello world" - text = "hello world" - - test_persona_voice_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_persona_voice, name - assert_kind_of ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest, request - assert_equal "hello world", request["app"] - assert_equal "hello world", request["persona_id"] - assert_equal "hello world", request["text"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_persona_voice_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_persona_voice({ app: app, persona_id: persona_id, text: text }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_persona_voice app: app, persona_id: persona_id, text: text do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_persona_voice ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new(app: app, persona_id: persona_id, text: text) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_persona_voice({ app: app, persona_id: persona_id, text: text }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_persona_voice(::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new(app: app, persona_id: persona_id, text: text), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_persona_voice_client_stub.call_rpc_count - end - end - - def test_export_evaluations - # 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" - names = ["hello world"] - export_options = {} - include_evaluation_results = true - include_evaluations = true - - export_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_evaluations, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ExportOptions), request["export_options"] - assert_equal true, request["include_evaluation_results"] - assert_equal true, request["include_evaluations"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_evaluations_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_evaluations({ parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations }) 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.export_evaluations parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations 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.export_evaluations ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new(parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations) 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.export_evaluations({ parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations }, 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.export_evaluations(::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new(parent: parent, names: names, export_options: export_options, include_evaluation_results: include_evaluation_results, include_evaluations: include_evaluations), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_evaluations_client_stub.call_rpc_count - end - end - - def test_export_evaluation_runs - # 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" - names = ["hello world"] - export_options = {} - - export_evaluation_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_evaluation_runs, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ExportOptions), request["export_options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_evaluation_runs_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }) 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.export_evaluation_runs parent: parent, names: names, export_options: export_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 - client.export_evaluation_runs ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options) 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.export_evaluation_runs({ parent: parent, names: names, export_options: export_options }, 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.export_evaluation_runs(::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new(parent: parent, names: names, export_options: export_options), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_evaluation_runs_client_stub.call_rpc_count - end - end - - def test_export_evaluation_results - # 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" - names = ["hello world"] - export_options = {} - - export_evaluation_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_evaluation_results, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::ExportOptions), request["export_options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_evaluation_results_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_evaluation_results({ parent: parent, names: names, export_options: export_options }) 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.export_evaluation_results parent: parent, names: names, export_options: export_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 - client.export_evaluation_results ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options) 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.export_evaluation_results({ parent: parent, names: names, export_options: export_options }, 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.export_evaluation_results(::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new(parent: parent, names: names, export_options: export_options), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_evaluation_results_client_stub.call_rpc_count - end - end - - def test_run_evaluation_result_metrics - # 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. - evaluation_result_id = "hello world" - - run_evaluation_result_metrics_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_evaluation_result_metrics, name - assert_kind_of ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, request - assert_equal "hello world", request["evaluation_result_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_evaluation_result_metrics_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics({ evaluation_result_id: evaluation_result_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.run_evaluation_result_metrics(::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new(evaluation_result_id: evaluation_result_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, run_evaluation_result_metrics_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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Ces::V1beta::EvaluationService::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::Ces::V1beta::EvaluationService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Ces::V1beta::EvaluationService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_paths_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_paths_test.rb deleted file mode 100644 index db6c426481ca..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/ces/v1beta/session_service" - -class ::Google::Cloud::Ces::V1beta::SessionService::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_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::Ces::V1beta::SessionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.agent_path project: "value0", location: "value1", app: "value2", agent: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/agents/value3", path - end - end - - def test_session_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.session_path project: "value0", location: "value1", app: "value2", session: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/sessions/value3", path - end - end - - def test_tool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tool_path project: "value0", location: "value1", app: "value2", tool: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/tools/value3", path - end - end - - def test_toolset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.toolset_path project: "value0", location: "value1", app: "value2", toolset: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/toolsets/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_rest_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_rest_test.rb deleted file mode 100644 index 4fcd30463b97..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_rest_test.rb +++ /dev/null @@ -1,209 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/session_service_pb" -require "google/cloud/ces/v1beta/session_service/rest" - - -class ::Google::Cloud::Ces::V1beta::SessionService::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_run_session - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::RunSessionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - config = {} - inputs = [{}] - - run_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::SessionService::Rest::ServiceStub.stub :transcode_run_session_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_session_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_session({ config: config, inputs: inputs }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_session config: config, inputs: inputs do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_session ::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_session({ config: config, inputs: inputs }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_session(::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_session_client_stub.call_count - end - end - end - - def test_stream_run_session - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::RunSessionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - config = {} - inputs = [{}] - - stream_run_session_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::Ces::V1beta::SessionService::Rest::ServiceStub.stub :transcode_stream_run_session_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, stream_run_session_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::SessionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.stream_run_session({ config: config, inputs: inputs }) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use named arguments - client.stream_run_session config: config, inputs: inputs do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object - client.stream_run_session ::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use hash object with options - client.stream_run_session({ config: config, inputs: inputs }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object with options - client.stream_run_session(::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Verify method calls - assert_equal 5, stream_run_session_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::Ces::V1beta::SessionService::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::Ces::V1beta::SessionService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_test.rb deleted file mode 100644 index 7f8888953312..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/session_service_test.rb +++ /dev/null @@ -1,328 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/session_service_pb" -require "google/cloud/ces/v1beta/session_service" - -class ::Google::Cloud::Ces::V1beta::SessionService::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_run_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::RunSessionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - config = {} - inputs = [{}] - - run_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_session, name - assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::SessionConfig), request["config"] - assert_kind_of ::Google::Cloud::Ces::V1beta::SessionInput, request["inputs"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_session_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_session({ config: config, inputs: inputs }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_session config: config, inputs: inputs do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_session ::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_session({ config: config, inputs: inputs }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_session(::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_session_client_stub.call_rpc_count - end - end - - def test_stream_run_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::RunSessionResponse.new - grpc_operation = GRPC::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. - config = {} - inputs = [{}] - - stream_run_session_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :stream_run_session, name - assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::SessionConfig), request["config"] - assert_kind_of ::Google::Cloud::Ces::V1beta::SessionInput, request["inputs"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, stream_run_session_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.stream_run_session({ config: config, inputs: inputs }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.stream_run_session config: config, inputs: inputs do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.stream_run_session ::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.stream_run_session({ config: config, inputs: inputs }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.stream_run_session(::Google::Cloud::Ces::V1beta::RunSessionRequest.new(config: config, inputs: inputs), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Ces::V1beta::RunSessionResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, stream_run_session_client_stub.call_rpc_count - end - end - - def test_bidi_run_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a bidi streaming method. - config = {} - - bidi_run_session_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :bidi_run_session, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, bidi_run_session_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::SessionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { config: config } - request_proto = ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new config: config - enum_input = [request_hash, request_proto].to_enum - client.bidi_run_session enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { config: config } - request_proto = ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new config: config - stream_input = Gapic::StreamInput.new - client.bidi_run_session stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Use enumerable object with hash and protobuf object with options. - request_hash = { config: config } - request_proto = ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new config: config - enum_input = [request_hash, request_proto].to_enum - client.bidi_run_session enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { config: config } - request_proto = ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage.new config: config - stream_input = Gapic::StreamInput.new - client.bidi_run_session stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Ces::V1beta::BidiSessionServerMessage, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Verify method calls - assert_equal 4, bidi_run_session_client_stub.call_rpc_count - bidi_run_session_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::Ces::V1beta::BidiSessionClientMessage, r - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::SessionConfig), r["config"] - assert_equal :config, r.message_type - end - end - 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::Ces::V1beta::SessionService::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::Ces::V1beta::SessionService::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::Ces::V1beta::SessionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Ces::V1beta::SessionService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_paths_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_paths_test.rb deleted file mode 100644 index a5e5c3aac9a5..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/ces/v1beta/tool_service" - -class ::Google::Cloud::Ces::V1beta::ToolService::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_app_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.app_path project: "value0", location: "value1", app: "value2" - assert_equal "projects/value0/locations/value1/apps/value2", path - end - end - - def test_tool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tool_path project: "value0", location: "value1", app: "value2", tool: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/tools/value3", path - end - end - - def test_toolset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.toolset_path project: "value0", location: "value1", app: "value2", toolset: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/toolsets/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb deleted file mode 100644 index 07aa71523536..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_rest_test.rb +++ /dev/null @@ -1,268 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/tool_service_pb" -require "google/cloud/ces/v1beta/tool_service/rest" - - -class ::Google::Cloud::Ces::V1beta::ToolService::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_execute_tool - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::ExecuteToolResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - tool = "hello world" - variables = {} - parent = "hello world" - args = {} - mock_config = {} - - execute_tool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::ToolService::Rest::ServiceStub.stub :transcode_execute_tool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, execute_tool_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.execute_tool({ tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.execute_tool tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.execute_tool ::Google::Cloud::Ces::V1beta::ExecuteToolRequest.new(tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.execute_tool({ tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.execute_tool(::Google::Cloud::Ces::V1beta::ExecuteToolRequest.new(tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, execute_tool_client_stub.call_count - end - end - end - - def test_retrieve_tool_schema - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - tool = "hello world" - parent = "hello world" - - retrieve_tool_schema_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::ToolService::Rest::ServiceStub.stub :transcode_retrieve_tool_schema_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retrieve_tool_schema_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.retrieve_tool_schema({ tool: tool, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.retrieve_tool_schema tool: tool, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.retrieve_tool_schema ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new(tool: tool, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.retrieve_tool_schema({ tool: tool, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.retrieve_tool_schema(::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new(tool: tool, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retrieve_tool_schema_client_stub.call_count - end - end - end - - def test_retrieve_tools - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::RetrieveToolsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - toolset = "hello world" - tool_ids = ["hello world"] - bypass_persistence_config = true - - retrieve_tools_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::ToolService::Rest::ServiceStub.stub :transcode_retrieve_tools_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retrieve_tools_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::ToolService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.retrieve_tools toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.retrieve_tools ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.retrieve_tools(::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retrieve_tools_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::Ces::V1beta::ToolService::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::Ces::V1beta::ToolService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb deleted file mode 100644 index be227e6c59fb..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/tool_service_test.rb +++ /dev/null @@ -1,295 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/tool_service_pb" -require "google/cloud/ces/v1beta/tool_service" - -class ::Google::Cloud::Ces::V1beta::ToolService::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_execute_tool - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::ExecuteToolResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - tool = "hello world" - variables = {} - parent = "hello world" - args = {} - mock_config = {} - - execute_tool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :execute_tool, name - assert_kind_of ::Google::Cloud::Ces::V1beta::ExecuteToolRequest, request - assert_equal "hello world", request["tool"] - assert_equal :tool, request.tool_identifier - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Struct), request["variables"] - assert_equal :variables, request.tool_execution_context - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Struct), request["args"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Ces::V1beta::MockConfig), request["mock_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, execute_tool_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.execute_tool({ tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.execute_tool tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.execute_tool ::Google::Cloud::Ces::V1beta::ExecuteToolRequest.new(tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.execute_tool({ tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.execute_tool(::Google::Cloud::Ces::V1beta::ExecuteToolRequest.new(tool: tool, variables: variables, parent: parent, args: args, mock_config: mock_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, execute_tool_client_stub.call_rpc_count - end - end - - def test_retrieve_tool_schema - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - tool = "hello world" - parent = "hello world" - - retrieve_tool_schema_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_tool_schema, name - assert_kind_of ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest, request - assert_equal "hello world", request["tool"] - assert_equal :tool, request.tool_identifier - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_tool_schema_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.retrieve_tool_schema({ tool: tool, parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.retrieve_tool_schema tool: tool, parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.retrieve_tool_schema ::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new(tool: tool, parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.retrieve_tool_schema({ tool: tool, parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.retrieve_tool_schema(::Google::Cloud::Ces::V1beta::RetrieveToolSchemaRequest.new(tool: tool, parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, retrieve_tool_schema_client_stub.call_rpc_count - end - end - - def test_retrieve_tools - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::RetrieveToolsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - toolset = "hello world" - tool_ids = ["hello world"] - bypass_persistence_config = true - - retrieve_tools_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_tools, name - assert_kind_of ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest, request - assert_equal "hello world", request["toolset"] - assert_equal ["hello world"], request["tool_ids"] - assert_equal true, request["bypass_persistence_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_tools_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::ToolService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.retrieve_tools toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.retrieve_tools ::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.retrieve_tools({ toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.retrieve_tools(::Google::Cloud::Ces::V1beta::RetrieveToolsRequest.new(toolset: toolset, tool_ids: tool_ids, bypass_persistence_config: bypass_persistence_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, retrieve_tools_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::Ces::V1beta::ToolService::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::Ces::V1beta::ToolService::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::Ces::V1beta::ToolService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Ces::V1beta::ToolService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_paths_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_paths_test.rb deleted file mode 100644 index 17f310fbf092..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/ces/v1beta/widget_service" - -class ::Google::Cloud::Ces::V1beta::WidgetService::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_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.deployment_path project: "value0", location: "value1", app: "value2", deployment: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/deployments/value3", path - end - end - - def test_session_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.session_path project: "value0", location: "value1", app: "value2", session: "value3" - assert_equal "projects/value0/locations/value1/apps/value2/sessions/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_rest_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_rest_test.rb deleted file mode 100644 index 21ffd340569a..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_rest_test.rb +++ /dev/null @@ -1,156 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/widget_service_pb" -require "google/cloud/ces/v1beta/widget_service/rest" - - -class ::Google::Cloud::Ces::V1beta::WidgetService::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_generate_chat_token - # Create test objects. - client_result = ::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - deployment = "hello world" - recaptcha_token = "hello world" - live_handoff_enabled = true - - generate_chat_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Ces::V1beta::WidgetService::Rest::ServiceStub.stub :transcode_generate_chat_token_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_chat_token_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::WidgetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_chat_token({ name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_chat_token name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_chat_token ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new(name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_chat_token({ name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_chat_token(::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new(name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_chat_token_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::Ces::V1beta::WidgetService::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::Ces::V1beta::WidgetService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_test.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_test.rb deleted file mode 100644 index 17b8beff8848..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/google/cloud/ces/v1beta/widget_service_test.rb +++ /dev/null @@ -1,168 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/ces/v1beta/widget_service_pb" -require "google/cloud/ces/v1beta/widget_service" - -class ::Google::Cloud::Ces::V1beta::WidgetService::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_generate_chat_token - # Create GRPC objects. - grpc_response = ::Google::Cloud::Ces::V1beta::GenerateChatTokenResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - deployment = "hello world" - recaptcha_token = "hello world" - live_handoff_enabled = true - - generate_chat_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_chat_token, name - assert_kind_of ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["deployment"] - assert_equal "hello world", request["recaptcha_token"] - assert_equal true, request["live_handoff_enabled"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_chat_token_client_stub do - # Create client - client = ::Google::Cloud::Ces::V1beta::WidgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_chat_token({ name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_chat_token name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_chat_token ::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new(name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_chat_token({ name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_chat_token(::Google::Cloud::Ces::V1beta::GenerateChatTokenRequest.new(name: name, deployment: deployment, recaptcha_token: recaptcha_token, live_handoff_enabled: live_handoff_enabled), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_chat_token_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::Ces::V1beta::WidgetService::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::Ces::V1beta::WidgetService::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::Ces::V1beta::WidgetService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Ces::V1beta::WidgetService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-ces-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-ces-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-ces-v1beta/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"