google-cloud-contact_center_insights-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +167 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google-cloud-contact_center_insights-v1.rb +21 -0
- data/lib/google/cloud/contact_center_insights/v1.rb +38 -0
- data/lib/google/cloud/contact_center_insights/v1/contact_center_insights.rb +50 -0
- data/lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb +2506 -0
- data/lib/google/cloud/contact_center_insights/v1/contact_center_insights/credentials.rb +47 -0
- data/lib/google/cloud/contact_center_insights/v1/contact_center_insights/operations.rb +664 -0
- data/lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb +211 -0
- data/lib/google/cloud/contact_center_insights/v1/version.rb +28 -0
- data/lib/google/cloud/contactcenterinsights/v1/contact_center_insights_pb.rb +273 -0
- data/lib/google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb.rb +102 -0
- data/lib/google/cloud/contactcenterinsights/v1/resources_pb.rb +408 -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/contactcenterinsights/v1/contact_center_insights.rb +685 -0
- data/proto_docs/google/cloud/contactcenterinsights/v1/resources.rb +1213 -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/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +220 -0
@@ -0,0 +1,21 @@
|
|
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
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/contact_center_insights/v1"
|
@@ -0,0 +1,38 @@
|
|
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/contact_center_insights/v1/contact_center_insights"
|
20
|
+
require "google/cloud/contact_center_insights/v1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module ContactCenterInsights
|
25
|
+
##
|
26
|
+
# To load this package, including all its services, and instantiate a client:
|
27
|
+
#
|
28
|
+
# require "google/cloud/contact_center_insights/v1"
|
29
|
+
# client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
|
30
|
+
#
|
31
|
+
module V1
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
helper_path = ::File.join __dir__, "v1", "_helpers.rb"
|
38
|
+
require "google/cloud/contact_center_insights/v1/_helpers" if ::File.file? helper_path
|
@@ -0,0 +1,50 @@
|
|
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 "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/contact_center_insights/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/contact_center_insights/v1/contact_center_insights/credentials"
|
26
|
+
require "google/cloud/contact_center_insights/v1/contact_center_insights/paths"
|
27
|
+
require "google/cloud/contact_center_insights/v1/contact_center_insights/operations"
|
28
|
+
require "google/cloud/contact_center_insights/v1/contact_center_insights/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module ContactCenterInsights
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# An API that lets users analyze and explore their business conversation data.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/contact_center_insights/v1/contact_center_insights"
|
40
|
+
# client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
|
41
|
+
#
|
42
|
+
module ContactCenterInsights
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
helper_path = ::File.join __dir__, "contact_center_insights", "helpers.rb"
|
50
|
+
require "google/cloud/contact_center_insights/v1/contact_center_insights/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,2506 @@
|
|
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/contactcenterinsights/v1/contact_center_insights_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module ContactCenterInsights
|
25
|
+
module V1
|
26
|
+
module ContactCenterInsights
|
27
|
+
##
|
28
|
+
# Client for the ContactCenterInsights service.
|
29
|
+
#
|
30
|
+
# An API that lets users analyze and explore their business conversation data.
|
31
|
+
#
|
32
|
+
class Client
|
33
|
+
include Paths
|
34
|
+
|
35
|
+
# @private
|
36
|
+
attr_reader :contact_center_insights_stub
|
37
|
+
|
38
|
+
##
|
39
|
+
# Configure the ContactCenterInsights Client class.
|
40
|
+
#
|
41
|
+
# See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration}
|
42
|
+
# for a description of the configuration fields.
|
43
|
+
#
|
44
|
+
# @example
|
45
|
+
#
|
46
|
+
# # Modify the configuration for all ContactCenterInsights clients
|
47
|
+
# ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
50
|
+
#
|
51
|
+
# @yield [config] Configure the Client client.
|
52
|
+
# @yieldparam config [Client::Configuration]
|
53
|
+
#
|
54
|
+
# @return [Client::Configuration]
|
55
|
+
#
|
56
|
+
def self.configure
|
57
|
+
@configure ||= begin
|
58
|
+
namespace = ["Google", "Cloud", "ContactCenterInsights", "V1"]
|
59
|
+
parent_config = while namespace.any?
|
60
|
+
parent_name = namespace.join "::"
|
61
|
+
parent_const = const_get parent_name
|
62
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
63
|
+
namespace.pop
|
64
|
+
end
|
65
|
+
default_config = Client::Configuration.new parent_config
|
66
|
+
|
67
|
+
default_config.timeout = 60.0
|
68
|
+
default_config.retry_policy = {
|
69
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
70
|
+
}
|
71
|
+
|
72
|
+
default_config
|
73
|
+
end
|
74
|
+
yield @configure if block_given?
|
75
|
+
@configure
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# Configure the ContactCenterInsights Client instance.
|
80
|
+
#
|
81
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
82
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
83
|
+
# should be made on {Client.configure}.
|
84
|
+
#
|
85
|
+
# See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration}
|
86
|
+
# for a description of the configuration fields.
|
87
|
+
#
|
88
|
+
# @yield [config] Configure the Client client.
|
89
|
+
# @yieldparam config [Client::Configuration]
|
90
|
+
#
|
91
|
+
# @return [Client::Configuration]
|
92
|
+
#
|
93
|
+
def configure
|
94
|
+
yield @config if block_given?
|
95
|
+
@config
|
96
|
+
end
|
97
|
+
|
98
|
+
##
|
99
|
+
# Create a new ContactCenterInsights client object.
|
100
|
+
#
|
101
|
+
# @example
|
102
|
+
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
|
105
|
+
#
|
106
|
+
# # Create a client using a custom configuration
|
107
|
+
# client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
110
|
+
#
|
111
|
+
# @yield [config] Configure the ContactCenterInsights client.
|
112
|
+
# @yieldparam config [Client::Configuration]
|
113
|
+
#
|
114
|
+
def initialize
|
115
|
+
# These require statements are intentionally placed here to initialize
|
116
|
+
# the gRPC module only when it's required.
|
117
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
118
|
+
require "gapic/grpc"
|
119
|
+
require "google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb"
|
120
|
+
|
121
|
+
# Create the configuration object
|
122
|
+
@config = Configuration.new Client.configure
|
123
|
+
|
124
|
+
# Yield the configuration if needed
|
125
|
+
yield @config if block_given?
|
126
|
+
|
127
|
+
# Create credentials
|
128
|
+
credentials = @config.credentials
|
129
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
130
|
+
# but only if the default endpoint does not have a region prefix.
|
131
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
132
|
+
!@config.endpoint.split(".").first.include?("-")
|
133
|
+
credentials ||= Credentials.default scope: @config.scope,
|
134
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
135
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
136
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
137
|
+
end
|
138
|
+
@quota_project_id = @config.quota_project
|
139
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
140
|
+
|
141
|
+
@operations_client = Operations.new do |config|
|
142
|
+
config.credentials = credentials
|
143
|
+
config.endpoint = @config.endpoint
|
144
|
+
end
|
145
|
+
|
146
|
+
@contact_center_insights_stub = ::Gapic::ServiceStub.new(
|
147
|
+
::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Stub,
|
148
|
+
credentials: credentials,
|
149
|
+
endpoint: @config.endpoint,
|
150
|
+
channel_args: @config.channel_args,
|
151
|
+
interceptors: @config.interceptors
|
152
|
+
)
|
153
|
+
end
|
154
|
+
|
155
|
+
##
|
156
|
+
# Get the associated client for long-running operations.
|
157
|
+
#
|
158
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations]
|
159
|
+
#
|
160
|
+
attr_reader :operations_client
|
161
|
+
|
162
|
+
# Service calls
|
163
|
+
|
164
|
+
##
|
165
|
+
# Creates a conversation.
|
166
|
+
#
|
167
|
+
# @overload create_conversation(request, options = nil)
|
168
|
+
# Pass arguments to `create_conversation` via a request object, either of type
|
169
|
+
# {::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest} or an equivalent Hash.
|
170
|
+
#
|
171
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest, ::Hash]
|
172
|
+
# A request object representing the call parameters. Required. To specify no
|
173
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
174
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
175
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
176
|
+
#
|
177
|
+
# @overload create_conversation(parent: nil, conversation: nil, conversation_id: nil)
|
178
|
+
# Pass arguments to `create_conversation` via keyword arguments. Note that at
|
179
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
180
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
181
|
+
#
|
182
|
+
# @param parent [::String]
|
183
|
+
# Required. The parent resource of the conversation.
|
184
|
+
# @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash]
|
185
|
+
# Required. The conversation resource to create.
|
186
|
+
# @param conversation_id [::String]
|
187
|
+
# A unique ID for the new conversation. This ID will become the final
|
188
|
+
# component of the conversation's resource name. If no ID is specified, a
|
189
|
+
# server-generated ID will be used.
|
190
|
+
#
|
191
|
+
# This value should be 4-32 characters and must match the regular
|
192
|
+
# expression /^[a-z0-9-]\\{4,32}$/. Valid characters are /[a-z][0-9]-/
|
193
|
+
#
|
194
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
195
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation]
|
196
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
197
|
+
#
|
198
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::Conversation]
|
199
|
+
#
|
200
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
201
|
+
#
|
202
|
+
def create_conversation request, options = nil
|
203
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
204
|
+
|
205
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest
|
206
|
+
|
207
|
+
# Converts hash and nil to an options object
|
208
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
209
|
+
|
210
|
+
# Customize the options with defaults
|
211
|
+
metadata = @config.rpcs.create_conversation.metadata.to_h
|
212
|
+
|
213
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
214
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
215
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
216
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
217
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
218
|
+
|
219
|
+
header_params = {
|
220
|
+
"parent" => request.parent
|
221
|
+
}
|
222
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
223
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
224
|
+
|
225
|
+
options.apply_defaults timeout: @config.rpcs.create_conversation.timeout,
|
226
|
+
metadata: metadata,
|
227
|
+
retry_policy: @config.rpcs.create_conversation.retry_policy
|
228
|
+
|
229
|
+
options.apply_defaults timeout: @config.timeout,
|
230
|
+
metadata: @config.metadata,
|
231
|
+
retry_policy: @config.retry_policy
|
232
|
+
|
233
|
+
@contact_center_insights_stub.call_rpc :create_conversation, request, options: options do |response, operation|
|
234
|
+
yield response, operation if block_given?
|
235
|
+
return response
|
236
|
+
end
|
237
|
+
rescue ::GRPC::BadStatus => e
|
238
|
+
raise ::Google::Cloud::Error.from_error(e)
|
239
|
+
end
|
240
|
+
|
241
|
+
##
|
242
|
+
# Updates a conversation.
|
243
|
+
#
|
244
|
+
# @overload update_conversation(request, options = nil)
|
245
|
+
# Pass arguments to `update_conversation` via a request object, either of type
|
246
|
+
# {::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest} or an equivalent Hash.
|
247
|
+
#
|
248
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest, ::Hash]
|
249
|
+
# A request object representing the call parameters. Required. To specify no
|
250
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
251
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
252
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
253
|
+
#
|
254
|
+
# @overload update_conversation(conversation: nil, update_mask: nil)
|
255
|
+
# Pass arguments to `update_conversation` via keyword arguments. Note that at
|
256
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
257
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
258
|
+
#
|
259
|
+
# @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash]
|
260
|
+
# Required. The new values for the conversation.
|
261
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
262
|
+
# The list of fields to be updated.
|
263
|
+
#
|
264
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
265
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation]
|
266
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
267
|
+
#
|
268
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::Conversation]
|
269
|
+
#
|
270
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
271
|
+
#
|
272
|
+
def update_conversation request, options = nil
|
273
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
274
|
+
|
275
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest
|
276
|
+
|
277
|
+
# Converts hash and nil to an options object
|
278
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
279
|
+
|
280
|
+
# Customize the options with defaults
|
281
|
+
metadata = @config.rpcs.update_conversation.metadata.to_h
|
282
|
+
|
283
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
284
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
285
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
286
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
287
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
288
|
+
|
289
|
+
header_params = {
|
290
|
+
"conversation.name" => request.conversation.name
|
291
|
+
}
|
292
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
293
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
294
|
+
|
295
|
+
options.apply_defaults timeout: @config.rpcs.update_conversation.timeout,
|
296
|
+
metadata: metadata,
|
297
|
+
retry_policy: @config.rpcs.update_conversation.retry_policy
|
298
|
+
|
299
|
+
options.apply_defaults timeout: @config.timeout,
|
300
|
+
metadata: @config.metadata,
|
301
|
+
retry_policy: @config.retry_policy
|
302
|
+
|
303
|
+
@contact_center_insights_stub.call_rpc :update_conversation, request, options: options do |response, operation|
|
304
|
+
yield response, operation if block_given?
|
305
|
+
return response
|
306
|
+
end
|
307
|
+
rescue ::GRPC::BadStatus => e
|
308
|
+
raise ::Google::Cloud::Error.from_error(e)
|
309
|
+
end
|
310
|
+
|
311
|
+
##
|
312
|
+
# Gets a conversation.
|
313
|
+
#
|
314
|
+
# @overload get_conversation(request, options = nil)
|
315
|
+
# Pass arguments to `get_conversation` via a request object, either of type
|
316
|
+
# {::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest} or an equivalent Hash.
|
317
|
+
#
|
318
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest, ::Hash]
|
319
|
+
# A request object representing the call parameters. Required. To specify no
|
320
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
321
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
322
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
323
|
+
#
|
324
|
+
# @overload get_conversation(name: nil, view: nil)
|
325
|
+
# Pass arguments to `get_conversation` via keyword arguments. Note that at
|
326
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
327
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
328
|
+
#
|
329
|
+
# @param name [::String]
|
330
|
+
# Required. The name of the conversation to get.
|
331
|
+
# @param view [::Google::Cloud::ContactCenterInsights::V1::ConversationView]
|
332
|
+
# The level of details of the conversation. Default is `FULL`.
|
333
|
+
#
|
334
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
335
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation]
|
336
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
337
|
+
#
|
338
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::Conversation]
|
339
|
+
#
|
340
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
341
|
+
#
|
342
|
+
def get_conversation request, options = nil
|
343
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
344
|
+
|
345
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest
|
346
|
+
|
347
|
+
# Converts hash and nil to an options object
|
348
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
349
|
+
|
350
|
+
# Customize the options with defaults
|
351
|
+
metadata = @config.rpcs.get_conversation.metadata.to_h
|
352
|
+
|
353
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
354
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
355
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
356
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
357
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
358
|
+
|
359
|
+
header_params = {
|
360
|
+
"name" => request.name
|
361
|
+
}
|
362
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
363
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
364
|
+
|
365
|
+
options.apply_defaults timeout: @config.rpcs.get_conversation.timeout,
|
366
|
+
metadata: metadata,
|
367
|
+
retry_policy: @config.rpcs.get_conversation.retry_policy
|
368
|
+
|
369
|
+
options.apply_defaults timeout: @config.timeout,
|
370
|
+
metadata: @config.metadata,
|
371
|
+
retry_policy: @config.retry_policy
|
372
|
+
|
373
|
+
@contact_center_insights_stub.call_rpc :get_conversation, request, options: options do |response, operation|
|
374
|
+
yield response, operation if block_given?
|
375
|
+
return response
|
376
|
+
end
|
377
|
+
rescue ::GRPC::BadStatus => e
|
378
|
+
raise ::Google::Cloud::Error.from_error(e)
|
379
|
+
end
|
380
|
+
|
381
|
+
##
|
382
|
+
# Lists conversations.
|
383
|
+
#
|
384
|
+
# @overload list_conversations(request, options = nil)
|
385
|
+
# Pass arguments to `list_conversations` via a request object, either of type
|
386
|
+
# {::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest} or an equivalent Hash.
|
387
|
+
#
|
388
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest, ::Hash]
|
389
|
+
# A request object representing the call parameters. Required. To specify no
|
390
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
391
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
392
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
393
|
+
#
|
394
|
+
# @overload list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil)
|
395
|
+
# Pass arguments to `list_conversations` via keyword arguments. Note that at
|
396
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
397
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
398
|
+
#
|
399
|
+
# @param parent [::String]
|
400
|
+
# Required. The parent resource of the conversation.
|
401
|
+
# @param page_size [::Integer]
|
402
|
+
# The maximum number of conversations to return in the response. If this
|
403
|
+
# value is zero, the service will select a default size. A call might return
|
404
|
+
# fewer objects than requested. A non-empty `next_page_token` in the response
|
405
|
+
# indicates that more data is available.
|
406
|
+
# @param page_token [::String]
|
407
|
+
# The value returned by the last `ListConversationsResponse`. This value
|
408
|
+
# indicates that this is a continuation of a prior `ListConversations` call
|
409
|
+
# and that the system should return the next page of data.
|
410
|
+
# @param filter [::String]
|
411
|
+
# A filter to reduce results to a specific subset. Useful for querying
|
412
|
+
# conversations with specific properties.
|
413
|
+
# @param view [::Google::Cloud::ContactCenterInsights::V1::ConversationView]
|
414
|
+
# The level of details of the conversation. Default is `BASIC`.
|
415
|
+
#
|
416
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
417
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>]
|
418
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
419
|
+
#
|
420
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>]
|
421
|
+
#
|
422
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
423
|
+
#
|
424
|
+
def list_conversations request, options = nil
|
425
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
426
|
+
|
427
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest
|
428
|
+
|
429
|
+
# Converts hash and nil to an options object
|
430
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
431
|
+
|
432
|
+
# Customize the options with defaults
|
433
|
+
metadata = @config.rpcs.list_conversations.metadata.to_h
|
434
|
+
|
435
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
436
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
437
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
438
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
439
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
440
|
+
|
441
|
+
header_params = {
|
442
|
+
"parent" => request.parent
|
443
|
+
}
|
444
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
445
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
446
|
+
|
447
|
+
options.apply_defaults timeout: @config.rpcs.list_conversations.timeout,
|
448
|
+
metadata: metadata,
|
449
|
+
retry_policy: @config.rpcs.list_conversations.retry_policy
|
450
|
+
|
451
|
+
options.apply_defaults timeout: @config.timeout,
|
452
|
+
metadata: @config.metadata,
|
453
|
+
retry_policy: @config.retry_policy
|
454
|
+
|
455
|
+
@contact_center_insights_stub.call_rpc :list_conversations, request, options: options do |response, operation|
|
456
|
+
response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_conversations, request, response, operation, options
|
457
|
+
yield response, operation if block_given?
|
458
|
+
return response
|
459
|
+
end
|
460
|
+
rescue ::GRPC::BadStatus => e
|
461
|
+
raise ::Google::Cloud::Error.from_error(e)
|
462
|
+
end
|
463
|
+
|
464
|
+
##
|
465
|
+
# Deletes a conversation.
|
466
|
+
#
|
467
|
+
# @overload delete_conversation(request, options = nil)
|
468
|
+
# Pass arguments to `delete_conversation` via a request object, either of type
|
469
|
+
# {::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest} or an equivalent Hash.
|
470
|
+
#
|
471
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest, ::Hash]
|
472
|
+
# A request object representing the call parameters. Required. To specify no
|
473
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
474
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
475
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
476
|
+
#
|
477
|
+
# @overload delete_conversation(name: nil, force: nil)
|
478
|
+
# Pass arguments to `delete_conversation` via keyword arguments. Note that at
|
479
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
480
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
481
|
+
#
|
482
|
+
# @param name [::String]
|
483
|
+
# Required. The name of the conversation to delete.
|
484
|
+
# @param force [::Boolean]
|
485
|
+
# If set to true, all of this conversation's analyses will also be deleted.
|
486
|
+
# Otherwise, the request will only succeed if the conversation has no
|
487
|
+
# analyses.
|
488
|
+
#
|
489
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
490
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
491
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
492
|
+
#
|
493
|
+
# @return [::Google::Protobuf::Empty]
|
494
|
+
#
|
495
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
496
|
+
#
|
497
|
+
def delete_conversation request, options = nil
|
498
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
499
|
+
|
500
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest
|
501
|
+
|
502
|
+
# Converts hash and nil to an options object
|
503
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
504
|
+
|
505
|
+
# Customize the options with defaults
|
506
|
+
metadata = @config.rpcs.delete_conversation.metadata.to_h
|
507
|
+
|
508
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
509
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
510
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
511
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
512
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
513
|
+
|
514
|
+
header_params = {
|
515
|
+
"name" => request.name
|
516
|
+
}
|
517
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
518
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
519
|
+
|
520
|
+
options.apply_defaults timeout: @config.rpcs.delete_conversation.timeout,
|
521
|
+
metadata: metadata,
|
522
|
+
retry_policy: @config.rpcs.delete_conversation.retry_policy
|
523
|
+
|
524
|
+
options.apply_defaults timeout: @config.timeout,
|
525
|
+
metadata: @config.metadata,
|
526
|
+
retry_policy: @config.retry_policy
|
527
|
+
|
528
|
+
@contact_center_insights_stub.call_rpc :delete_conversation, request, options: options do |response, operation|
|
529
|
+
yield response, operation if block_given?
|
530
|
+
return response
|
531
|
+
end
|
532
|
+
rescue ::GRPC::BadStatus => e
|
533
|
+
raise ::Google::Cloud::Error.from_error(e)
|
534
|
+
end
|
535
|
+
|
536
|
+
##
|
537
|
+
# Creates an analysis. The long running operation is done when the analysis
|
538
|
+
# has completed.
|
539
|
+
#
|
540
|
+
# @overload create_analysis(request, options = nil)
|
541
|
+
# Pass arguments to `create_analysis` via a request object, either of type
|
542
|
+
# {::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest} or an equivalent Hash.
|
543
|
+
#
|
544
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest, ::Hash]
|
545
|
+
# A request object representing the call parameters. Required. To specify no
|
546
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
547
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
548
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
549
|
+
#
|
550
|
+
# @overload create_analysis(parent: nil, analysis: nil)
|
551
|
+
# Pass arguments to `create_analysis` via keyword arguments. Note that at
|
552
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
553
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
554
|
+
#
|
555
|
+
# @param parent [::String]
|
556
|
+
# Required. The parent resource of the analysis.
|
557
|
+
# @param analysis [::Google::Cloud::ContactCenterInsights::V1::Analysis, ::Hash]
|
558
|
+
# Required. The analysis to create.
|
559
|
+
#
|
560
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
561
|
+
# @yieldparam response [::Gapic::Operation]
|
562
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
563
|
+
#
|
564
|
+
# @return [::Gapic::Operation]
|
565
|
+
#
|
566
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
567
|
+
#
|
568
|
+
def create_analysis request, options = nil
|
569
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
570
|
+
|
571
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest
|
572
|
+
|
573
|
+
# Converts hash and nil to an options object
|
574
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
575
|
+
|
576
|
+
# Customize the options with defaults
|
577
|
+
metadata = @config.rpcs.create_analysis.metadata.to_h
|
578
|
+
|
579
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
580
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
581
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
582
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
583
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
584
|
+
|
585
|
+
header_params = {
|
586
|
+
"parent" => request.parent
|
587
|
+
}
|
588
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
589
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
590
|
+
|
591
|
+
options.apply_defaults timeout: @config.rpcs.create_analysis.timeout,
|
592
|
+
metadata: metadata,
|
593
|
+
retry_policy: @config.rpcs.create_analysis.retry_policy
|
594
|
+
|
595
|
+
options.apply_defaults timeout: @config.timeout,
|
596
|
+
metadata: @config.metadata,
|
597
|
+
retry_policy: @config.retry_policy
|
598
|
+
|
599
|
+
@contact_center_insights_stub.call_rpc :create_analysis, request, options: options do |response, operation|
|
600
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
|
+
yield response, operation if block_given?
|
602
|
+
return response
|
603
|
+
end
|
604
|
+
rescue ::GRPC::BadStatus => e
|
605
|
+
raise ::Google::Cloud::Error.from_error(e)
|
606
|
+
end
|
607
|
+
|
608
|
+
##
|
609
|
+
# Gets an analysis.
|
610
|
+
#
|
611
|
+
# @overload get_analysis(request, options = nil)
|
612
|
+
# Pass arguments to `get_analysis` via a request object, either of type
|
613
|
+
# {::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest} or an equivalent Hash.
|
614
|
+
#
|
615
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest, ::Hash]
|
616
|
+
# A request object representing the call parameters. Required. To specify no
|
617
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
618
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
619
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
620
|
+
#
|
621
|
+
# @overload get_analysis(name: nil)
|
622
|
+
# Pass arguments to `get_analysis` via keyword arguments. Note that at
|
623
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
624
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
625
|
+
#
|
626
|
+
# @param name [::String]
|
627
|
+
# Required. The name of the analysis to get.
|
628
|
+
#
|
629
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
630
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Analysis]
|
631
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
632
|
+
#
|
633
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::Analysis]
|
634
|
+
#
|
635
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
636
|
+
#
|
637
|
+
def get_analysis request, options = nil
|
638
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
639
|
+
|
640
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest
|
641
|
+
|
642
|
+
# Converts hash and nil to an options object
|
643
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
644
|
+
|
645
|
+
# Customize the options with defaults
|
646
|
+
metadata = @config.rpcs.get_analysis.metadata.to_h
|
647
|
+
|
648
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
649
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
650
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
651
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
652
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
653
|
+
|
654
|
+
header_params = {
|
655
|
+
"name" => request.name
|
656
|
+
}
|
657
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
658
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
659
|
+
|
660
|
+
options.apply_defaults timeout: @config.rpcs.get_analysis.timeout,
|
661
|
+
metadata: metadata,
|
662
|
+
retry_policy: @config.rpcs.get_analysis.retry_policy
|
663
|
+
|
664
|
+
options.apply_defaults timeout: @config.timeout,
|
665
|
+
metadata: @config.metadata,
|
666
|
+
retry_policy: @config.retry_policy
|
667
|
+
|
668
|
+
@contact_center_insights_stub.call_rpc :get_analysis, request, options: options do |response, operation|
|
669
|
+
yield response, operation if block_given?
|
670
|
+
return response
|
671
|
+
end
|
672
|
+
rescue ::GRPC::BadStatus => e
|
673
|
+
raise ::Google::Cloud::Error.from_error(e)
|
674
|
+
end
|
675
|
+
|
676
|
+
##
|
677
|
+
# Lists analyses.
|
678
|
+
#
|
679
|
+
# @overload list_analyses(request, options = nil)
|
680
|
+
# Pass arguments to `list_analyses` via a request object, either of type
|
681
|
+
# {::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest} or an equivalent Hash.
|
682
|
+
#
|
683
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest, ::Hash]
|
684
|
+
# A request object representing the call parameters. Required. To specify no
|
685
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
686
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
687
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
688
|
+
#
|
689
|
+
# @overload list_analyses(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
690
|
+
# Pass arguments to `list_analyses` via keyword arguments. Note that at
|
691
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
692
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
693
|
+
#
|
694
|
+
# @param parent [::String]
|
695
|
+
# Required. The parent resource of the analyses.
|
696
|
+
# @param page_size [::Integer]
|
697
|
+
# The maximum number of analyses to return in the response. If this
|
698
|
+
# value is zero, the service will select a default size. A call might return
|
699
|
+
# fewer objects than requested. A non-empty `next_page_token` in the response
|
700
|
+
# indicates that more data is available.
|
701
|
+
# @param page_token [::String]
|
702
|
+
# The value returned by the last `ListAnalysesResponse`; indicates
|
703
|
+
# that this is a continuation of a prior `ListAnalyses` call and
|
704
|
+
# the system should return the next page of data.
|
705
|
+
# @param filter [::String]
|
706
|
+
# A filter to reduce results to a specific subset. Useful for querying
|
707
|
+
# conversations with specific properties.
|
708
|
+
#
|
709
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
710
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>]
|
711
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
712
|
+
#
|
713
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>]
|
714
|
+
#
|
715
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
716
|
+
#
|
717
|
+
def list_analyses request, options = nil
|
718
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
719
|
+
|
720
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest
|
721
|
+
|
722
|
+
# Converts hash and nil to an options object
|
723
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
724
|
+
|
725
|
+
# Customize the options with defaults
|
726
|
+
metadata = @config.rpcs.list_analyses.metadata.to_h
|
727
|
+
|
728
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
729
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
730
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
731
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
732
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
733
|
+
|
734
|
+
header_params = {
|
735
|
+
"parent" => request.parent
|
736
|
+
}
|
737
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
738
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
739
|
+
|
740
|
+
options.apply_defaults timeout: @config.rpcs.list_analyses.timeout,
|
741
|
+
metadata: metadata,
|
742
|
+
retry_policy: @config.rpcs.list_analyses.retry_policy
|
743
|
+
|
744
|
+
options.apply_defaults timeout: @config.timeout,
|
745
|
+
metadata: @config.metadata,
|
746
|
+
retry_policy: @config.retry_policy
|
747
|
+
|
748
|
+
@contact_center_insights_stub.call_rpc :list_analyses, request, options: options do |response, operation|
|
749
|
+
response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_analyses, request, response, operation, options
|
750
|
+
yield response, operation if block_given?
|
751
|
+
return response
|
752
|
+
end
|
753
|
+
rescue ::GRPC::BadStatus => e
|
754
|
+
raise ::Google::Cloud::Error.from_error(e)
|
755
|
+
end
|
756
|
+
|
757
|
+
##
|
758
|
+
# Deletes an analysis.
|
759
|
+
#
|
760
|
+
# @overload delete_analysis(request, options = nil)
|
761
|
+
# Pass arguments to `delete_analysis` via a request object, either of type
|
762
|
+
# {::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest} or an equivalent Hash.
|
763
|
+
#
|
764
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest, ::Hash]
|
765
|
+
# A request object representing the call parameters. Required. To specify no
|
766
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
767
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
768
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
769
|
+
#
|
770
|
+
# @overload delete_analysis(name: nil)
|
771
|
+
# Pass arguments to `delete_analysis` via keyword arguments. Note that at
|
772
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
773
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
774
|
+
#
|
775
|
+
# @param name [::String]
|
776
|
+
# Required. The name of the analysis to delete.
|
777
|
+
#
|
778
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
779
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
780
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
781
|
+
#
|
782
|
+
# @return [::Google::Protobuf::Empty]
|
783
|
+
#
|
784
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
785
|
+
#
|
786
|
+
def delete_analysis request, options = nil
|
787
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
788
|
+
|
789
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest
|
790
|
+
|
791
|
+
# Converts hash and nil to an options object
|
792
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
793
|
+
|
794
|
+
# Customize the options with defaults
|
795
|
+
metadata = @config.rpcs.delete_analysis.metadata.to_h
|
796
|
+
|
797
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
798
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
799
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
800
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
801
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
802
|
+
|
803
|
+
header_params = {
|
804
|
+
"name" => request.name
|
805
|
+
}
|
806
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
807
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
808
|
+
|
809
|
+
options.apply_defaults timeout: @config.rpcs.delete_analysis.timeout,
|
810
|
+
metadata: metadata,
|
811
|
+
retry_policy: @config.rpcs.delete_analysis.retry_policy
|
812
|
+
|
813
|
+
options.apply_defaults timeout: @config.timeout,
|
814
|
+
metadata: @config.metadata,
|
815
|
+
retry_policy: @config.retry_policy
|
816
|
+
|
817
|
+
@contact_center_insights_stub.call_rpc :delete_analysis, request, options: options do |response, operation|
|
818
|
+
yield response, operation if block_given?
|
819
|
+
return response
|
820
|
+
end
|
821
|
+
rescue ::GRPC::BadStatus => e
|
822
|
+
raise ::Google::Cloud::Error.from_error(e)
|
823
|
+
end
|
824
|
+
|
825
|
+
##
|
826
|
+
# Export insights data to a destination defined in the request body.
|
827
|
+
#
|
828
|
+
# @overload export_insights_data(request, options = nil)
|
829
|
+
# Pass arguments to `export_insights_data` via a request object, either of type
|
830
|
+
# {::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest} or an equivalent Hash.
|
831
|
+
#
|
832
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest, ::Hash]
|
833
|
+
# A request object representing the call parameters. Required. To specify no
|
834
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
835
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
836
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
837
|
+
#
|
838
|
+
# @overload export_insights_data(big_query_destination: nil, parent: nil, filter: nil, kms_key: nil)
|
839
|
+
# Pass arguments to `export_insights_data` via keyword arguments. Note that at
|
840
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
841
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
842
|
+
#
|
843
|
+
# @param big_query_destination [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::BigQueryDestination, ::Hash]
|
844
|
+
# Specified if sink is a BigQuery table.
|
845
|
+
# @param parent [::String]
|
846
|
+
# Required. The parent resource to export data from.
|
847
|
+
# @param filter [::String]
|
848
|
+
# A filter to reduce results to a specific subset. Useful for exporting
|
849
|
+
# conversations with specific properties.
|
850
|
+
# @param kms_key [::String]
|
851
|
+
# A fully qualified KMS key name for BigQuery tables protected by CMEK.
|
852
|
+
# Format:
|
853
|
+
# projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}/cryptoKeyVersions/\\{version}
|
854
|
+
#
|
855
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
856
|
+
# @yieldparam response [::Gapic::Operation]
|
857
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
858
|
+
#
|
859
|
+
# @return [::Gapic::Operation]
|
860
|
+
#
|
861
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
862
|
+
#
|
863
|
+
def export_insights_data request, options = nil
|
864
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
865
|
+
|
866
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest
|
867
|
+
|
868
|
+
# Converts hash and nil to an options object
|
869
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
870
|
+
|
871
|
+
# Customize the options with defaults
|
872
|
+
metadata = @config.rpcs.export_insights_data.metadata.to_h
|
873
|
+
|
874
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
875
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
876
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
877
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
878
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
879
|
+
|
880
|
+
header_params = {
|
881
|
+
"parent" => request.parent
|
882
|
+
}
|
883
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
884
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
885
|
+
|
886
|
+
options.apply_defaults timeout: @config.rpcs.export_insights_data.timeout,
|
887
|
+
metadata: metadata,
|
888
|
+
retry_policy: @config.rpcs.export_insights_data.retry_policy
|
889
|
+
|
890
|
+
options.apply_defaults timeout: @config.timeout,
|
891
|
+
metadata: @config.metadata,
|
892
|
+
retry_policy: @config.retry_policy
|
893
|
+
|
894
|
+
@contact_center_insights_stub.call_rpc :export_insights_data, request, options: options do |response, operation|
|
895
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
896
|
+
yield response, operation if block_given?
|
897
|
+
return response
|
898
|
+
end
|
899
|
+
rescue ::GRPC::BadStatus => e
|
900
|
+
raise ::Google::Cloud::Error.from_error(e)
|
901
|
+
end
|
902
|
+
|
903
|
+
##
|
904
|
+
# Creates an issue model.
|
905
|
+
#
|
906
|
+
# @overload create_issue_model(request, options = nil)
|
907
|
+
# Pass arguments to `create_issue_model` via a request object, either of type
|
908
|
+
# {::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest} or an equivalent Hash.
|
909
|
+
#
|
910
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest, ::Hash]
|
911
|
+
# A request object representing the call parameters. Required. To specify no
|
912
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
913
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
914
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
915
|
+
#
|
916
|
+
# @overload create_issue_model(parent: nil, issue_model: nil)
|
917
|
+
# Pass arguments to `create_issue_model` via keyword arguments. Note that at
|
918
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
919
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
920
|
+
#
|
921
|
+
# @param parent [::String]
|
922
|
+
# Required. The parent resource of the issue model.
|
923
|
+
# @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash]
|
924
|
+
# Required. The issue model to create.
|
925
|
+
#
|
926
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
927
|
+
# @yieldparam response [::Gapic::Operation]
|
928
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
929
|
+
#
|
930
|
+
# @return [::Gapic::Operation]
|
931
|
+
#
|
932
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
933
|
+
#
|
934
|
+
def create_issue_model request, options = nil
|
935
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
936
|
+
|
937
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest
|
938
|
+
|
939
|
+
# Converts hash and nil to an options object
|
940
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
941
|
+
|
942
|
+
# Customize the options with defaults
|
943
|
+
metadata = @config.rpcs.create_issue_model.metadata.to_h
|
944
|
+
|
945
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
946
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
947
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
948
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
949
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
950
|
+
|
951
|
+
header_params = {
|
952
|
+
"parent" => request.parent
|
953
|
+
}
|
954
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
955
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
956
|
+
|
957
|
+
options.apply_defaults timeout: @config.rpcs.create_issue_model.timeout,
|
958
|
+
metadata: metadata,
|
959
|
+
retry_policy: @config.rpcs.create_issue_model.retry_policy
|
960
|
+
|
961
|
+
options.apply_defaults timeout: @config.timeout,
|
962
|
+
metadata: @config.metadata,
|
963
|
+
retry_policy: @config.retry_policy
|
964
|
+
|
965
|
+
@contact_center_insights_stub.call_rpc :create_issue_model, request, options: options do |response, operation|
|
966
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
967
|
+
yield response, operation if block_given?
|
968
|
+
return response
|
969
|
+
end
|
970
|
+
rescue ::GRPC::BadStatus => e
|
971
|
+
raise ::Google::Cloud::Error.from_error(e)
|
972
|
+
end
|
973
|
+
|
974
|
+
##
|
975
|
+
# Updates an issue model.
|
976
|
+
#
|
977
|
+
# @overload update_issue_model(request, options = nil)
|
978
|
+
# Pass arguments to `update_issue_model` via a request object, either of type
|
979
|
+
# {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest} or an equivalent Hash.
|
980
|
+
#
|
981
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest, ::Hash]
|
982
|
+
# A request object representing the call parameters. Required. To specify no
|
983
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
984
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
985
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
986
|
+
#
|
987
|
+
# @overload update_issue_model(issue_model: nil, update_mask: nil)
|
988
|
+
# Pass arguments to `update_issue_model` via keyword arguments. Note that at
|
989
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
990
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
991
|
+
#
|
992
|
+
# @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash]
|
993
|
+
# Required. The new values for the issue model.
|
994
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
995
|
+
# The list of fields to be updated.
|
996
|
+
#
|
997
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
998
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::IssueModel]
|
999
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1000
|
+
#
|
1001
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel]
|
1002
|
+
#
|
1003
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1004
|
+
#
|
1005
|
+
def update_issue_model request, options = nil
|
1006
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1007
|
+
|
1008
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest
|
1009
|
+
|
1010
|
+
# Converts hash and nil to an options object
|
1011
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1012
|
+
|
1013
|
+
# Customize the options with defaults
|
1014
|
+
metadata = @config.rpcs.update_issue_model.metadata.to_h
|
1015
|
+
|
1016
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1017
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1018
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1019
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1020
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1021
|
+
|
1022
|
+
header_params = {
|
1023
|
+
"issue_model.name" => request.issue_model.name
|
1024
|
+
}
|
1025
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1026
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1027
|
+
|
1028
|
+
options.apply_defaults timeout: @config.rpcs.update_issue_model.timeout,
|
1029
|
+
metadata: metadata,
|
1030
|
+
retry_policy: @config.rpcs.update_issue_model.retry_policy
|
1031
|
+
|
1032
|
+
options.apply_defaults timeout: @config.timeout,
|
1033
|
+
metadata: @config.metadata,
|
1034
|
+
retry_policy: @config.retry_policy
|
1035
|
+
|
1036
|
+
@contact_center_insights_stub.call_rpc :update_issue_model, request, options: options do |response, operation|
|
1037
|
+
yield response, operation if block_given?
|
1038
|
+
return response
|
1039
|
+
end
|
1040
|
+
rescue ::GRPC::BadStatus => e
|
1041
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1042
|
+
end
|
1043
|
+
|
1044
|
+
##
|
1045
|
+
# Gets an issue model.
|
1046
|
+
#
|
1047
|
+
# @overload get_issue_model(request, options = nil)
|
1048
|
+
# Pass arguments to `get_issue_model` via a request object, either of type
|
1049
|
+
# {::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest} or an equivalent Hash.
|
1050
|
+
#
|
1051
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest, ::Hash]
|
1052
|
+
# A request object representing the call parameters. Required. To specify no
|
1053
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1054
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1055
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1056
|
+
#
|
1057
|
+
# @overload get_issue_model(name: nil)
|
1058
|
+
# Pass arguments to `get_issue_model` via keyword arguments. Note that at
|
1059
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1060
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1061
|
+
#
|
1062
|
+
# @param name [::String]
|
1063
|
+
# Required. The name of the issue model to get.
|
1064
|
+
#
|
1065
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1066
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::IssueModel]
|
1067
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1068
|
+
#
|
1069
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel]
|
1070
|
+
#
|
1071
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1072
|
+
#
|
1073
|
+
def get_issue_model request, options = nil
|
1074
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1075
|
+
|
1076
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest
|
1077
|
+
|
1078
|
+
# Converts hash and nil to an options object
|
1079
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1080
|
+
|
1081
|
+
# Customize the options with defaults
|
1082
|
+
metadata = @config.rpcs.get_issue_model.metadata.to_h
|
1083
|
+
|
1084
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1085
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1086
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1087
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1088
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1089
|
+
|
1090
|
+
header_params = {
|
1091
|
+
"name" => request.name
|
1092
|
+
}
|
1093
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1094
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1095
|
+
|
1096
|
+
options.apply_defaults timeout: @config.rpcs.get_issue_model.timeout,
|
1097
|
+
metadata: metadata,
|
1098
|
+
retry_policy: @config.rpcs.get_issue_model.retry_policy
|
1099
|
+
|
1100
|
+
options.apply_defaults timeout: @config.timeout,
|
1101
|
+
metadata: @config.metadata,
|
1102
|
+
retry_policy: @config.retry_policy
|
1103
|
+
|
1104
|
+
@contact_center_insights_stub.call_rpc :get_issue_model, request, options: options do |response, operation|
|
1105
|
+
yield response, operation if block_given?
|
1106
|
+
return response
|
1107
|
+
end
|
1108
|
+
rescue ::GRPC::BadStatus => e
|
1109
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
##
|
1113
|
+
# Lists issue models.
|
1114
|
+
#
|
1115
|
+
# @overload list_issue_models(request, options = nil)
|
1116
|
+
# Pass arguments to `list_issue_models` via a request object, either of type
|
1117
|
+
# {::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest} or an equivalent Hash.
|
1118
|
+
#
|
1119
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest, ::Hash]
|
1120
|
+
# A request object representing the call parameters. Required. To specify no
|
1121
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1122
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1123
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1124
|
+
#
|
1125
|
+
# @overload list_issue_models(parent: nil)
|
1126
|
+
# Pass arguments to `list_issue_models` via keyword arguments. Note that at
|
1127
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1128
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1129
|
+
#
|
1130
|
+
# @param parent [::String]
|
1131
|
+
# Required. The parent resource of the issue model.
|
1132
|
+
#
|
1133
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1134
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse]
|
1135
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1136
|
+
#
|
1137
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse]
|
1138
|
+
#
|
1139
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1140
|
+
#
|
1141
|
+
def list_issue_models request, options = nil
|
1142
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1143
|
+
|
1144
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest
|
1145
|
+
|
1146
|
+
# Converts hash and nil to an options object
|
1147
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1148
|
+
|
1149
|
+
# Customize the options with defaults
|
1150
|
+
metadata = @config.rpcs.list_issue_models.metadata.to_h
|
1151
|
+
|
1152
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1153
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1154
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1155
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1156
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1157
|
+
|
1158
|
+
header_params = {
|
1159
|
+
"parent" => request.parent
|
1160
|
+
}
|
1161
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1162
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1163
|
+
|
1164
|
+
options.apply_defaults timeout: @config.rpcs.list_issue_models.timeout,
|
1165
|
+
metadata: metadata,
|
1166
|
+
retry_policy: @config.rpcs.list_issue_models.retry_policy
|
1167
|
+
|
1168
|
+
options.apply_defaults timeout: @config.timeout,
|
1169
|
+
metadata: @config.metadata,
|
1170
|
+
retry_policy: @config.retry_policy
|
1171
|
+
|
1172
|
+
@contact_center_insights_stub.call_rpc :list_issue_models, request, options: options do |response, operation|
|
1173
|
+
yield response, operation if block_given?
|
1174
|
+
return response
|
1175
|
+
end
|
1176
|
+
rescue ::GRPC::BadStatus => e
|
1177
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
##
|
1181
|
+
# Deletes an issue model.
|
1182
|
+
#
|
1183
|
+
# @overload delete_issue_model(request, options = nil)
|
1184
|
+
# Pass arguments to `delete_issue_model` via a request object, either of type
|
1185
|
+
# {::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest} or an equivalent Hash.
|
1186
|
+
#
|
1187
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest, ::Hash]
|
1188
|
+
# A request object representing the call parameters. Required. To specify no
|
1189
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1190
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1191
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1192
|
+
#
|
1193
|
+
# @overload delete_issue_model(name: nil)
|
1194
|
+
# Pass arguments to `delete_issue_model` via keyword arguments. Note that at
|
1195
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1196
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1197
|
+
#
|
1198
|
+
# @param name [::String]
|
1199
|
+
# Required. The name of the issue model to delete.
|
1200
|
+
#
|
1201
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1202
|
+
# @yieldparam response [::Gapic::Operation]
|
1203
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1204
|
+
#
|
1205
|
+
# @return [::Gapic::Operation]
|
1206
|
+
#
|
1207
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1208
|
+
#
|
1209
|
+
def delete_issue_model request, options = nil
|
1210
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1211
|
+
|
1212
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest
|
1213
|
+
|
1214
|
+
# Converts hash and nil to an options object
|
1215
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1216
|
+
|
1217
|
+
# Customize the options with defaults
|
1218
|
+
metadata = @config.rpcs.delete_issue_model.metadata.to_h
|
1219
|
+
|
1220
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1221
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1222
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1223
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1224
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1225
|
+
|
1226
|
+
header_params = {
|
1227
|
+
"name" => request.name
|
1228
|
+
}
|
1229
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1230
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1231
|
+
|
1232
|
+
options.apply_defaults timeout: @config.rpcs.delete_issue_model.timeout,
|
1233
|
+
metadata: metadata,
|
1234
|
+
retry_policy: @config.rpcs.delete_issue_model.retry_policy
|
1235
|
+
|
1236
|
+
options.apply_defaults timeout: @config.timeout,
|
1237
|
+
metadata: @config.metadata,
|
1238
|
+
retry_policy: @config.retry_policy
|
1239
|
+
|
1240
|
+
@contact_center_insights_stub.call_rpc :delete_issue_model, request, options: options do |response, operation|
|
1241
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1242
|
+
yield response, operation if block_given?
|
1243
|
+
return response
|
1244
|
+
end
|
1245
|
+
rescue ::GRPC::BadStatus => e
|
1246
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1247
|
+
end
|
1248
|
+
|
1249
|
+
##
|
1250
|
+
# Deploys an issue model. Returns an error if a model is already deployed.
|
1251
|
+
# An issue model can only be used in analysis after it has been deployed.
|
1252
|
+
#
|
1253
|
+
# @overload deploy_issue_model(request, options = nil)
|
1254
|
+
# Pass arguments to `deploy_issue_model` via a request object, either of type
|
1255
|
+
# {::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest} or an equivalent Hash.
|
1256
|
+
#
|
1257
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest, ::Hash]
|
1258
|
+
# A request object representing the call parameters. Required. To specify no
|
1259
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1260
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1261
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1262
|
+
#
|
1263
|
+
# @overload deploy_issue_model(name: nil)
|
1264
|
+
# Pass arguments to `deploy_issue_model` via keyword arguments. Note that at
|
1265
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1266
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1267
|
+
#
|
1268
|
+
# @param name [::String]
|
1269
|
+
# Required. The issue model to deploy.
|
1270
|
+
#
|
1271
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1272
|
+
# @yieldparam response [::Gapic::Operation]
|
1273
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1274
|
+
#
|
1275
|
+
# @return [::Gapic::Operation]
|
1276
|
+
#
|
1277
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1278
|
+
#
|
1279
|
+
def deploy_issue_model request, options = nil
|
1280
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1281
|
+
|
1282
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest
|
1283
|
+
|
1284
|
+
# Converts hash and nil to an options object
|
1285
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1286
|
+
|
1287
|
+
# Customize the options with defaults
|
1288
|
+
metadata = @config.rpcs.deploy_issue_model.metadata.to_h
|
1289
|
+
|
1290
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1291
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1292
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1293
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1294
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1295
|
+
|
1296
|
+
header_params = {
|
1297
|
+
"name" => request.name
|
1298
|
+
}
|
1299
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1300
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1301
|
+
|
1302
|
+
options.apply_defaults timeout: @config.rpcs.deploy_issue_model.timeout,
|
1303
|
+
metadata: metadata,
|
1304
|
+
retry_policy: @config.rpcs.deploy_issue_model.retry_policy
|
1305
|
+
|
1306
|
+
options.apply_defaults timeout: @config.timeout,
|
1307
|
+
metadata: @config.metadata,
|
1308
|
+
retry_policy: @config.retry_policy
|
1309
|
+
|
1310
|
+
@contact_center_insights_stub.call_rpc :deploy_issue_model, request, options: options do |response, operation|
|
1311
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1312
|
+
yield response, operation if block_given?
|
1313
|
+
return response
|
1314
|
+
end
|
1315
|
+
rescue ::GRPC::BadStatus => e
|
1316
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1317
|
+
end
|
1318
|
+
|
1319
|
+
##
|
1320
|
+
# Undeploys an issue model.
|
1321
|
+
# An issue model can not be used in analysis after it has been undeployed.
|
1322
|
+
#
|
1323
|
+
# @overload undeploy_issue_model(request, options = nil)
|
1324
|
+
# Pass arguments to `undeploy_issue_model` via a request object, either of type
|
1325
|
+
# {::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest} or an equivalent Hash.
|
1326
|
+
#
|
1327
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest, ::Hash]
|
1328
|
+
# A request object representing the call parameters. Required. To specify no
|
1329
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1330
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1331
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1332
|
+
#
|
1333
|
+
# @overload undeploy_issue_model(name: nil)
|
1334
|
+
# Pass arguments to `undeploy_issue_model` via keyword arguments. Note that at
|
1335
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1336
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1337
|
+
#
|
1338
|
+
# @param name [::String]
|
1339
|
+
# Required. The issue model to undeploy.
|
1340
|
+
#
|
1341
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1342
|
+
# @yieldparam response [::Gapic::Operation]
|
1343
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1344
|
+
#
|
1345
|
+
# @return [::Gapic::Operation]
|
1346
|
+
#
|
1347
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1348
|
+
#
|
1349
|
+
def undeploy_issue_model request, options = nil
|
1350
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1351
|
+
|
1352
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest
|
1353
|
+
|
1354
|
+
# Converts hash and nil to an options object
|
1355
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1356
|
+
|
1357
|
+
# Customize the options with defaults
|
1358
|
+
metadata = @config.rpcs.undeploy_issue_model.metadata.to_h
|
1359
|
+
|
1360
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1361
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1362
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1363
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1364
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1365
|
+
|
1366
|
+
header_params = {
|
1367
|
+
"name" => request.name
|
1368
|
+
}
|
1369
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1370
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1371
|
+
|
1372
|
+
options.apply_defaults timeout: @config.rpcs.undeploy_issue_model.timeout,
|
1373
|
+
metadata: metadata,
|
1374
|
+
retry_policy: @config.rpcs.undeploy_issue_model.retry_policy
|
1375
|
+
|
1376
|
+
options.apply_defaults timeout: @config.timeout,
|
1377
|
+
metadata: @config.metadata,
|
1378
|
+
retry_policy: @config.retry_policy
|
1379
|
+
|
1380
|
+
@contact_center_insights_stub.call_rpc :undeploy_issue_model, request, options: options do |response, operation|
|
1381
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1382
|
+
yield response, operation if block_given?
|
1383
|
+
return response
|
1384
|
+
end
|
1385
|
+
rescue ::GRPC::BadStatus => e
|
1386
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1387
|
+
end
|
1388
|
+
|
1389
|
+
##
|
1390
|
+
# Gets an issue.
|
1391
|
+
#
|
1392
|
+
# @overload get_issue(request, options = nil)
|
1393
|
+
# Pass arguments to `get_issue` via a request object, either of type
|
1394
|
+
# {::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest} or an equivalent Hash.
|
1395
|
+
#
|
1396
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest, ::Hash]
|
1397
|
+
# A request object representing the call parameters. Required. To specify no
|
1398
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1399
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1400
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1401
|
+
#
|
1402
|
+
# @overload get_issue(name: nil)
|
1403
|
+
# Pass arguments to `get_issue` via keyword arguments. Note that at
|
1404
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1405
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1406
|
+
#
|
1407
|
+
# @param name [::String]
|
1408
|
+
# Required. The name of the issue to get.
|
1409
|
+
#
|
1410
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1411
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Issue]
|
1412
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1413
|
+
#
|
1414
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::Issue]
|
1415
|
+
#
|
1416
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1417
|
+
#
|
1418
|
+
def get_issue request, options = nil
|
1419
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1420
|
+
|
1421
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest
|
1422
|
+
|
1423
|
+
# Converts hash and nil to an options object
|
1424
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1425
|
+
|
1426
|
+
# Customize the options with defaults
|
1427
|
+
metadata = @config.rpcs.get_issue.metadata.to_h
|
1428
|
+
|
1429
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1430
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1431
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1432
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1433
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1434
|
+
|
1435
|
+
header_params = {
|
1436
|
+
"name" => request.name
|
1437
|
+
}
|
1438
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1439
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1440
|
+
|
1441
|
+
options.apply_defaults timeout: @config.rpcs.get_issue.timeout,
|
1442
|
+
metadata: metadata,
|
1443
|
+
retry_policy: @config.rpcs.get_issue.retry_policy
|
1444
|
+
|
1445
|
+
options.apply_defaults timeout: @config.timeout,
|
1446
|
+
metadata: @config.metadata,
|
1447
|
+
retry_policy: @config.retry_policy
|
1448
|
+
|
1449
|
+
@contact_center_insights_stub.call_rpc :get_issue, request, options: options do |response, operation|
|
1450
|
+
yield response, operation if block_given?
|
1451
|
+
return response
|
1452
|
+
end
|
1453
|
+
rescue ::GRPC::BadStatus => e
|
1454
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1455
|
+
end
|
1456
|
+
|
1457
|
+
##
|
1458
|
+
# Lists issues.
|
1459
|
+
#
|
1460
|
+
# @overload list_issues(request, options = nil)
|
1461
|
+
# Pass arguments to `list_issues` via a request object, either of type
|
1462
|
+
# {::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest} or an equivalent Hash.
|
1463
|
+
#
|
1464
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest, ::Hash]
|
1465
|
+
# A request object representing the call parameters. Required. To specify no
|
1466
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1467
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1468
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1469
|
+
#
|
1470
|
+
# @overload list_issues(parent: nil)
|
1471
|
+
# Pass arguments to `list_issues` via keyword arguments. Note that at
|
1472
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1473
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1474
|
+
#
|
1475
|
+
# @param parent [::String]
|
1476
|
+
# Required. The parent resource of the issue.
|
1477
|
+
#
|
1478
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1479
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse]
|
1480
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1481
|
+
#
|
1482
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse]
|
1483
|
+
#
|
1484
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1485
|
+
#
|
1486
|
+
def list_issues request, options = nil
|
1487
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1488
|
+
|
1489
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest
|
1490
|
+
|
1491
|
+
# Converts hash and nil to an options object
|
1492
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1493
|
+
|
1494
|
+
# Customize the options with defaults
|
1495
|
+
metadata = @config.rpcs.list_issues.metadata.to_h
|
1496
|
+
|
1497
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1498
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1499
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1500
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1501
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1502
|
+
|
1503
|
+
header_params = {
|
1504
|
+
"parent" => request.parent
|
1505
|
+
}
|
1506
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1507
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1508
|
+
|
1509
|
+
options.apply_defaults timeout: @config.rpcs.list_issues.timeout,
|
1510
|
+
metadata: metadata,
|
1511
|
+
retry_policy: @config.rpcs.list_issues.retry_policy
|
1512
|
+
|
1513
|
+
options.apply_defaults timeout: @config.timeout,
|
1514
|
+
metadata: @config.metadata,
|
1515
|
+
retry_policy: @config.retry_policy
|
1516
|
+
|
1517
|
+
@contact_center_insights_stub.call_rpc :list_issues, request, options: options do |response, operation|
|
1518
|
+
yield response, operation if block_given?
|
1519
|
+
return response
|
1520
|
+
end
|
1521
|
+
rescue ::GRPC::BadStatus => e
|
1522
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1523
|
+
end
|
1524
|
+
|
1525
|
+
##
|
1526
|
+
# Updates an issue.
|
1527
|
+
#
|
1528
|
+
# @overload update_issue(request, options = nil)
|
1529
|
+
# Pass arguments to `update_issue` via a request object, either of type
|
1530
|
+
# {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest} or an equivalent Hash.
|
1531
|
+
#
|
1532
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest, ::Hash]
|
1533
|
+
# A request object representing the call parameters. Required. To specify no
|
1534
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1535
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1536
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1537
|
+
#
|
1538
|
+
# @overload update_issue(issue: nil, update_mask: nil)
|
1539
|
+
# Pass arguments to `update_issue` via keyword arguments. Note that at
|
1540
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1541
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1542
|
+
#
|
1543
|
+
# @param issue [::Google::Cloud::ContactCenterInsights::V1::Issue, ::Hash]
|
1544
|
+
# Required. The new values for the issue.
|
1545
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1546
|
+
# The list of fields to be updated.
|
1547
|
+
#
|
1548
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1549
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Issue]
|
1550
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1551
|
+
#
|
1552
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::Issue]
|
1553
|
+
#
|
1554
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1555
|
+
#
|
1556
|
+
def update_issue request, options = nil
|
1557
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1558
|
+
|
1559
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest
|
1560
|
+
|
1561
|
+
# Converts hash and nil to an options object
|
1562
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1563
|
+
|
1564
|
+
# Customize the options with defaults
|
1565
|
+
metadata = @config.rpcs.update_issue.metadata.to_h
|
1566
|
+
|
1567
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1568
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1569
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1570
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1571
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1572
|
+
|
1573
|
+
header_params = {
|
1574
|
+
"issue.name" => request.issue.name
|
1575
|
+
}
|
1576
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1577
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1578
|
+
|
1579
|
+
options.apply_defaults timeout: @config.rpcs.update_issue.timeout,
|
1580
|
+
metadata: metadata,
|
1581
|
+
retry_policy: @config.rpcs.update_issue.retry_policy
|
1582
|
+
|
1583
|
+
options.apply_defaults timeout: @config.timeout,
|
1584
|
+
metadata: @config.metadata,
|
1585
|
+
retry_policy: @config.retry_policy
|
1586
|
+
|
1587
|
+
@contact_center_insights_stub.call_rpc :update_issue, request, options: options do |response, operation|
|
1588
|
+
yield response, operation if block_given?
|
1589
|
+
return response
|
1590
|
+
end
|
1591
|
+
rescue ::GRPC::BadStatus => e
|
1592
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1593
|
+
end
|
1594
|
+
|
1595
|
+
##
|
1596
|
+
# Gets an issue model's statistics.
|
1597
|
+
#
|
1598
|
+
# @overload calculate_issue_model_stats(request, options = nil)
|
1599
|
+
# Pass arguments to `calculate_issue_model_stats` via a request object, either of type
|
1600
|
+
# {::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest} or an equivalent Hash.
|
1601
|
+
#
|
1602
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest, ::Hash]
|
1603
|
+
# A request object representing the call parameters. Required. To specify no
|
1604
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1605
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1606
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1607
|
+
#
|
1608
|
+
# @overload calculate_issue_model_stats(issue_model: nil)
|
1609
|
+
# Pass arguments to `calculate_issue_model_stats` via keyword arguments. Note that at
|
1610
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1611
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1612
|
+
#
|
1613
|
+
# @param issue_model [::String]
|
1614
|
+
# Required. The resource name of the issue model to query against.
|
1615
|
+
#
|
1616
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1617
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse]
|
1618
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1619
|
+
#
|
1620
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse]
|
1621
|
+
#
|
1622
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1623
|
+
#
|
1624
|
+
def calculate_issue_model_stats request, options = nil
|
1625
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1626
|
+
|
1627
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest
|
1628
|
+
|
1629
|
+
# Converts hash and nil to an options object
|
1630
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1631
|
+
|
1632
|
+
# Customize the options with defaults
|
1633
|
+
metadata = @config.rpcs.calculate_issue_model_stats.metadata.to_h
|
1634
|
+
|
1635
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1636
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1637
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1638
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1639
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1640
|
+
|
1641
|
+
header_params = {
|
1642
|
+
"issue_model" => request.issue_model
|
1643
|
+
}
|
1644
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1645
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1646
|
+
|
1647
|
+
options.apply_defaults timeout: @config.rpcs.calculate_issue_model_stats.timeout,
|
1648
|
+
metadata: metadata,
|
1649
|
+
retry_policy: @config.rpcs.calculate_issue_model_stats.retry_policy
|
1650
|
+
|
1651
|
+
options.apply_defaults timeout: @config.timeout,
|
1652
|
+
metadata: @config.metadata,
|
1653
|
+
retry_policy: @config.retry_policy
|
1654
|
+
|
1655
|
+
@contact_center_insights_stub.call_rpc :calculate_issue_model_stats, request, options: options do |response, operation|
|
1656
|
+
yield response, operation if block_given?
|
1657
|
+
return response
|
1658
|
+
end
|
1659
|
+
rescue ::GRPC::BadStatus => e
|
1660
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1661
|
+
end
|
1662
|
+
|
1663
|
+
##
|
1664
|
+
# Creates a phrase matcher.
|
1665
|
+
#
|
1666
|
+
# @overload create_phrase_matcher(request, options = nil)
|
1667
|
+
# Pass arguments to `create_phrase_matcher` via a request object, either of type
|
1668
|
+
# {::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest} or an equivalent Hash.
|
1669
|
+
#
|
1670
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest, ::Hash]
|
1671
|
+
# A request object representing the call parameters. Required. To specify no
|
1672
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1673
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1674
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1675
|
+
#
|
1676
|
+
# @overload create_phrase_matcher(parent: nil, phrase_matcher: nil)
|
1677
|
+
# Pass arguments to `create_phrase_matcher` via keyword arguments. Note that at
|
1678
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1679
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1680
|
+
#
|
1681
|
+
# @param parent [::String]
|
1682
|
+
# Required. The parent resource of the phrase matcher. Required. The location to create
|
1683
|
+
# a phrase matcher for.
|
1684
|
+
# Format: `projects/<Project ID>/locations/<Location ID>` or
|
1685
|
+
# `projects/<Project Number>/locations/<Location ID>`
|
1686
|
+
# @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash]
|
1687
|
+
# Required. The phrase matcher resource to create.
|
1688
|
+
#
|
1689
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1690
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
|
1691
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1692
|
+
#
|
1693
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
|
1694
|
+
#
|
1695
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1696
|
+
#
|
1697
|
+
def create_phrase_matcher request, options = nil
|
1698
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1699
|
+
|
1700
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest
|
1701
|
+
|
1702
|
+
# Converts hash and nil to an options object
|
1703
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1704
|
+
|
1705
|
+
# Customize the options with defaults
|
1706
|
+
metadata = @config.rpcs.create_phrase_matcher.metadata.to_h
|
1707
|
+
|
1708
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1709
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1710
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1711
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1712
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1713
|
+
|
1714
|
+
header_params = {
|
1715
|
+
"parent" => request.parent
|
1716
|
+
}
|
1717
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1718
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1719
|
+
|
1720
|
+
options.apply_defaults timeout: @config.rpcs.create_phrase_matcher.timeout,
|
1721
|
+
metadata: metadata,
|
1722
|
+
retry_policy: @config.rpcs.create_phrase_matcher.retry_policy
|
1723
|
+
|
1724
|
+
options.apply_defaults timeout: @config.timeout,
|
1725
|
+
metadata: @config.metadata,
|
1726
|
+
retry_policy: @config.retry_policy
|
1727
|
+
|
1728
|
+
@contact_center_insights_stub.call_rpc :create_phrase_matcher, request, options: options do |response, operation|
|
1729
|
+
yield response, operation if block_given?
|
1730
|
+
return response
|
1731
|
+
end
|
1732
|
+
rescue ::GRPC::BadStatus => e
|
1733
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1734
|
+
end
|
1735
|
+
|
1736
|
+
##
|
1737
|
+
# Gets a phrase matcher.
|
1738
|
+
#
|
1739
|
+
# @overload get_phrase_matcher(request, options = nil)
|
1740
|
+
# Pass arguments to `get_phrase_matcher` via a request object, either of type
|
1741
|
+
# {::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest} or an equivalent Hash.
|
1742
|
+
#
|
1743
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest, ::Hash]
|
1744
|
+
# A request object representing the call parameters. Required. To specify no
|
1745
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1746
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1747
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1748
|
+
#
|
1749
|
+
# @overload get_phrase_matcher(name: nil)
|
1750
|
+
# Pass arguments to `get_phrase_matcher` via keyword arguments. Note that at
|
1751
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1752
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1753
|
+
#
|
1754
|
+
# @param name [::String]
|
1755
|
+
# Required. The name of the phrase matcher to get.
|
1756
|
+
#
|
1757
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1758
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
|
1759
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1760
|
+
#
|
1761
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
|
1762
|
+
#
|
1763
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1764
|
+
#
|
1765
|
+
def get_phrase_matcher request, options = nil
|
1766
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1767
|
+
|
1768
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest
|
1769
|
+
|
1770
|
+
# Converts hash and nil to an options object
|
1771
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1772
|
+
|
1773
|
+
# Customize the options with defaults
|
1774
|
+
metadata = @config.rpcs.get_phrase_matcher.metadata.to_h
|
1775
|
+
|
1776
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1777
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1778
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1779
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1780
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1781
|
+
|
1782
|
+
header_params = {
|
1783
|
+
"name" => request.name
|
1784
|
+
}
|
1785
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1786
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1787
|
+
|
1788
|
+
options.apply_defaults timeout: @config.rpcs.get_phrase_matcher.timeout,
|
1789
|
+
metadata: metadata,
|
1790
|
+
retry_policy: @config.rpcs.get_phrase_matcher.retry_policy
|
1791
|
+
|
1792
|
+
options.apply_defaults timeout: @config.timeout,
|
1793
|
+
metadata: @config.metadata,
|
1794
|
+
retry_policy: @config.retry_policy
|
1795
|
+
|
1796
|
+
@contact_center_insights_stub.call_rpc :get_phrase_matcher, request, options: options do |response, operation|
|
1797
|
+
yield response, operation if block_given?
|
1798
|
+
return response
|
1799
|
+
end
|
1800
|
+
rescue ::GRPC::BadStatus => e
|
1801
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1802
|
+
end
|
1803
|
+
|
1804
|
+
##
|
1805
|
+
# Lists phrase matchers.
|
1806
|
+
#
|
1807
|
+
# @overload list_phrase_matchers(request, options = nil)
|
1808
|
+
# Pass arguments to `list_phrase_matchers` via a request object, either of type
|
1809
|
+
# {::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest} or an equivalent Hash.
|
1810
|
+
#
|
1811
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest, ::Hash]
|
1812
|
+
# A request object representing the call parameters. Required. To specify no
|
1813
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1814
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1815
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1816
|
+
#
|
1817
|
+
# @overload list_phrase_matchers(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
1818
|
+
# Pass arguments to `list_phrase_matchers` via keyword arguments. Note that at
|
1819
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1820
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1821
|
+
#
|
1822
|
+
# @param parent [::String]
|
1823
|
+
# Required. The parent resource of the phrase matcher.
|
1824
|
+
# @param page_size [::Integer]
|
1825
|
+
# The maximum number of phrase matchers to return in the response. If this
|
1826
|
+
# value is zero, the service will select a default size. A call might return
|
1827
|
+
# fewer objects than requested. A non-empty `next_page_token` in the response
|
1828
|
+
# indicates that more data is available.
|
1829
|
+
# @param page_token [::String]
|
1830
|
+
# The value returned by the last `ListPhraseMatchersResponse`. This value
|
1831
|
+
# indicates that this is a continuation of a prior `ListPhraseMatchers` call
|
1832
|
+
# and that the system should return the next page of data.
|
1833
|
+
# @param filter [::String]
|
1834
|
+
# A filter to reduce results to a specific subset. Useful for querying
|
1835
|
+
# phrase matchers with specific properties.
|
1836
|
+
#
|
1837
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1838
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>]
|
1839
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1840
|
+
#
|
1841
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>]
|
1842
|
+
#
|
1843
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1844
|
+
#
|
1845
|
+
def list_phrase_matchers request, options = nil
|
1846
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1847
|
+
|
1848
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest
|
1849
|
+
|
1850
|
+
# Converts hash and nil to an options object
|
1851
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1852
|
+
|
1853
|
+
# Customize the options with defaults
|
1854
|
+
metadata = @config.rpcs.list_phrase_matchers.metadata.to_h
|
1855
|
+
|
1856
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1857
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1858
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1859
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1860
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1861
|
+
|
1862
|
+
header_params = {
|
1863
|
+
"parent" => request.parent
|
1864
|
+
}
|
1865
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1866
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1867
|
+
|
1868
|
+
options.apply_defaults timeout: @config.rpcs.list_phrase_matchers.timeout,
|
1869
|
+
metadata: metadata,
|
1870
|
+
retry_policy: @config.rpcs.list_phrase_matchers.retry_policy
|
1871
|
+
|
1872
|
+
options.apply_defaults timeout: @config.timeout,
|
1873
|
+
metadata: @config.metadata,
|
1874
|
+
retry_policy: @config.retry_policy
|
1875
|
+
|
1876
|
+
@contact_center_insights_stub.call_rpc :list_phrase_matchers, request, options: options do |response, operation|
|
1877
|
+
response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_phrase_matchers, request, response, operation, options
|
1878
|
+
yield response, operation if block_given?
|
1879
|
+
return response
|
1880
|
+
end
|
1881
|
+
rescue ::GRPC::BadStatus => e
|
1882
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1883
|
+
end
|
1884
|
+
|
1885
|
+
##
|
1886
|
+
# Deletes a phrase matcher.
|
1887
|
+
#
|
1888
|
+
# @overload delete_phrase_matcher(request, options = nil)
|
1889
|
+
# Pass arguments to `delete_phrase_matcher` via a request object, either of type
|
1890
|
+
# {::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest} or an equivalent Hash.
|
1891
|
+
#
|
1892
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest, ::Hash]
|
1893
|
+
# A request object representing the call parameters. Required. To specify no
|
1894
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1895
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1896
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1897
|
+
#
|
1898
|
+
# @overload delete_phrase_matcher(name: nil)
|
1899
|
+
# Pass arguments to `delete_phrase_matcher` via keyword arguments. Note that at
|
1900
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1901
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1902
|
+
#
|
1903
|
+
# @param name [::String]
|
1904
|
+
# Required. The name of the phrase matcher to delete.
|
1905
|
+
#
|
1906
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1907
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1908
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1909
|
+
#
|
1910
|
+
# @return [::Google::Protobuf::Empty]
|
1911
|
+
#
|
1912
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1913
|
+
#
|
1914
|
+
def delete_phrase_matcher request, options = nil
|
1915
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1916
|
+
|
1917
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest
|
1918
|
+
|
1919
|
+
# Converts hash and nil to an options object
|
1920
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1921
|
+
|
1922
|
+
# Customize the options with defaults
|
1923
|
+
metadata = @config.rpcs.delete_phrase_matcher.metadata.to_h
|
1924
|
+
|
1925
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1926
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1927
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1928
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
1929
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1930
|
+
|
1931
|
+
header_params = {
|
1932
|
+
"name" => request.name
|
1933
|
+
}
|
1934
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1935
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1936
|
+
|
1937
|
+
options.apply_defaults timeout: @config.rpcs.delete_phrase_matcher.timeout,
|
1938
|
+
metadata: metadata,
|
1939
|
+
retry_policy: @config.rpcs.delete_phrase_matcher.retry_policy
|
1940
|
+
|
1941
|
+
options.apply_defaults timeout: @config.timeout,
|
1942
|
+
metadata: @config.metadata,
|
1943
|
+
retry_policy: @config.retry_policy
|
1944
|
+
|
1945
|
+
@contact_center_insights_stub.call_rpc :delete_phrase_matcher, request, options: options do |response, operation|
|
1946
|
+
yield response, operation if block_given?
|
1947
|
+
return response
|
1948
|
+
end
|
1949
|
+
rescue ::GRPC::BadStatus => e
|
1950
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1951
|
+
end
|
1952
|
+
|
1953
|
+
##
|
1954
|
+
# Gets conversation statistics.
|
1955
|
+
#
|
1956
|
+
# @overload calculate_stats(request, options = nil)
|
1957
|
+
# Pass arguments to `calculate_stats` via a request object, either of type
|
1958
|
+
# {::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest} or an equivalent Hash.
|
1959
|
+
#
|
1960
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest, ::Hash]
|
1961
|
+
# A request object representing the call parameters. Required. To specify no
|
1962
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1963
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1964
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1965
|
+
#
|
1966
|
+
# @overload calculate_stats(location: nil, filter: nil)
|
1967
|
+
# Pass arguments to `calculate_stats` via keyword arguments. Note that at
|
1968
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1969
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1970
|
+
#
|
1971
|
+
# @param location [::String]
|
1972
|
+
# Required. The location of the conversations.
|
1973
|
+
# @param filter [::String]
|
1974
|
+
# A filter to reduce results to a specific subset. This field is useful for
|
1975
|
+
# getting statistics about conversations with specific properties.
|
1976
|
+
#
|
1977
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1978
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse]
|
1979
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1980
|
+
#
|
1981
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse]
|
1982
|
+
#
|
1983
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1984
|
+
#
|
1985
|
+
def calculate_stats request, options = nil
|
1986
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1987
|
+
|
1988
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest
|
1989
|
+
|
1990
|
+
# Converts hash and nil to an options object
|
1991
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1992
|
+
|
1993
|
+
# Customize the options with defaults
|
1994
|
+
metadata = @config.rpcs.calculate_stats.metadata.to_h
|
1995
|
+
|
1996
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1997
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1998
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1999
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
2000
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2001
|
+
|
2002
|
+
header_params = {
|
2003
|
+
"location" => request.location
|
2004
|
+
}
|
2005
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2006
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2007
|
+
|
2008
|
+
options.apply_defaults timeout: @config.rpcs.calculate_stats.timeout,
|
2009
|
+
metadata: metadata,
|
2010
|
+
retry_policy: @config.rpcs.calculate_stats.retry_policy
|
2011
|
+
|
2012
|
+
options.apply_defaults timeout: @config.timeout,
|
2013
|
+
metadata: @config.metadata,
|
2014
|
+
retry_policy: @config.retry_policy
|
2015
|
+
|
2016
|
+
@contact_center_insights_stub.call_rpc :calculate_stats, request, options: options do |response, operation|
|
2017
|
+
yield response, operation if block_given?
|
2018
|
+
return response
|
2019
|
+
end
|
2020
|
+
rescue ::GRPC::BadStatus => e
|
2021
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2022
|
+
end
|
2023
|
+
|
2024
|
+
##
|
2025
|
+
# Gets project-level settings.
|
2026
|
+
#
|
2027
|
+
# @overload get_settings(request, options = nil)
|
2028
|
+
# Pass arguments to `get_settings` via a request object, either of type
|
2029
|
+
# {::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest} or an equivalent Hash.
|
2030
|
+
#
|
2031
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest, ::Hash]
|
2032
|
+
# A request object representing the call parameters. Required. To specify no
|
2033
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2034
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2035
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2036
|
+
#
|
2037
|
+
# @overload get_settings(name: nil)
|
2038
|
+
# Pass arguments to `get_settings` via keyword arguments. Note that at
|
2039
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2040
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2041
|
+
#
|
2042
|
+
# @param name [::String]
|
2043
|
+
# Required. The name of the settings resource to get.
|
2044
|
+
#
|
2045
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2046
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Settings]
|
2047
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2048
|
+
#
|
2049
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::Settings]
|
2050
|
+
#
|
2051
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2052
|
+
#
|
2053
|
+
def get_settings request, options = nil
|
2054
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2055
|
+
|
2056
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest
|
2057
|
+
|
2058
|
+
# Converts hash and nil to an options object
|
2059
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2060
|
+
|
2061
|
+
# Customize the options with defaults
|
2062
|
+
metadata = @config.rpcs.get_settings.metadata.to_h
|
2063
|
+
|
2064
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2065
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2066
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2067
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
2068
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2069
|
+
|
2070
|
+
header_params = {
|
2071
|
+
"name" => request.name
|
2072
|
+
}
|
2073
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2074
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2075
|
+
|
2076
|
+
options.apply_defaults timeout: @config.rpcs.get_settings.timeout,
|
2077
|
+
metadata: metadata,
|
2078
|
+
retry_policy: @config.rpcs.get_settings.retry_policy
|
2079
|
+
|
2080
|
+
options.apply_defaults timeout: @config.timeout,
|
2081
|
+
metadata: @config.metadata,
|
2082
|
+
retry_policy: @config.retry_policy
|
2083
|
+
|
2084
|
+
@contact_center_insights_stub.call_rpc :get_settings, request, options: options do |response, operation|
|
2085
|
+
yield response, operation if block_given?
|
2086
|
+
return response
|
2087
|
+
end
|
2088
|
+
rescue ::GRPC::BadStatus => e
|
2089
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2090
|
+
end
|
2091
|
+
|
2092
|
+
##
|
2093
|
+
# Updates project-level settings.
|
2094
|
+
#
|
2095
|
+
# @overload update_settings(request, options = nil)
|
2096
|
+
# Pass arguments to `update_settings` via a request object, either of type
|
2097
|
+
# {::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest} or an equivalent Hash.
|
2098
|
+
#
|
2099
|
+
# @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest, ::Hash]
|
2100
|
+
# A request object representing the call parameters. Required. To specify no
|
2101
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2102
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2103
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2104
|
+
#
|
2105
|
+
# @overload update_settings(settings: nil, update_mask: nil)
|
2106
|
+
# Pass arguments to `update_settings` via keyword arguments. Note that at
|
2107
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2108
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2109
|
+
#
|
2110
|
+
# @param settings [::Google::Cloud::ContactCenterInsights::V1::Settings, ::Hash]
|
2111
|
+
# Required. The new values for the conversation.
|
2112
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2113
|
+
# Required. The list of fields to be updated.
|
2114
|
+
#
|
2115
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2116
|
+
# @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Settings]
|
2117
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2118
|
+
#
|
2119
|
+
# @return [::Google::Cloud::ContactCenterInsights::V1::Settings]
|
2120
|
+
#
|
2121
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2122
|
+
#
|
2123
|
+
def update_settings request, options = nil
|
2124
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2125
|
+
|
2126
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest
|
2127
|
+
|
2128
|
+
# Converts hash and nil to an options object
|
2129
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2130
|
+
|
2131
|
+
# Customize the options with defaults
|
2132
|
+
metadata = @config.rpcs.update_settings.metadata.to_h
|
2133
|
+
|
2134
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2135
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2136
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2137
|
+
gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
|
2138
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2139
|
+
|
2140
|
+
header_params = {
|
2141
|
+
"settings.name" => request.settings.name
|
2142
|
+
}
|
2143
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2144
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2145
|
+
|
2146
|
+
options.apply_defaults timeout: @config.rpcs.update_settings.timeout,
|
2147
|
+
metadata: metadata,
|
2148
|
+
retry_policy: @config.rpcs.update_settings.retry_policy
|
2149
|
+
|
2150
|
+
options.apply_defaults timeout: @config.timeout,
|
2151
|
+
metadata: @config.metadata,
|
2152
|
+
retry_policy: @config.retry_policy
|
2153
|
+
|
2154
|
+
@contact_center_insights_stub.call_rpc :update_settings, request, options: options do |response, operation|
|
2155
|
+
yield response, operation if block_given?
|
2156
|
+
return response
|
2157
|
+
end
|
2158
|
+
rescue ::GRPC::BadStatus => e
|
2159
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2160
|
+
end
|
2161
|
+
|
2162
|
+
##
|
2163
|
+
# Configuration class for the ContactCenterInsights API.
|
2164
|
+
#
|
2165
|
+
# This class represents the configuration for ContactCenterInsights,
|
2166
|
+
# providing control over timeouts, retry behavior, logging, transport
|
2167
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
2168
|
+
# applied individually to specific RPCs. See
|
2169
|
+
# {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration::Rpcs}
|
2170
|
+
# for a list of RPCs that can be configured independently.
|
2171
|
+
#
|
2172
|
+
# Configuration can be applied globally to all clients, or to a single client
|
2173
|
+
# on construction.
|
2174
|
+
#
|
2175
|
+
# @example
|
2176
|
+
#
|
2177
|
+
# # Modify the global config, setting the timeout for
|
2178
|
+
# # create_conversation to 20 seconds,
|
2179
|
+
# # and all remaining timeouts to 10 seconds.
|
2180
|
+
# ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.configure do |config|
|
2181
|
+
# config.timeout = 10.0
|
2182
|
+
# config.rpcs.create_conversation.timeout = 20.0
|
2183
|
+
# end
|
2184
|
+
#
|
2185
|
+
# # Apply the above configuration only to a new client.
|
2186
|
+
# client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config|
|
2187
|
+
# config.timeout = 10.0
|
2188
|
+
# config.rpcs.create_conversation.timeout = 20.0
|
2189
|
+
# end
|
2190
|
+
#
|
2191
|
+
# @!attribute [rw] endpoint
|
2192
|
+
# The hostname or hostname:port of the service endpoint.
|
2193
|
+
# Defaults to `"contactcenterinsights.googleapis.com"`.
|
2194
|
+
# @return [::String]
|
2195
|
+
# @!attribute [rw] credentials
|
2196
|
+
# Credentials to send with calls. You may provide any of the following types:
|
2197
|
+
# * (`String`) The path to a service account key file in JSON format
|
2198
|
+
# * (`Hash`) A service account key as a Hash
|
2199
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2200
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
2201
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2202
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
2203
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2204
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2205
|
+
# * (`nil`) indicating no credentials
|
2206
|
+
# @return [::Object]
|
2207
|
+
# @!attribute [rw] scope
|
2208
|
+
# The OAuth scopes
|
2209
|
+
# @return [::Array<::String>]
|
2210
|
+
# @!attribute [rw] lib_name
|
2211
|
+
# The library name as recorded in instrumentation and logging
|
2212
|
+
# @return [::String]
|
2213
|
+
# @!attribute [rw] lib_version
|
2214
|
+
# The library version as recorded in instrumentation and logging
|
2215
|
+
# @return [::String]
|
2216
|
+
# @!attribute [rw] channel_args
|
2217
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
2218
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
2219
|
+
# @return [::Hash]
|
2220
|
+
# @!attribute [rw] interceptors
|
2221
|
+
# An array of interceptors that are run before calls are executed.
|
2222
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
2223
|
+
# @!attribute [rw] timeout
|
2224
|
+
# The call timeout in seconds.
|
2225
|
+
# @return [::Numeric]
|
2226
|
+
# @!attribute [rw] metadata
|
2227
|
+
# Additional gRPC headers to be sent with the call.
|
2228
|
+
# @return [::Hash{::Symbol=>::String}]
|
2229
|
+
# @!attribute [rw] retry_policy
|
2230
|
+
# The retry policy. The value is a hash with the following keys:
|
2231
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2232
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2233
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2234
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2235
|
+
# trigger a retry.
|
2236
|
+
# @return [::Hash]
|
2237
|
+
# @!attribute [rw] quota_project
|
2238
|
+
# A separate project against which to charge quota.
|
2239
|
+
# @return [::String]
|
2240
|
+
#
|
2241
|
+
class Configuration
|
2242
|
+
extend ::Gapic::Config
|
2243
|
+
|
2244
|
+
config_attr :endpoint, "contactcenterinsights.googleapis.com", ::String
|
2245
|
+
config_attr :credentials, nil do |value|
|
2246
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2247
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
2248
|
+
allowed.any? { |klass| klass === value }
|
2249
|
+
end
|
2250
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
2251
|
+
config_attr :lib_name, nil, ::String, nil
|
2252
|
+
config_attr :lib_version, nil, ::String, nil
|
2253
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
2254
|
+
config_attr :interceptors, nil, ::Array, nil
|
2255
|
+
config_attr :timeout, nil, ::Numeric, nil
|
2256
|
+
config_attr :metadata, nil, ::Hash, nil
|
2257
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2258
|
+
config_attr :quota_project, nil, ::String, nil
|
2259
|
+
|
2260
|
+
# @private
|
2261
|
+
def initialize parent_config = nil
|
2262
|
+
@parent_config = parent_config unless parent_config.nil?
|
2263
|
+
|
2264
|
+
yield self if block_given?
|
2265
|
+
end
|
2266
|
+
|
2267
|
+
##
|
2268
|
+
# Configurations for individual RPCs
|
2269
|
+
# @return [Rpcs]
|
2270
|
+
#
|
2271
|
+
def rpcs
|
2272
|
+
@rpcs ||= begin
|
2273
|
+
parent_rpcs = nil
|
2274
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2275
|
+
Rpcs.new parent_rpcs
|
2276
|
+
end
|
2277
|
+
end
|
2278
|
+
|
2279
|
+
##
|
2280
|
+
# Configuration RPC class for the ContactCenterInsights API.
|
2281
|
+
#
|
2282
|
+
# Includes fields providing the configuration for each RPC in this service.
|
2283
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
2284
|
+
# the following configuration fields:
|
2285
|
+
#
|
2286
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
2287
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
2288
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
2289
|
+
# include the following keys:
|
2290
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2291
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2292
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2293
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2294
|
+
# trigger a retry.
|
2295
|
+
#
|
2296
|
+
class Rpcs
|
2297
|
+
##
|
2298
|
+
# RPC-specific configuration for `create_conversation`
|
2299
|
+
# @return [::Gapic::Config::Method]
|
2300
|
+
#
|
2301
|
+
attr_reader :create_conversation
|
2302
|
+
##
|
2303
|
+
# RPC-specific configuration for `update_conversation`
|
2304
|
+
# @return [::Gapic::Config::Method]
|
2305
|
+
#
|
2306
|
+
attr_reader :update_conversation
|
2307
|
+
##
|
2308
|
+
# RPC-specific configuration for `get_conversation`
|
2309
|
+
# @return [::Gapic::Config::Method]
|
2310
|
+
#
|
2311
|
+
attr_reader :get_conversation
|
2312
|
+
##
|
2313
|
+
# RPC-specific configuration for `list_conversations`
|
2314
|
+
# @return [::Gapic::Config::Method]
|
2315
|
+
#
|
2316
|
+
attr_reader :list_conversations
|
2317
|
+
##
|
2318
|
+
# RPC-specific configuration for `delete_conversation`
|
2319
|
+
# @return [::Gapic::Config::Method]
|
2320
|
+
#
|
2321
|
+
attr_reader :delete_conversation
|
2322
|
+
##
|
2323
|
+
# RPC-specific configuration for `create_analysis`
|
2324
|
+
# @return [::Gapic::Config::Method]
|
2325
|
+
#
|
2326
|
+
attr_reader :create_analysis
|
2327
|
+
##
|
2328
|
+
# RPC-specific configuration for `get_analysis`
|
2329
|
+
# @return [::Gapic::Config::Method]
|
2330
|
+
#
|
2331
|
+
attr_reader :get_analysis
|
2332
|
+
##
|
2333
|
+
# RPC-specific configuration for `list_analyses`
|
2334
|
+
# @return [::Gapic::Config::Method]
|
2335
|
+
#
|
2336
|
+
attr_reader :list_analyses
|
2337
|
+
##
|
2338
|
+
# RPC-specific configuration for `delete_analysis`
|
2339
|
+
# @return [::Gapic::Config::Method]
|
2340
|
+
#
|
2341
|
+
attr_reader :delete_analysis
|
2342
|
+
##
|
2343
|
+
# RPC-specific configuration for `export_insights_data`
|
2344
|
+
# @return [::Gapic::Config::Method]
|
2345
|
+
#
|
2346
|
+
attr_reader :export_insights_data
|
2347
|
+
##
|
2348
|
+
# RPC-specific configuration for `create_issue_model`
|
2349
|
+
# @return [::Gapic::Config::Method]
|
2350
|
+
#
|
2351
|
+
attr_reader :create_issue_model
|
2352
|
+
##
|
2353
|
+
# RPC-specific configuration for `update_issue_model`
|
2354
|
+
# @return [::Gapic::Config::Method]
|
2355
|
+
#
|
2356
|
+
attr_reader :update_issue_model
|
2357
|
+
##
|
2358
|
+
# RPC-specific configuration for `get_issue_model`
|
2359
|
+
# @return [::Gapic::Config::Method]
|
2360
|
+
#
|
2361
|
+
attr_reader :get_issue_model
|
2362
|
+
##
|
2363
|
+
# RPC-specific configuration for `list_issue_models`
|
2364
|
+
# @return [::Gapic::Config::Method]
|
2365
|
+
#
|
2366
|
+
attr_reader :list_issue_models
|
2367
|
+
##
|
2368
|
+
# RPC-specific configuration for `delete_issue_model`
|
2369
|
+
# @return [::Gapic::Config::Method]
|
2370
|
+
#
|
2371
|
+
attr_reader :delete_issue_model
|
2372
|
+
##
|
2373
|
+
# RPC-specific configuration for `deploy_issue_model`
|
2374
|
+
# @return [::Gapic::Config::Method]
|
2375
|
+
#
|
2376
|
+
attr_reader :deploy_issue_model
|
2377
|
+
##
|
2378
|
+
# RPC-specific configuration for `undeploy_issue_model`
|
2379
|
+
# @return [::Gapic::Config::Method]
|
2380
|
+
#
|
2381
|
+
attr_reader :undeploy_issue_model
|
2382
|
+
##
|
2383
|
+
# RPC-specific configuration for `get_issue`
|
2384
|
+
# @return [::Gapic::Config::Method]
|
2385
|
+
#
|
2386
|
+
attr_reader :get_issue
|
2387
|
+
##
|
2388
|
+
# RPC-specific configuration for `list_issues`
|
2389
|
+
# @return [::Gapic::Config::Method]
|
2390
|
+
#
|
2391
|
+
attr_reader :list_issues
|
2392
|
+
##
|
2393
|
+
# RPC-specific configuration for `update_issue`
|
2394
|
+
# @return [::Gapic::Config::Method]
|
2395
|
+
#
|
2396
|
+
attr_reader :update_issue
|
2397
|
+
##
|
2398
|
+
# RPC-specific configuration for `calculate_issue_model_stats`
|
2399
|
+
# @return [::Gapic::Config::Method]
|
2400
|
+
#
|
2401
|
+
attr_reader :calculate_issue_model_stats
|
2402
|
+
##
|
2403
|
+
# RPC-specific configuration for `create_phrase_matcher`
|
2404
|
+
# @return [::Gapic::Config::Method]
|
2405
|
+
#
|
2406
|
+
attr_reader :create_phrase_matcher
|
2407
|
+
##
|
2408
|
+
# RPC-specific configuration for `get_phrase_matcher`
|
2409
|
+
# @return [::Gapic::Config::Method]
|
2410
|
+
#
|
2411
|
+
attr_reader :get_phrase_matcher
|
2412
|
+
##
|
2413
|
+
# RPC-specific configuration for `list_phrase_matchers`
|
2414
|
+
# @return [::Gapic::Config::Method]
|
2415
|
+
#
|
2416
|
+
attr_reader :list_phrase_matchers
|
2417
|
+
##
|
2418
|
+
# RPC-specific configuration for `delete_phrase_matcher`
|
2419
|
+
# @return [::Gapic::Config::Method]
|
2420
|
+
#
|
2421
|
+
attr_reader :delete_phrase_matcher
|
2422
|
+
##
|
2423
|
+
# RPC-specific configuration for `calculate_stats`
|
2424
|
+
# @return [::Gapic::Config::Method]
|
2425
|
+
#
|
2426
|
+
attr_reader :calculate_stats
|
2427
|
+
##
|
2428
|
+
# RPC-specific configuration for `get_settings`
|
2429
|
+
# @return [::Gapic::Config::Method]
|
2430
|
+
#
|
2431
|
+
attr_reader :get_settings
|
2432
|
+
##
|
2433
|
+
# RPC-specific configuration for `update_settings`
|
2434
|
+
# @return [::Gapic::Config::Method]
|
2435
|
+
#
|
2436
|
+
attr_reader :update_settings
|
2437
|
+
|
2438
|
+
# @private
|
2439
|
+
def initialize parent_rpcs = nil
|
2440
|
+
create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation
|
2441
|
+
@create_conversation = ::Gapic::Config::Method.new create_conversation_config
|
2442
|
+
update_conversation_config = parent_rpcs.update_conversation if parent_rpcs.respond_to? :update_conversation
|
2443
|
+
@update_conversation = ::Gapic::Config::Method.new update_conversation_config
|
2444
|
+
get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation
|
2445
|
+
@get_conversation = ::Gapic::Config::Method.new get_conversation_config
|
2446
|
+
list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations
|
2447
|
+
@list_conversations = ::Gapic::Config::Method.new list_conversations_config
|
2448
|
+
delete_conversation_config = parent_rpcs.delete_conversation if parent_rpcs.respond_to? :delete_conversation
|
2449
|
+
@delete_conversation = ::Gapic::Config::Method.new delete_conversation_config
|
2450
|
+
create_analysis_config = parent_rpcs.create_analysis if parent_rpcs.respond_to? :create_analysis
|
2451
|
+
@create_analysis = ::Gapic::Config::Method.new create_analysis_config
|
2452
|
+
get_analysis_config = parent_rpcs.get_analysis if parent_rpcs.respond_to? :get_analysis
|
2453
|
+
@get_analysis = ::Gapic::Config::Method.new get_analysis_config
|
2454
|
+
list_analyses_config = parent_rpcs.list_analyses if parent_rpcs.respond_to? :list_analyses
|
2455
|
+
@list_analyses = ::Gapic::Config::Method.new list_analyses_config
|
2456
|
+
delete_analysis_config = parent_rpcs.delete_analysis if parent_rpcs.respond_to? :delete_analysis
|
2457
|
+
@delete_analysis = ::Gapic::Config::Method.new delete_analysis_config
|
2458
|
+
export_insights_data_config = parent_rpcs.export_insights_data if parent_rpcs.respond_to? :export_insights_data
|
2459
|
+
@export_insights_data = ::Gapic::Config::Method.new export_insights_data_config
|
2460
|
+
create_issue_model_config = parent_rpcs.create_issue_model if parent_rpcs.respond_to? :create_issue_model
|
2461
|
+
@create_issue_model = ::Gapic::Config::Method.new create_issue_model_config
|
2462
|
+
update_issue_model_config = parent_rpcs.update_issue_model if parent_rpcs.respond_to? :update_issue_model
|
2463
|
+
@update_issue_model = ::Gapic::Config::Method.new update_issue_model_config
|
2464
|
+
get_issue_model_config = parent_rpcs.get_issue_model if parent_rpcs.respond_to? :get_issue_model
|
2465
|
+
@get_issue_model = ::Gapic::Config::Method.new get_issue_model_config
|
2466
|
+
list_issue_models_config = parent_rpcs.list_issue_models if parent_rpcs.respond_to? :list_issue_models
|
2467
|
+
@list_issue_models = ::Gapic::Config::Method.new list_issue_models_config
|
2468
|
+
delete_issue_model_config = parent_rpcs.delete_issue_model if parent_rpcs.respond_to? :delete_issue_model
|
2469
|
+
@delete_issue_model = ::Gapic::Config::Method.new delete_issue_model_config
|
2470
|
+
deploy_issue_model_config = parent_rpcs.deploy_issue_model if parent_rpcs.respond_to? :deploy_issue_model
|
2471
|
+
@deploy_issue_model = ::Gapic::Config::Method.new deploy_issue_model_config
|
2472
|
+
undeploy_issue_model_config = parent_rpcs.undeploy_issue_model if parent_rpcs.respond_to? :undeploy_issue_model
|
2473
|
+
@undeploy_issue_model = ::Gapic::Config::Method.new undeploy_issue_model_config
|
2474
|
+
get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue
|
2475
|
+
@get_issue = ::Gapic::Config::Method.new get_issue_config
|
2476
|
+
list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues
|
2477
|
+
@list_issues = ::Gapic::Config::Method.new list_issues_config
|
2478
|
+
update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue
|
2479
|
+
@update_issue = ::Gapic::Config::Method.new update_issue_config
|
2480
|
+
calculate_issue_model_stats_config = parent_rpcs.calculate_issue_model_stats if parent_rpcs.respond_to? :calculate_issue_model_stats
|
2481
|
+
@calculate_issue_model_stats = ::Gapic::Config::Method.new calculate_issue_model_stats_config
|
2482
|
+
create_phrase_matcher_config = parent_rpcs.create_phrase_matcher if parent_rpcs.respond_to? :create_phrase_matcher
|
2483
|
+
@create_phrase_matcher = ::Gapic::Config::Method.new create_phrase_matcher_config
|
2484
|
+
get_phrase_matcher_config = parent_rpcs.get_phrase_matcher if parent_rpcs.respond_to? :get_phrase_matcher
|
2485
|
+
@get_phrase_matcher = ::Gapic::Config::Method.new get_phrase_matcher_config
|
2486
|
+
list_phrase_matchers_config = parent_rpcs.list_phrase_matchers if parent_rpcs.respond_to? :list_phrase_matchers
|
2487
|
+
@list_phrase_matchers = ::Gapic::Config::Method.new list_phrase_matchers_config
|
2488
|
+
delete_phrase_matcher_config = parent_rpcs.delete_phrase_matcher if parent_rpcs.respond_to? :delete_phrase_matcher
|
2489
|
+
@delete_phrase_matcher = ::Gapic::Config::Method.new delete_phrase_matcher_config
|
2490
|
+
calculate_stats_config = parent_rpcs.calculate_stats if parent_rpcs.respond_to? :calculate_stats
|
2491
|
+
@calculate_stats = ::Gapic::Config::Method.new calculate_stats_config
|
2492
|
+
get_settings_config = parent_rpcs.get_settings if parent_rpcs.respond_to? :get_settings
|
2493
|
+
@get_settings = ::Gapic::Config::Method.new get_settings_config
|
2494
|
+
update_settings_config = parent_rpcs.update_settings if parent_rpcs.respond_to? :update_settings
|
2495
|
+
@update_settings = ::Gapic::Config::Method.new update_settings_config
|
2496
|
+
|
2497
|
+
yield self if block_given?
|
2498
|
+
end
|
2499
|
+
end
|
2500
|
+
end
|
2501
|
+
end
|
2502
|
+
end
|
2503
|
+
end
|
2504
|
+
end
|
2505
|
+
end
|
2506
|
+
end
|