google-cloud-dialogflow-cx-v3 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google/cloud/dialogflow/cx/v3/advanced_settings_pb.rb +32 -0
- data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +122 -0
- data/lib/google/cloud/dialogflow/cx/v3/agent_services_pb.rb +82 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +1051 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +666 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/paths.rb +151 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents.rb +52 -0
- data/lib/google/cloud/dialogflow/cx/v3/audio_config_pb.rb +94 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_type_pb.rb +92 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_type_services_pb.rb +67 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +766 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/paths.rb +75 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_types.rb +51 -0
- data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +117 -0
- data/lib/google/cloud/dialogflow/cx/v3/environment_services_pb.rb +61 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +950 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +666 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments/paths.rb +98 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments.rb +52 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiment_pb.rb +177 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiment_services_pb.rb +61 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +851 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiments/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiments/paths.rb +102 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiments.rb +51 -0
- data/lib/google/cloud/dialogflow/cx/v3/flow_pb.rb +145 -0
- data/lib/google/cloud/dialogflow/cx/v3/flow_services_pb.rb +88 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +1200 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +666 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows/paths.rb +184 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows.rb +52 -0
- data/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/intent_pb.rb +97 -0
- data/lib/google/cloud/dialogflow/cx/v3/intent_services_pb.rb +67 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +750 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/paths.rb +96 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents.rb +51 -0
- data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +113 -0
- data/lib/google/cloud/dialogflow/cx/v3/page_services_pb.rb +67 -0
- data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +805 -0
- data/lib/google/cloud/dialogflow/cx/v3/pages/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/pages/paths.rb +165 -0
- data/lib/google/cloud/dialogflow/cx/v3/pages.rb +51 -0
- data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +77 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_pb.rb +89 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +696 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/paths.rb +157 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service.rb +51 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_services_pb.rb +56 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_pb.rb +68 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_services_pb.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +715 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/paths.rb +137 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types.rb +51 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +209 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_services_pb.rb +71 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +654 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb +225 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions.rb +53 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_case_pb.rb +302 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_case_services_pb.rb +73 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +1324 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +666 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/paths.rb +249 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases.rb +53 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_pb.rb +67 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_services_pb.rb +67 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +766 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/paths.rb +144 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups.rb +51 -0
- data/lib/google/cloud/dialogflow/cx/v3/validation_message_pb.rb +59 -0
- data/lib/google/cloud/dialogflow/cx/v3/version.rb +30 -0
- data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +88 -0
- data/lib/google/cloud/dialogflow/cx/v3/version_services_pb.rb +57 -0
- data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +792 -0
- data/lib/google/cloud/dialogflow/cx/v3/versions/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +666 -0
- data/lib/google/cloud/dialogflow/cx/v3/versions/paths.rb +79 -0
- data/lib/google/cloud/dialogflow/cx/v3/versions.rb +52 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +172 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhook_services_pb.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +704 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/paths.rb +96 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhooks.rb +51 -0
- data/lib/google/cloud/dialogflow/cx/v3.rb +53 -0
- data/lib/google-cloud-dialogflow-cx-v3.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/advanced_settings.rb +57 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +301 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/audio_config.rb +322 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/entity_type.rb +306 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/environment.rb +279 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/experiment.rb +438 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/flow.rb +438 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb +126 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/intent.rb +318 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/page.rb +478 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +220 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +222 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +798 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/session_entity_type.rb +184 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/test_case.rb +757 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/transition_route_group.rb +195 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/validation_message.rb +121 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +182 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +496 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/latlng.rb +38 -0
- metadata +326 -0
@@ -0,0 +1,73 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/dialogflow/cx/v3/test_case.proto for package 'Google.Cloud.Dialogflow.CX.V3'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2021 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/cloud/dialogflow/cx/v3/test_case_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Dialogflow
|
25
|
+
module CX
|
26
|
+
module V3
|
27
|
+
module TestCases
|
28
|
+
# Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] and
|
29
|
+
# [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult].
|
30
|
+
class Service
|
31
|
+
|
32
|
+
include GRPC::GenericService
|
33
|
+
|
34
|
+
self.marshal_class_method = :encode
|
35
|
+
self.unmarshal_class_method = :decode
|
36
|
+
self.service_name = 'google.cloud.dialogflow.cx.v3.TestCases'
|
37
|
+
|
38
|
+
# Fetches a list of test cases for a given agent.
|
39
|
+
rpc :ListTestCases, ::Google::Cloud::Dialogflow::CX::V3::ListTestCasesRequest, ::Google::Cloud::Dialogflow::CX::V3::ListTestCasesResponse
|
40
|
+
# Batch deletes test cases.
|
41
|
+
rpc :BatchDeleteTestCases, ::Google::Cloud::Dialogflow::CX::V3::BatchDeleteTestCasesRequest, ::Google::Protobuf::Empty
|
42
|
+
# Gets a test case.
|
43
|
+
rpc :GetTestCase, ::Google::Cloud::Dialogflow::CX::V3::GetTestCaseRequest, ::Google::Cloud::Dialogflow::CX::V3::TestCase
|
44
|
+
# Creates a test case for the given agent.
|
45
|
+
rpc :CreateTestCase, ::Google::Cloud::Dialogflow::CX::V3::CreateTestCaseRequest, ::Google::Cloud::Dialogflow::CX::V3::TestCase
|
46
|
+
# Updates the specified test case.
|
47
|
+
rpc :UpdateTestCase, ::Google::Cloud::Dialogflow::CX::V3::UpdateTestCaseRequest, ::Google::Cloud::Dialogflow::CX::V3::TestCase
|
48
|
+
# Kicks off a test case run.
|
49
|
+
rpc :RunTestCase, ::Google::Cloud::Dialogflow::CX::V3::RunTestCaseRequest, ::Google::Longrunning::Operation
|
50
|
+
# Kicks off a batch run of test cases.
|
51
|
+
rpc :BatchRunTestCases, ::Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesRequest, ::Google::Longrunning::Operation
|
52
|
+
# Calculates the test coverage for an agent.
|
53
|
+
rpc :CalculateCoverage, ::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest, ::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageResponse
|
54
|
+
# Imports the test cases from a Cloud Storage bucket or a local file. It
|
55
|
+
# always creates new test cases and won't overwite any existing ones. The
|
56
|
+
# provided ID in the imported test case is neglected.
|
57
|
+
rpc :ImportTestCases, ::Google::Cloud::Dialogflow::CX::V3::ImportTestCasesRequest, ::Google::Longrunning::Operation
|
58
|
+
# Exports the test cases under the agent to a Cloud Storage bucket or a local
|
59
|
+
# file. Filter can be applied to export a subset of test cases.
|
60
|
+
rpc :ExportTestCases, ::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest, ::Google::Longrunning::Operation
|
61
|
+
# Fetches a list of results for a given test case.
|
62
|
+
rpc :ListTestCaseResults, ::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsRequest, ::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsResponse
|
63
|
+
# Gets a test case result.
|
64
|
+
rpc :GetTestCaseResult, ::Google::Cloud::Dialogflow::CX::V3::GetTestCaseResultRequest, ::Google::Cloud::Dialogflow::CX::V3::TestCaseResult
|
65
|
+
end
|
66
|
+
|
67
|
+
Stub = Service.rpc_stub_class
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,1324 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/dialogflow/cx/v3/test_case_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Dialogflow
|
25
|
+
module CX
|
26
|
+
module V3
|
27
|
+
module TestCases
|
28
|
+
##
|
29
|
+
# Client for the TestCases service.
|
30
|
+
#
|
31
|
+
# Service for managing {::Google::Cloud::Dialogflow::CX::V3::TestCase Test Cases} and
|
32
|
+
# {::Google::Cloud::Dialogflow::CX::V3::TestCaseResult Test Case Results}.
|
33
|
+
#
|
34
|
+
class Client
|
35
|
+
include Paths
|
36
|
+
|
37
|
+
# @private
|
38
|
+
attr_reader :test_cases_stub
|
39
|
+
|
40
|
+
##
|
41
|
+
# Configure the TestCases Client class.
|
42
|
+
#
|
43
|
+
# See {::Google::Cloud::Dialogflow::CX::V3::TestCases::Client::Configuration}
|
44
|
+
# for a description of the configuration fields.
|
45
|
+
#
|
46
|
+
# @example
|
47
|
+
#
|
48
|
+
# # Modify the configuration for all TestCases clients
|
49
|
+
# ::Google::Cloud::Dialogflow::CX::V3::TestCases::Client.configure do |config|
|
50
|
+
# config.timeout = 10.0
|
51
|
+
# end
|
52
|
+
#
|
53
|
+
# @yield [config] Configure the Client client.
|
54
|
+
# @yieldparam config [Client::Configuration]
|
55
|
+
#
|
56
|
+
# @return [Client::Configuration]
|
57
|
+
#
|
58
|
+
def self.configure
|
59
|
+
@configure ||= begin
|
60
|
+
namespace = ["Google", "Cloud", "Dialogflow", "CX", "V3"]
|
61
|
+
parent_config = while namespace.any?
|
62
|
+
parent_name = namespace.join "::"
|
63
|
+
parent_const = const_get parent_name
|
64
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
65
|
+
namespace.pop
|
66
|
+
end
|
67
|
+
default_config = Client::Configuration.new parent_config
|
68
|
+
|
69
|
+
default_config.timeout = 60.0
|
70
|
+
default_config.retry_policy = {
|
71
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
72
|
+
}
|
73
|
+
|
74
|
+
default_config
|
75
|
+
end
|
76
|
+
yield @configure if block_given?
|
77
|
+
@configure
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# Configure the TestCases Client instance.
|
82
|
+
#
|
83
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
84
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
85
|
+
# should be made on {Client.configure}.
|
86
|
+
#
|
87
|
+
# See {::Google::Cloud::Dialogflow::CX::V3::TestCases::Client::Configuration}
|
88
|
+
# for a description of the configuration fields.
|
89
|
+
#
|
90
|
+
# @yield [config] Configure the Client client.
|
91
|
+
# @yieldparam config [Client::Configuration]
|
92
|
+
#
|
93
|
+
# @return [Client::Configuration]
|
94
|
+
#
|
95
|
+
def configure
|
96
|
+
yield @config if block_given?
|
97
|
+
@config
|
98
|
+
end
|
99
|
+
|
100
|
+
##
|
101
|
+
# Create a new TestCases client object.
|
102
|
+
#
|
103
|
+
# @example
|
104
|
+
#
|
105
|
+
# # Create a client using the default configuration
|
106
|
+
# client = ::Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
|
107
|
+
#
|
108
|
+
# # Create a client using a custom configuration
|
109
|
+
# client = ::Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new do |config|
|
110
|
+
# config.timeout = 10.0
|
111
|
+
# end
|
112
|
+
#
|
113
|
+
# @yield [config] Configure the TestCases client.
|
114
|
+
# @yieldparam config [Client::Configuration]
|
115
|
+
#
|
116
|
+
def initialize
|
117
|
+
# These require statements are intentionally placed here to initialize
|
118
|
+
# the gRPC module only when it's required.
|
119
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
120
|
+
require "gapic/grpc"
|
121
|
+
require "google/cloud/dialogflow/cx/v3/test_case_services_pb"
|
122
|
+
|
123
|
+
# Create the configuration object
|
124
|
+
@config = Configuration.new Client.configure
|
125
|
+
|
126
|
+
# Yield the configuration if needed
|
127
|
+
yield @config if block_given?
|
128
|
+
|
129
|
+
# Create credentials
|
130
|
+
credentials = @config.credentials
|
131
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
132
|
+
# but only if the default endpoint does not have a region prefix.
|
133
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
134
|
+
!@config.endpoint.split(".").first.include?("-")
|
135
|
+
credentials ||= Credentials.default scope: @config.scope,
|
136
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
137
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
138
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
139
|
+
end
|
140
|
+
@quota_project_id = @config.quota_project
|
141
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
142
|
+
|
143
|
+
@operations_client = Operations.new do |config|
|
144
|
+
config.credentials = credentials
|
145
|
+
config.endpoint = @config.endpoint
|
146
|
+
end
|
147
|
+
|
148
|
+
@test_cases_stub = ::Gapic::ServiceStub.new(
|
149
|
+
::Google::Cloud::Dialogflow::CX::V3::TestCases::Stub,
|
150
|
+
credentials: credentials,
|
151
|
+
endpoint: @config.endpoint,
|
152
|
+
channel_args: @config.channel_args,
|
153
|
+
interceptors: @config.interceptors
|
154
|
+
)
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Get the associated client for long-running operations.
|
159
|
+
#
|
160
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::TestCases::Operations]
|
161
|
+
#
|
162
|
+
attr_reader :operations_client
|
163
|
+
|
164
|
+
# Service calls
|
165
|
+
|
166
|
+
##
|
167
|
+
# Fetches a list of test cases for a given agent.
|
168
|
+
#
|
169
|
+
# @overload list_test_cases(request, options = nil)
|
170
|
+
# Pass arguments to `list_test_cases` via a request object, either of type
|
171
|
+
# {::Google::Cloud::Dialogflow::CX::V3::ListTestCasesRequest} or an equivalent Hash.
|
172
|
+
#
|
173
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::ListTestCasesRequest, ::Hash]
|
174
|
+
# A request object representing the call parameters. Required. To specify no
|
175
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
176
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
177
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
178
|
+
#
|
179
|
+
# @overload list_test_cases(parent: nil, page_size: nil, page_token: nil, view: nil)
|
180
|
+
# Pass arguments to `list_test_cases` via keyword arguments. Note that at
|
181
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
182
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
183
|
+
#
|
184
|
+
# @param parent [::String]
|
185
|
+
# Required. The agent to list all pages for.
|
186
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
187
|
+
# @param page_size [::Integer]
|
188
|
+
# The maximum number of items to return in a single page. By default 20.
|
189
|
+
# Note that when TestCaseView = FULL, the maximum page size allowed is 20.
|
190
|
+
# When TestCaseView = BASIC, the maximum page size allowed is 500.
|
191
|
+
# @param page_token [::String]
|
192
|
+
# The next_page_token value returned from a previous list request.
|
193
|
+
# @param view [::Google::Cloud::Dialogflow::CX::V3::ListTestCasesRequest::TestCaseView]
|
194
|
+
# Specifies whether response should include all fields or just the metadata.
|
195
|
+
#
|
196
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
197
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::TestCase>]
|
198
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
199
|
+
#
|
200
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::TestCase>]
|
201
|
+
#
|
202
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
203
|
+
#
|
204
|
+
def list_test_cases request, options = nil
|
205
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
206
|
+
|
207
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ListTestCasesRequest
|
208
|
+
|
209
|
+
# Converts hash and nil to an options object
|
210
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
211
|
+
|
212
|
+
# Customize the options with defaults
|
213
|
+
metadata = @config.rpcs.list_test_cases.metadata.to_h
|
214
|
+
|
215
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
216
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
217
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
218
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
219
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
220
|
+
|
221
|
+
header_params = {
|
222
|
+
"parent" => request.parent
|
223
|
+
}
|
224
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
225
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
226
|
+
|
227
|
+
options.apply_defaults timeout: @config.rpcs.list_test_cases.timeout,
|
228
|
+
metadata: metadata,
|
229
|
+
retry_policy: @config.rpcs.list_test_cases.retry_policy
|
230
|
+
|
231
|
+
options.apply_defaults timeout: @config.timeout,
|
232
|
+
metadata: @config.metadata,
|
233
|
+
retry_policy: @config.retry_policy
|
234
|
+
|
235
|
+
@test_cases_stub.call_rpc :list_test_cases, request, options: options do |response, operation|
|
236
|
+
response = ::Gapic::PagedEnumerable.new @test_cases_stub, :list_test_cases, request, response, operation, options
|
237
|
+
yield response, operation if block_given?
|
238
|
+
return response
|
239
|
+
end
|
240
|
+
rescue ::GRPC::BadStatus => e
|
241
|
+
raise ::Google::Cloud::Error.from_error(e)
|
242
|
+
end
|
243
|
+
|
244
|
+
##
|
245
|
+
# Batch deletes test cases.
|
246
|
+
#
|
247
|
+
# @overload batch_delete_test_cases(request, options = nil)
|
248
|
+
# Pass arguments to `batch_delete_test_cases` via a request object, either of type
|
249
|
+
# {::Google::Cloud::Dialogflow::CX::V3::BatchDeleteTestCasesRequest} or an equivalent Hash.
|
250
|
+
#
|
251
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::BatchDeleteTestCasesRequest, ::Hash]
|
252
|
+
# A request object representing the call parameters. Required. To specify no
|
253
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
254
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
255
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
256
|
+
#
|
257
|
+
# @overload batch_delete_test_cases(parent: nil, names: nil)
|
258
|
+
# Pass arguments to `batch_delete_test_cases` via keyword arguments. Note that at
|
259
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
260
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
261
|
+
#
|
262
|
+
# @param parent [::String]
|
263
|
+
# Required. The agent to delete test cases from.
|
264
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
265
|
+
# @param names [::Array<::String>]
|
266
|
+
# Required. Format of test case names: `projects/<Project ID>/locations/
|
267
|
+
# <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
|
268
|
+
#
|
269
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
270
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
271
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
272
|
+
#
|
273
|
+
# @return [::Google::Protobuf::Empty]
|
274
|
+
#
|
275
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
276
|
+
#
|
277
|
+
def batch_delete_test_cases request, options = nil
|
278
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
279
|
+
|
280
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::BatchDeleteTestCasesRequest
|
281
|
+
|
282
|
+
# Converts hash and nil to an options object
|
283
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
284
|
+
|
285
|
+
# Customize the options with defaults
|
286
|
+
metadata = @config.rpcs.batch_delete_test_cases.metadata.to_h
|
287
|
+
|
288
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
289
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
290
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
291
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
292
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
293
|
+
|
294
|
+
header_params = {
|
295
|
+
"parent" => request.parent
|
296
|
+
}
|
297
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
298
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
299
|
+
|
300
|
+
options.apply_defaults timeout: @config.rpcs.batch_delete_test_cases.timeout,
|
301
|
+
metadata: metadata,
|
302
|
+
retry_policy: @config.rpcs.batch_delete_test_cases.retry_policy
|
303
|
+
|
304
|
+
options.apply_defaults timeout: @config.timeout,
|
305
|
+
metadata: @config.metadata,
|
306
|
+
retry_policy: @config.retry_policy
|
307
|
+
|
308
|
+
@test_cases_stub.call_rpc :batch_delete_test_cases, request, options: options do |response, operation|
|
309
|
+
yield response, operation if block_given?
|
310
|
+
return response
|
311
|
+
end
|
312
|
+
rescue ::GRPC::BadStatus => e
|
313
|
+
raise ::Google::Cloud::Error.from_error(e)
|
314
|
+
end
|
315
|
+
|
316
|
+
##
|
317
|
+
# Gets a test case.
|
318
|
+
#
|
319
|
+
# @overload get_test_case(request, options = nil)
|
320
|
+
# Pass arguments to `get_test_case` via a request object, either of type
|
321
|
+
# {::Google::Cloud::Dialogflow::CX::V3::GetTestCaseRequest} or an equivalent Hash.
|
322
|
+
#
|
323
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::GetTestCaseRequest, ::Hash]
|
324
|
+
# A request object representing the call parameters. Required. To specify no
|
325
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
326
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
327
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
328
|
+
#
|
329
|
+
# @overload get_test_case(name: nil)
|
330
|
+
# Pass arguments to `get_test_case` via keyword arguments. Note that at
|
331
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
332
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
333
|
+
#
|
334
|
+
# @param name [::String]
|
335
|
+
# Required. The name of the testcase.
|
336
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
337
|
+
# ID>/testCases/<TestCase ID>`.
|
338
|
+
#
|
339
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
340
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::TestCase]
|
341
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
342
|
+
#
|
343
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::TestCase]
|
344
|
+
#
|
345
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
346
|
+
#
|
347
|
+
def get_test_case request, options = nil
|
348
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
349
|
+
|
350
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetTestCaseRequest
|
351
|
+
|
352
|
+
# Converts hash and nil to an options object
|
353
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
354
|
+
|
355
|
+
# Customize the options with defaults
|
356
|
+
metadata = @config.rpcs.get_test_case.metadata.to_h
|
357
|
+
|
358
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
359
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
360
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
361
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
362
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
363
|
+
|
364
|
+
header_params = {
|
365
|
+
"name" => request.name
|
366
|
+
}
|
367
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
368
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
369
|
+
|
370
|
+
options.apply_defaults timeout: @config.rpcs.get_test_case.timeout,
|
371
|
+
metadata: metadata,
|
372
|
+
retry_policy: @config.rpcs.get_test_case.retry_policy
|
373
|
+
|
374
|
+
options.apply_defaults timeout: @config.timeout,
|
375
|
+
metadata: @config.metadata,
|
376
|
+
retry_policy: @config.retry_policy
|
377
|
+
|
378
|
+
@test_cases_stub.call_rpc :get_test_case, request, options: options do |response, operation|
|
379
|
+
yield response, operation if block_given?
|
380
|
+
return response
|
381
|
+
end
|
382
|
+
rescue ::GRPC::BadStatus => e
|
383
|
+
raise ::Google::Cloud::Error.from_error(e)
|
384
|
+
end
|
385
|
+
|
386
|
+
##
|
387
|
+
# Creates a test case for the given agent.
|
388
|
+
#
|
389
|
+
# @overload create_test_case(request, options = nil)
|
390
|
+
# Pass arguments to `create_test_case` via a request object, either of type
|
391
|
+
# {::Google::Cloud::Dialogflow::CX::V3::CreateTestCaseRequest} or an equivalent Hash.
|
392
|
+
#
|
393
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::CreateTestCaseRequest, ::Hash]
|
394
|
+
# A request object representing the call parameters. Required. To specify no
|
395
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
396
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
397
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
398
|
+
#
|
399
|
+
# @overload create_test_case(parent: nil, test_case: nil)
|
400
|
+
# Pass arguments to `create_test_case` via keyword arguments. Note that at
|
401
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
402
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
403
|
+
#
|
404
|
+
# @param parent [::String]
|
405
|
+
# Required. The agent to create the test case for.
|
406
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
407
|
+
# @param test_case [::Google::Cloud::Dialogflow::CX::V3::TestCase, ::Hash]
|
408
|
+
# Required. The test case to create.
|
409
|
+
#
|
410
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
411
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::TestCase]
|
412
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
413
|
+
#
|
414
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::TestCase]
|
415
|
+
#
|
416
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
417
|
+
#
|
418
|
+
def create_test_case request, options = nil
|
419
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
420
|
+
|
421
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::CreateTestCaseRequest
|
422
|
+
|
423
|
+
# Converts hash and nil to an options object
|
424
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
425
|
+
|
426
|
+
# Customize the options with defaults
|
427
|
+
metadata = @config.rpcs.create_test_case.metadata.to_h
|
428
|
+
|
429
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
430
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
431
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
432
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
433
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
434
|
+
|
435
|
+
header_params = {
|
436
|
+
"parent" => request.parent
|
437
|
+
}
|
438
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
439
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
440
|
+
|
441
|
+
options.apply_defaults timeout: @config.rpcs.create_test_case.timeout,
|
442
|
+
metadata: metadata,
|
443
|
+
retry_policy: @config.rpcs.create_test_case.retry_policy
|
444
|
+
|
445
|
+
options.apply_defaults timeout: @config.timeout,
|
446
|
+
metadata: @config.metadata,
|
447
|
+
retry_policy: @config.retry_policy
|
448
|
+
|
449
|
+
@test_cases_stub.call_rpc :create_test_case, request, options: options do |response, operation|
|
450
|
+
yield response, operation if block_given?
|
451
|
+
return response
|
452
|
+
end
|
453
|
+
rescue ::GRPC::BadStatus => e
|
454
|
+
raise ::Google::Cloud::Error.from_error(e)
|
455
|
+
end
|
456
|
+
|
457
|
+
##
|
458
|
+
# Updates the specified test case.
|
459
|
+
#
|
460
|
+
# @overload update_test_case(request, options = nil)
|
461
|
+
# Pass arguments to `update_test_case` via a request object, either of type
|
462
|
+
# {::Google::Cloud::Dialogflow::CX::V3::UpdateTestCaseRequest} or an equivalent Hash.
|
463
|
+
#
|
464
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::UpdateTestCaseRequest, ::Hash]
|
465
|
+
# A request object representing the call parameters. Required. To specify no
|
466
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
467
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
468
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
469
|
+
#
|
470
|
+
# @overload update_test_case(test_case: nil, update_mask: nil)
|
471
|
+
# Pass arguments to `update_test_case` via keyword arguments. Note that at
|
472
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
473
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
474
|
+
#
|
475
|
+
# @param test_case [::Google::Cloud::Dialogflow::CX::V3::TestCase, ::Hash]
|
476
|
+
# Required. The test case to update.
|
477
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
478
|
+
# Required. The mask to specify which fields should be updated. The
|
479
|
+
# {::Google::Cloud::Dialogflow::CX::V3::TestCase#creation_time `creationTime`} and
|
480
|
+
# {::Google::Cloud::Dialogflow::CX::V3::TestCase#last_test_result `lastTestResult`} cannot be updated.
|
481
|
+
#
|
482
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
483
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::TestCase]
|
484
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
485
|
+
#
|
486
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::TestCase]
|
487
|
+
#
|
488
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
489
|
+
#
|
490
|
+
def update_test_case request, options = nil
|
491
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
492
|
+
|
493
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::UpdateTestCaseRequest
|
494
|
+
|
495
|
+
# Converts hash and nil to an options object
|
496
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
497
|
+
|
498
|
+
# Customize the options with defaults
|
499
|
+
metadata = @config.rpcs.update_test_case.metadata.to_h
|
500
|
+
|
501
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
502
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
503
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
504
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
505
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
506
|
+
|
507
|
+
header_params = {
|
508
|
+
"test_case.name" => request.test_case.name
|
509
|
+
}
|
510
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
511
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
512
|
+
|
513
|
+
options.apply_defaults timeout: @config.rpcs.update_test_case.timeout,
|
514
|
+
metadata: metadata,
|
515
|
+
retry_policy: @config.rpcs.update_test_case.retry_policy
|
516
|
+
|
517
|
+
options.apply_defaults timeout: @config.timeout,
|
518
|
+
metadata: @config.metadata,
|
519
|
+
retry_policy: @config.retry_policy
|
520
|
+
|
521
|
+
@test_cases_stub.call_rpc :update_test_case, request, options: options do |response, operation|
|
522
|
+
yield response, operation if block_given?
|
523
|
+
return response
|
524
|
+
end
|
525
|
+
rescue ::GRPC::BadStatus => e
|
526
|
+
raise ::Google::Cloud::Error.from_error(e)
|
527
|
+
end
|
528
|
+
|
529
|
+
##
|
530
|
+
# Kicks off a test case run.
|
531
|
+
#
|
532
|
+
# @overload run_test_case(request, options = nil)
|
533
|
+
# Pass arguments to `run_test_case` via a request object, either of type
|
534
|
+
# {::Google::Cloud::Dialogflow::CX::V3::RunTestCaseRequest} or an equivalent Hash.
|
535
|
+
#
|
536
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::RunTestCaseRequest, ::Hash]
|
537
|
+
# A request object representing the call parameters. Required. To specify no
|
538
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
539
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
540
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
541
|
+
#
|
542
|
+
# @overload run_test_case(name: nil, environment: nil)
|
543
|
+
# Pass arguments to `run_test_case` via keyword arguments. Note that at
|
544
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
545
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
546
|
+
#
|
547
|
+
# @param name [::String]
|
548
|
+
# Required. Format of test case name to run: `projects/<Project ID>/locations/
|
549
|
+
# <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
|
550
|
+
# @param environment [::String]
|
551
|
+
# Optional. Environment name. If not set, draft environment is assumed.
|
552
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
553
|
+
# ID>/environments/<Environment ID>`.
|
554
|
+
#
|
555
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
556
|
+
# @yieldparam response [::Gapic::Operation]
|
557
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
558
|
+
#
|
559
|
+
# @return [::Gapic::Operation]
|
560
|
+
#
|
561
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
562
|
+
#
|
563
|
+
def run_test_case request, options = nil
|
564
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
565
|
+
|
566
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::RunTestCaseRequest
|
567
|
+
|
568
|
+
# Converts hash and nil to an options object
|
569
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
570
|
+
|
571
|
+
# Customize the options with defaults
|
572
|
+
metadata = @config.rpcs.run_test_case.metadata.to_h
|
573
|
+
|
574
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
575
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
576
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
577
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
578
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
579
|
+
|
580
|
+
header_params = {
|
581
|
+
"name" => request.name
|
582
|
+
}
|
583
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
584
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
585
|
+
|
586
|
+
options.apply_defaults timeout: @config.rpcs.run_test_case.timeout,
|
587
|
+
metadata: metadata,
|
588
|
+
retry_policy: @config.rpcs.run_test_case.retry_policy
|
589
|
+
|
590
|
+
options.apply_defaults timeout: @config.timeout,
|
591
|
+
metadata: @config.metadata,
|
592
|
+
retry_policy: @config.retry_policy
|
593
|
+
|
594
|
+
@test_cases_stub.call_rpc :run_test_case, request, options: options do |response, operation|
|
595
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
596
|
+
yield response, operation if block_given?
|
597
|
+
return response
|
598
|
+
end
|
599
|
+
rescue ::GRPC::BadStatus => e
|
600
|
+
raise ::Google::Cloud::Error.from_error(e)
|
601
|
+
end
|
602
|
+
|
603
|
+
##
|
604
|
+
# Kicks off a batch run of test cases.
|
605
|
+
#
|
606
|
+
# @overload batch_run_test_cases(request, options = nil)
|
607
|
+
# Pass arguments to `batch_run_test_cases` via a request object, either of type
|
608
|
+
# {::Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesRequest} or an equivalent Hash.
|
609
|
+
#
|
610
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesRequest, ::Hash]
|
611
|
+
# A request object representing the call parameters. Required. To specify no
|
612
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
613
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
614
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
615
|
+
#
|
616
|
+
# @overload batch_run_test_cases(parent: nil, environment: nil, test_cases: nil)
|
617
|
+
# Pass arguments to `batch_run_test_cases` via keyword arguments. Note that at
|
618
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
619
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
620
|
+
#
|
621
|
+
# @param parent [::String]
|
622
|
+
# Required. Agent name. Format: `projects/<Project ID>/locations/<Location ID>/agents/
|
623
|
+
# <AgentID>`.
|
624
|
+
# @param environment [::String]
|
625
|
+
# Optional. If not set, draft environment is assumed. Format: `projects/<Project
|
626
|
+
# ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
|
627
|
+
# ID>`.
|
628
|
+
# @param test_cases [::Array<::String>]
|
629
|
+
# Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
630
|
+
# ID>/testCases/<TestCase ID>`.
|
631
|
+
#
|
632
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
633
|
+
# @yieldparam response [::Gapic::Operation]
|
634
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
635
|
+
#
|
636
|
+
# @return [::Gapic::Operation]
|
637
|
+
#
|
638
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
639
|
+
#
|
640
|
+
def batch_run_test_cases request, options = nil
|
641
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
642
|
+
|
643
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesRequest
|
644
|
+
|
645
|
+
# Converts hash and nil to an options object
|
646
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
647
|
+
|
648
|
+
# Customize the options with defaults
|
649
|
+
metadata = @config.rpcs.batch_run_test_cases.metadata.to_h
|
650
|
+
|
651
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
652
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
653
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
654
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
655
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
656
|
+
|
657
|
+
header_params = {
|
658
|
+
"parent" => request.parent
|
659
|
+
}
|
660
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
661
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
662
|
+
|
663
|
+
options.apply_defaults timeout: @config.rpcs.batch_run_test_cases.timeout,
|
664
|
+
metadata: metadata,
|
665
|
+
retry_policy: @config.rpcs.batch_run_test_cases.retry_policy
|
666
|
+
|
667
|
+
options.apply_defaults timeout: @config.timeout,
|
668
|
+
metadata: @config.metadata,
|
669
|
+
retry_policy: @config.retry_policy
|
670
|
+
|
671
|
+
@test_cases_stub.call_rpc :batch_run_test_cases, request, options: options do |response, operation|
|
672
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
673
|
+
yield response, operation if block_given?
|
674
|
+
return response
|
675
|
+
end
|
676
|
+
rescue ::GRPC::BadStatus => e
|
677
|
+
raise ::Google::Cloud::Error.from_error(e)
|
678
|
+
end
|
679
|
+
|
680
|
+
##
|
681
|
+
# Calculates the test coverage for an agent.
|
682
|
+
#
|
683
|
+
# @overload calculate_coverage(request, options = nil)
|
684
|
+
# Pass arguments to `calculate_coverage` via a request object, either of type
|
685
|
+
# {::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest} or an equivalent Hash.
|
686
|
+
#
|
687
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest, ::Hash]
|
688
|
+
# A request object representing the call parameters. Required. To specify no
|
689
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
690
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
691
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
692
|
+
#
|
693
|
+
# @overload calculate_coverage(agent: nil, type: nil)
|
694
|
+
# Pass arguments to `calculate_coverage` via keyword arguments. Note that at
|
695
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
696
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
697
|
+
#
|
698
|
+
# @param agent [::String]
|
699
|
+
# Required. The agent to calculate coverage for.
|
700
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
701
|
+
# @param type [::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest::CoverageType]
|
702
|
+
# Required. The type of coverage requested.
|
703
|
+
#
|
704
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
705
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageResponse]
|
706
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
707
|
+
#
|
708
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageResponse]
|
709
|
+
#
|
710
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
711
|
+
#
|
712
|
+
def calculate_coverage request, options = nil
|
713
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
714
|
+
|
715
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest
|
716
|
+
|
717
|
+
# Converts hash and nil to an options object
|
718
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
719
|
+
|
720
|
+
# Customize the options with defaults
|
721
|
+
metadata = @config.rpcs.calculate_coverage.metadata.to_h
|
722
|
+
|
723
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
724
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
725
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
726
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
727
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
728
|
+
|
729
|
+
header_params = {
|
730
|
+
"agent" => request.agent
|
731
|
+
}
|
732
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
733
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
734
|
+
|
735
|
+
options.apply_defaults timeout: @config.rpcs.calculate_coverage.timeout,
|
736
|
+
metadata: metadata,
|
737
|
+
retry_policy: @config.rpcs.calculate_coverage.retry_policy
|
738
|
+
|
739
|
+
options.apply_defaults timeout: @config.timeout,
|
740
|
+
metadata: @config.metadata,
|
741
|
+
retry_policy: @config.retry_policy
|
742
|
+
|
743
|
+
@test_cases_stub.call_rpc :calculate_coverage, request, options: options do |response, operation|
|
744
|
+
yield response, operation if block_given?
|
745
|
+
return response
|
746
|
+
end
|
747
|
+
rescue ::GRPC::BadStatus => e
|
748
|
+
raise ::Google::Cloud::Error.from_error(e)
|
749
|
+
end
|
750
|
+
|
751
|
+
##
|
752
|
+
# Imports the test cases from a Cloud Storage bucket or a local file. It
|
753
|
+
# always creates new test cases and won't overwite any existing ones. The
|
754
|
+
# provided ID in the imported test case is neglected.
|
755
|
+
#
|
756
|
+
# @overload import_test_cases(request, options = nil)
|
757
|
+
# Pass arguments to `import_test_cases` via a request object, either of type
|
758
|
+
# {::Google::Cloud::Dialogflow::CX::V3::ImportTestCasesRequest} or an equivalent Hash.
|
759
|
+
#
|
760
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::ImportTestCasesRequest, ::Hash]
|
761
|
+
# A request object representing the call parameters. Required. To specify no
|
762
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
763
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
764
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
765
|
+
#
|
766
|
+
# @overload import_test_cases(parent: nil, gcs_uri: nil, content: nil)
|
767
|
+
# Pass arguments to `import_test_cases` via keyword arguments. Note that at
|
768
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
769
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
770
|
+
#
|
771
|
+
# @param parent [::String]
|
772
|
+
# Required. The agent to import test cases to.
|
773
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
774
|
+
# @param gcs_uri [::String]
|
775
|
+
# The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
|
776
|
+
# to import test cases from. The format of this URI must be
|
777
|
+
# `gs://<bucket-name>/<object-name>`.
|
778
|
+
# @param content [::String]
|
779
|
+
# Uncompressed raw byte content for test cases.
|
780
|
+
#
|
781
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
782
|
+
# @yieldparam response [::Gapic::Operation]
|
783
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
784
|
+
#
|
785
|
+
# @return [::Gapic::Operation]
|
786
|
+
#
|
787
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
788
|
+
#
|
789
|
+
def import_test_cases request, options = nil
|
790
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
791
|
+
|
792
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ImportTestCasesRequest
|
793
|
+
|
794
|
+
# Converts hash and nil to an options object
|
795
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
796
|
+
|
797
|
+
# Customize the options with defaults
|
798
|
+
metadata = @config.rpcs.import_test_cases.metadata.to_h
|
799
|
+
|
800
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
801
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
802
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
803
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
804
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
805
|
+
|
806
|
+
header_params = {
|
807
|
+
"parent" => request.parent
|
808
|
+
}
|
809
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
810
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
811
|
+
|
812
|
+
options.apply_defaults timeout: @config.rpcs.import_test_cases.timeout,
|
813
|
+
metadata: metadata,
|
814
|
+
retry_policy: @config.rpcs.import_test_cases.retry_policy
|
815
|
+
|
816
|
+
options.apply_defaults timeout: @config.timeout,
|
817
|
+
metadata: @config.metadata,
|
818
|
+
retry_policy: @config.retry_policy
|
819
|
+
|
820
|
+
@test_cases_stub.call_rpc :import_test_cases, request, options: options do |response, operation|
|
821
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
822
|
+
yield response, operation if block_given?
|
823
|
+
return response
|
824
|
+
end
|
825
|
+
rescue ::GRPC::BadStatus => e
|
826
|
+
raise ::Google::Cloud::Error.from_error(e)
|
827
|
+
end
|
828
|
+
|
829
|
+
##
|
830
|
+
# Exports the test cases under the agent to a Cloud Storage bucket or a local
|
831
|
+
# file. Filter can be applied to export a subset of test cases.
|
832
|
+
#
|
833
|
+
# @overload export_test_cases(request, options = nil)
|
834
|
+
# Pass arguments to `export_test_cases` via a request object, either of type
|
835
|
+
# {::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest} or an equivalent Hash.
|
836
|
+
#
|
837
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest, ::Hash]
|
838
|
+
# A request object representing the call parameters. Required. To specify no
|
839
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
840
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
841
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
842
|
+
#
|
843
|
+
# @overload export_test_cases(parent: nil, gcs_uri: nil, data_format: nil, filter: nil)
|
844
|
+
# Pass arguments to `export_test_cases` via keyword arguments. Note that at
|
845
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
846
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
847
|
+
#
|
848
|
+
# @param parent [::String]
|
849
|
+
# Required. The agent where to export test cases from.
|
850
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
851
|
+
# @param gcs_uri [::String]
|
852
|
+
# The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to
|
853
|
+
# export the test cases to. The format of this URI must be
|
854
|
+
# `gs://<bucket-name>/<object-name>`. If unspecified, the serialized test
|
855
|
+
# cases is returned inline.
|
856
|
+
# @param data_format [::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest::DataFormat]
|
857
|
+
# The data format of the exported test cases. If not specified, `BLOB` is
|
858
|
+
# assumed.
|
859
|
+
# @param filter [::String]
|
860
|
+
# The filter expression used to filter exported test cases, see
|
861
|
+
# [API Filtering](https://aip.dev/160). The expression is case insensitive
|
862
|
+
# and supports the following syntax:
|
863
|
+
#
|
864
|
+
# name = <value> [OR name = <value>] ...
|
865
|
+
#
|
866
|
+
# For example:
|
867
|
+
#
|
868
|
+
# * "name = t1 OR name = t2" matches the test case with the exact resource
|
869
|
+
# name "t1" or "t2".
|
870
|
+
#
|
871
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
872
|
+
# @yieldparam response [::Gapic::Operation]
|
873
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
874
|
+
#
|
875
|
+
# @return [::Gapic::Operation]
|
876
|
+
#
|
877
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
878
|
+
#
|
879
|
+
def export_test_cases request, options = nil
|
880
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
881
|
+
|
882
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest
|
883
|
+
|
884
|
+
# Converts hash and nil to an options object
|
885
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
886
|
+
|
887
|
+
# Customize the options with defaults
|
888
|
+
metadata = @config.rpcs.export_test_cases.metadata.to_h
|
889
|
+
|
890
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
891
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
892
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
893
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
894
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
895
|
+
|
896
|
+
header_params = {
|
897
|
+
"parent" => request.parent
|
898
|
+
}
|
899
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
900
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
901
|
+
|
902
|
+
options.apply_defaults timeout: @config.rpcs.export_test_cases.timeout,
|
903
|
+
metadata: metadata,
|
904
|
+
retry_policy: @config.rpcs.export_test_cases.retry_policy
|
905
|
+
|
906
|
+
options.apply_defaults timeout: @config.timeout,
|
907
|
+
metadata: @config.metadata,
|
908
|
+
retry_policy: @config.retry_policy
|
909
|
+
|
910
|
+
@test_cases_stub.call_rpc :export_test_cases, request, options: options do |response, operation|
|
911
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
912
|
+
yield response, operation if block_given?
|
913
|
+
return response
|
914
|
+
end
|
915
|
+
rescue ::GRPC::BadStatus => e
|
916
|
+
raise ::Google::Cloud::Error.from_error(e)
|
917
|
+
end
|
918
|
+
|
919
|
+
##
|
920
|
+
# Fetches a list of results for a given test case.
|
921
|
+
#
|
922
|
+
# @overload list_test_case_results(request, options = nil)
|
923
|
+
# Pass arguments to `list_test_case_results` via a request object, either of type
|
924
|
+
# {::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsRequest} or an equivalent Hash.
|
925
|
+
#
|
926
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsRequest, ::Hash]
|
927
|
+
# A request object representing the call parameters. Required. To specify no
|
928
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
929
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
930
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
931
|
+
#
|
932
|
+
# @overload list_test_case_results(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
933
|
+
# Pass arguments to `list_test_case_results` via keyword arguments. Note that at
|
934
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
935
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
936
|
+
#
|
937
|
+
# @param parent [::String]
|
938
|
+
# Required. The test case to list results for.
|
939
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
|
940
|
+
# testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
|
941
|
+
# list results across multiple test cases.
|
942
|
+
# @param page_size [::Integer]
|
943
|
+
# The maximum number of items to return in a single page. By default 100 and
|
944
|
+
# at most 1000.
|
945
|
+
# @param page_token [::String]
|
946
|
+
# The next_page_token value returned from a previous list request.
|
947
|
+
# @param filter [::String]
|
948
|
+
# The filter expression used to filter test case results. See
|
949
|
+
# [API Filtering](https://aip.dev/160).
|
950
|
+
#
|
951
|
+
# The expression is case insensitive. Only 'AND' is supported for logical
|
952
|
+
# operators. The supported syntax is listed below in detail:
|
953
|
+
#
|
954
|
+
# <field> <operator> <value> [AND <field> <operator> <value>] ...
|
955
|
+
# [AND latest]
|
956
|
+
#
|
957
|
+
# The supported fields and operators are:
|
958
|
+
# field operator
|
959
|
+
# `environment` `=`, `IN` (Use value `draft` for draft environment)
|
960
|
+
# `test_time` `>`, `<`
|
961
|
+
#
|
962
|
+
# `latest` only returns the latest test result in all results for each test
|
963
|
+
# case.
|
964
|
+
#
|
965
|
+
# Examples:
|
966
|
+
# * "environment=draft AND latest" matches the latest test result for each
|
967
|
+
# test case in the draft environment.
|
968
|
+
# * "environment IN (e1,e2)" matches any test case results with an
|
969
|
+
# environment resource name of either "e1" or "e2".
|
970
|
+
# * "test_time > 1602540713" matches any test case results with test time
|
971
|
+
# later than a unix timestamp in seconds 1602540713.
|
972
|
+
#
|
973
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
974
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::TestCaseResult>]
|
975
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
976
|
+
#
|
977
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::TestCaseResult>]
|
978
|
+
#
|
979
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
980
|
+
#
|
981
|
+
def list_test_case_results request, options = nil
|
982
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
983
|
+
|
984
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsRequest
|
985
|
+
|
986
|
+
# Converts hash and nil to an options object
|
987
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
988
|
+
|
989
|
+
# Customize the options with defaults
|
990
|
+
metadata = @config.rpcs.list_test_case_results.metadata.to_h
|
991
|
+
|
992
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
993
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
994
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
995
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
996
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
997
|
+
|
998
|
+
header_params = {
|
999
|
+
"parent" => request.parent
|
1000
|
+
}
|
1001
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1002
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1003
|
+
|
1004
|
+
options.apply_defaults timeout: @config.rpcs.list_test_case_results.timeout,
|
1005
|
+
metadata: metadata,
|
1006
|
+
retry_policy: @config.rpcs.list_test_case_results.retry_policy
|
1007
|
+
|
1008
|
+
options.apply_defaults timeout: @config.timeout,
|
1009
|
+
metadata: @config.metadata,
|
1010
|
+
retry_policy: @config.retry_policy
|
1011
|
+
|
1012
|
+
@test_cases_stub.call_rpc :list_test_case_results, request, options: options do |response, operation|
|
1013
|
+
response = ::Gapic::PagedEnumerable.new @test_cases_stub, :list_test_case_results, request, response, operation, options
|
1014
|
+
yield response, operation if block_given?
|
1015
|
+
return response
|
1016
|
+
end
|
1017
|
+
rescue ::GRPC::BadStatus => e
|
1018
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1019
|
+
end
|
1020
|
+
|
1021
|
+
##
|
1022
|
+
# Gets a test case result.
|
1023
|
+
#
|
1024
|
+
# @overload get_test_case_result(request, options = nil)
|
1025
|
+
# Pass arguments to `get_test_case_result` via a request object, either of type
|
1026
|
+
# {::Google::Cloud::Dialogflow::CX::V3::GetTestCaseResultRequest} or an equivalent Hash.
|
1027
|
+
#
|
1028
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::GetTestCaseResultRequest, ::Hash]
|
1029
|
+
# A request object representing the call parameters. Required. To specify no
|
1030
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1031
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1032
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1033
|
+
#
|
1034
|
+
# @overload get_test_case_result(name: nil)
|
1035
|
+
# Pass arguments to `get_test_case_result` via keyword arguments. Note that at
|
1036
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1037
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1038
|
+
#
|
1039
|
+
# @param name [::String]
|
1040
|
+
# Required. The name of the testcase.
|
1041
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
1042
|
+
# ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
|
1043
|
+
#
|
1044
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1045
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::TestCaseResult]
|
1046
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1047
|
+
#
|
1048
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::TestCaseResult]
|
1049
|
+
#
|
1050
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1051
|
+
#
|
1052
|
+
def get_test_case_result request, options = nil
|
1053
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1054
|
+
|
1055
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetTestCaseResultRequest
|
1056
|
+
|
1057
|
+
# Converts hash and nil to an options object
|
1058
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1059
|
+
|
1060
|
+
# Customize the options with defaults
|
1061
|
+
metadata = @config.rpcs.get_test_case_result.metadata.to_h
|
1062
|
+
|
1063
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1064
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1065
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1066
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
1067
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1068
|
+
|
1069
|
+
header_params = {
|
1070
|
+
"name" => request.name
|
1071
|
+
}
|
1072
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1073
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1074
|
+
|
1075
|
+
options.apply_defaults timeout: @config.rpcs.get_test_case_result.timeout,
|
1076
|
+
metadata: metadata,
|
1077
|
+
retry_policy: @config.rpcs.get_test_case_result.retry_policy
|
1078
|
+
|
1079
|
+
options.apply_defaults timeout: @config.timeout,
|
1080
|
+
metadata: @config.metadata,
|
1081
|
+
retry_policy: @config.retry_policy
|
1082
|
+
|
1083
|
+
@test_cases_stub.call_rpc :get_test_case_result, request, options: options do |response, operation|
|
1084
|
+
yield response, operation if block_given?
|
1085
|
+
return response
|
1086
|
+
end
|
1087
|
+
rescue ::GRPC::BadStatus => e
|
1088
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1089
|
+
end
|
1090
|
+
|
1091
|
+
##
|
1092
|
+
# Configuration class for the TestCases API.
|
1093
|
+
#
|
1094
|
+
# This class represents the configuration for TestCases,
|
1095
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1096
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1097
|
+
# applied individually to specific RPCs. See
|
1098
|
+
# {::Google::Cloud::Dialogflow::CX::V3::TestCases::Client::Configuration::Rpcs}
|
1099
|
+
# for a list of RPCs that can be configured independently.
|
1100
|
+
#
|
1101
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1102
|
+
# on construction.
|
1103
|
+
#
|
1104
|
+
# @example
|
1105
|
+
#
|
1106
|
+
# # Modify the global config, setting the timeout for
|
1107
|
+
# # list_test_cases to 20 seconds,
|
1108
|
+
# # and all remaining timeouts to 10 seconds.
|
1109
|
+
# ::Google::Cloud::Dialogflow::CX::V3::TestCases::Client.configure do |config|
|
1110
|
+
# config.timeout = 10.0
|
1111
|
+
# config.rpcs.list_test_cases.timeout = 20.0
|
1112
|
+
# end
|
1113
|
+
#
|
1114
|
+
# # Apply the above configuration only to a new client.
|
1115
|
+
# client = ::Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new do |config|
|
1116
|
+
# config.timeout = 10.0
|
1117
|
+
# config.rpcs.list_test_cases.timeout = 20.0
|
1118
|
+
# end
|
1119
|
+
#
|
1120
|
+
# @!attribute [rw] endpoint
|
1121
|
+
# The hostname or hostname:port of the service endpoint.
|
1122
|
+
# Defaults to `"dialogflow.googleapis.com"`.
|
1123
|
+
# @return [::String]
|
1124
|
+
# @!attribute [rw] credentials
|
1125
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1126
|
+
# * (`String`) The path to a service account key file in JSON format
|
1127
|
+
# * (`Hash`) A service account key as a Hash
|
1128
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1129
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1130
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1131
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1132
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1133
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1134
|
+
# * (`nil`) indicating no credentials
|
1135
|
+
# @return [::Object]
|
1136
|
+
# @!attribute [rw] scope
|
1137
|
+
# The OAuth scopes
|
1138
|
+
# @return [::Array<::String>]
|
1139
|
+
# @!attribute [rw] lib_name
|
1140
|
+
# The library name as recorded in instrumentation and logging
|
1141
|
+
# @return [::String]
|
1142
|
+
# @!attribute [rw] lib_version
|
1143
|
+
# The library version as recorded in instrumentation and logging
|
1144
|
+
# @return [::String]
|
1145
|
+
# @!attribute [rw] channel_args
|
1146
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1147
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1148
|
+
# @return [::Hash]
|
1149
|
+
# @!attribute [rw] interceptors
|
1150
|
+
# An array of interceptors that are run before calls are executed.
|
1151
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1152
|
+
# @!attribute [rw] timeout
|
1153
|
+
# The call timeout in seconds.
|
1154
|
+
# @return [::Numeric]
|
1155
|
+
# @!attribute [rw] metadata
|
1156
|
+
# Additional gRPC headers to be sent with the call.
|
1157
|
+
# @return [::Hash{::Symbol=>::String}]
|
1158
|
+
# @!attribute [rw] retry_policy
|
1159
|
+
# The retry policy. The value is a hash with the following keys:
|
1160
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1161
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1162
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1163
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1164
|
+
# trigger a retry.
|
1165
|
+
# @return [::Hash]
|
1166
|
+
# @!attribute [rw] quota_project
|
1167
|
+
# A separate project against which to charge quota.
|
1168
|
+
# @return [::String]
|
1169
|
+
#
|
1170
|
+
class Configuration
|
1171
|
+
extend ::Gapic::Config
|
1172
|
+
|
1173
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
1174
|
+
config_attr :credentials, nil do |value|
|
1175
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1176
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1177
|
+
allowed.any? { |klass| klass === value }
|
1178
|
+
end
|
1179
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1180
|
+
config_attr :lib_name, nil, ::String, nil
|
1181
|
+
config_attr :lib_version, nil, ::String, nil
|
1182
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1183
|
+
config_attr :interceptors, nil, ::Array, nil
|
1184
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1185
|
+
config_attr :metadata, nil, ::Hash, nil
|
1186
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1187
|
+
config_attr :quota_project, nil, ::String, nil
|
1188
|
+
|
1189
|
+
# @private
|
1190
|
+
def initialize parent_config = nil
|
1191
|
+
@parent_config = parent_config unless parent_config.nil?
|
1192
|
+
|
1193
|
+
yield self if block_given?
|
1194
|
+
end
|
1195
|
+
|
1196
|
+
##
|
1197
|
+
# Configurations for individual RPCs
|
1198
|
+
# @return [Rpcs]
|
1199
|
+
#
|
1200
|
+
def rpcs
|
1201
|
+
@rpcs ||= begin
|
1202
|
+
parent_rpcs = nil
|
1203
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1204
|
+
Rpcs.new parent_rpcs
|
1205
|
+
end
|
1206
|
+
end
|
1207
|
+
|
1208
|
+
##
|
1209
|
+
# Configuration RPC class for the TestCases API.
|
1210
|
+
#
|
1211
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1212
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1213
|
+
# the following configuration fields:
|
1214
|
+
#
|
1215
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1216
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1217
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1218
|
+
# include the following keys:
|
1219
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1220
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1221
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1222
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1223
|
+
# trigger a retry.
|
1224
|
+
#
|
1225
|
+
class Rpcs
|
1226
|
+
##
|
1227
|
+
# RPC-specific configuration for `list_test_cases`
|
1228
|
+
# @return [::Gapic::Config::Method]
|
1229
|
+
#
|
1230
|
+
attr_reader :list_test_cases
|
1231
|
+
##
|
1232
|
+
# RPC-specific configuration for `batch_delete_test_cases`
|
1233
|
+
# @return [::Gapic::Config::Method]
|
1234
|
+
#
|
1235
|
+
attr_reader :batch_delete_test_cases
|
1236
|
+
##
|
1237
|
+
# RPC-specific configuration for `get_test_case`
|
1238
|
+
# @return [::Gapic::Config::Method]
|
1239
|
+
#
|
1240
|
+
attr_reader :get_test_case
|
1241
|
+
##
|
1242
|
+
# RPC-specific configuration for `create_test_case`
|
1243
|
+
# @return [::Gapic::Config::Method]
|
1244
|
+
#
|
1245
|
+
attr_reader :create_test_case
|
1246
|
+
##
|
1247
|
+
# RPC-specific configuration for `update_test_case`
|
1248
|
+
# @return [::Gapic::Config::Method]
|
1249
|
+
#
|
1250
|
+
attr_reader :update_test_case
|
1251
|
+
##
|
1252
|
+
# RPC-specific configuration for `run_test_case`
|
1253
|
+
# @return [::Gapic::Config::Method]
|
1254
|
+
#
|
1255
|
+
attr_reader :run_test_case
|
1256
|
+
##
|
1257
|
+
# RPC-specific configuration for `batch_run_test_cases`
|
1258
|
+
# @return [::Gapic::Config::Method]
|
1259
|
+
#
|
1260
|
+
attr_reader :batch_run_test_cases
|
1261
|
+
##
|
1262
|
+
# RPC-specific configuration for `calculate_coverage`
|
1263
|
+
# @return [::Gapic::Config::Method]
|
1264
|
+
#
|
1265
|
+
attr_reader :calculate_coverage
|
1266
|
+
##
|
1267
|
+
# RPC-specific configuration for `import_test_cases`
|
1268
|
+
# @return [::Gapic::Config::Method]
|
1269
|
+
#
|
1270
|
+
attr_reader :import_test_cases
|
1271
|
+
##
|
1272
|
+
# RPC-specific configuration for `export_test_cases`
|
1273
|
+
# @return [::Gapic::Config::Method]
|
1274
|
+
#
|
1275
|
+
attr_reader :export_test_cases
|
1276
|
+
##
|
1277
|
+
# RPC-specific configuration for `list_test_case_results`
|
1278
|
+
# @return [::Gapic::Config::Method]
|
1279
|
+
#
|
1280
|
+
attr_reader :list_test_case_results
|
1281
|
+
##
|
1282
|
+
# RPC-specific configuration for `get_test_case_result`
|
1283
|
+
# @return [::Gapic::Config::Method]
|
1284
|
+
#
|
1285
|
+
attr_reader :get_test_case_result
|
1286
|
+
|
1287
|
+
# @private
|
1288
|
+
def initialize parent_rpcs = nil
|
1289
|
+
list_test_cases_config = parent_rpcs.list_test_cases if parent_rpcs.respond_to? :list_test_cases
|
1290
|
+
@list_test_cases = ::Gapic::Config::Method.new list_test_cases_config
|
1291
|
+
batch_delete_test_cases_config = parent_rpcs.batch_delete_test_cases if parent_rpcs.respond_to? :batch_delete_test_cases
|
1292
|
+
@batch_delete_test_cases = ::Gapic::Config::Method.new batch_delete_test_cases_config
|
1293
|
+
get_test_case_config = parent_rpcs.get_test_case if parent_rpcs.respond_to? :get_test_case
|
1294
|
+
@get_test_case = ::Gapic::Config::Method.new get_test_case_config
|
1295
|
+
create_test_case_config = parent_rpcs.create_test_case if parent_rpcs.respond_to? :create_test_case
|
1296
|
+
@create_test_case = ::Gapic::Config::Method.new create_test_case_config
|
1297
|
+
update_test_case_config = parent_rpcs.update_test_case if parent_rpcs.respond_to? :update_test_case
|
1298
|
+
@update_test_case = ::Gapic::Config::Method.new update_test_case_config
|
1299
|
+
run_test_case_config = parent_rpcs.run_test_case if parent_rpcs.respond_to? :run_test_case
|
1300
|
+
@run_test_case = ::Gapic::Config::Method.new run_test_case_config
|
1301
|
+
batch_run_test_cases_config = parent_rpcs.batch_run_test_cases if parent_rpcs.respond_to? :batch_run_test_cases
|
1302
|
+
@batch_run_test_cases = ::Gapic::Config::Method.new batch_run_test_cases_config
|
1303
|
+
calculate_coverage_config = parent_rpcs.calculate_coverage if parent_rpcs.respond_to? :calculate_coverage
|
1304
|
+
@calculate_coverage = ::Gapic::Config::Method.new calculate_coverage_config
|
1305
|
+
import_test_cases_config = parent_rpcs.import_test_cases if parent_rpcs.respond_to? :import_test_cases
|
1306
|
+
@import_test_cases = ::Gapic::Config::Method.new import_test_cases_config
|
1307
|
+
export_test_cases_config = parent_rpcs.export_test_cases if parent_rpcs.respond_to? :export_test_cases
|
1308
|
+
@export_test_cases = ::Gapic::Config::Method.new export_test_cases_config
|
1309
|
+
list_test_case_results_config = parent_rpcs.list_test_case_results if parent_rpcs.respond_to? :list_test_case_results
|
1310
|
+
@list_test_case_results = ::Gapic::Config::Method.new list_test_case_results_config
|
1311
|
+
get_test_case_result_config = parent_rpcs.get_test_case_result if parent_rpcs.respond_to? :get_test_case_result
|
1312
|
+
@get_test_case_result = ::Gapic::Config::Method.new get_test_case_result_config
|
1313
|
+
|
1314
|
+
yield self if block_given?
|
1315
|
+
end
|
1316
|
+
end
|
1317
|
+
end
|
1318
|
+
end
|
1319
|
+
end
|
1320
|
+
end
|
1321
|
+
end
|
1322
|
+
end
|
1323
|
+
end
|
1324
|
+
end
|