google-cloud-dialogflow-v2 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/dialogflow/v2.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/agents/paths.rb +42 -3
- data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -2
- data/lib/google/cloud/dialogflow/v2/answer_records.rb +1 -2
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +1 -2
- data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +72 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +44 -3
- data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +58 -12
- data/lib/google/cloud/dialogflow/v2/environment_pb.rb +50 -1
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +21 -0
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +411 -1
- data/lib/google/cloud/dialogflow/v2/environments/paths.rb +104 -5
- data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +59 -0
- data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +47 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +460 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments/paths.rb +69 -0
- data/lib/google/cloud/dialogflow/v2/intents/paths.rb +96 -12
- data/lib/google/cloud/dialogflow/v2/participants/paths.rb +76 -0
- data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +72 -0
- data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +110 -0
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version_pb.rb +69 -0
- data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +59 -0
- data/lib/google/cloud/dialogflow/v2/versions.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +709 -0
- data/lib/google/cloud/dialogflow/v2/versions/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/versions/paths.rb +110 -0
- data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +9 -16
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +14 -2
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +169 -4
- data/proto_docs/google/cloud/dialogflow/v2/fulfillment.rb +144 -0
- data/proto_docs/google/cloud/dialogflow/v2/version.rb +176 -0
- metadata +17 -3
@@ -0,0 +1,52 @@
|
|
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 "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Dialogflow
|
24
|
+
module V2
|
25
|
+
module Fulfillments
|
26
|
+
# Credentials for the Fulfillments API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
30
|
+
"https://www.googleapis.com/auth/dialogflow"
|
31
|
+
]
|
32
|
+
self.env_vars = [
|
33
|
+
"DIALOGFLOW_CREDENTIALS",
|
34
|
+
"DIALOGFLOW_KEYFILE",
|
35
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
36
|
+
"GOOGLE_CLOUD_KEYFILE",
|
37
|
+
"GCLOUD_KEYFILE",
|
38
|
+
"DIALOGFLOW_CREDENTIALS_JSON",
|
39
|
+
"DIALOGFLOW_KEYFILE_JSON",
|
40
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
41
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
42
|
+
"GCLOUD_KEYFILE_JSON"
|
43
|
+
]
|
44
|
+
self.paths = [
|
45
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
46
|
+
]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Dialogflow
|
23
|
+
module V2
|
24
|
+
module Fulfillments
|
25
|
+
# Path helper methods for the Fulfillments API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Fulfillment resource string.
|
29
|
+
#
|
30
|
+
# @overload fulfillment_path(project:)
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `projects/{project}/agent/fulfillment`
|
34
|
+
#
|
35
|
+
# @param project [String]
|
36
|
+
#
|
37
|
+
# @overload fulfillment_path(project:, location:)
|
38
|
+
# The resource will be in the following format:
|
39
|
+
#
|
40
|
+
# `projects/{project}/locations/{location}/agent/fulfillment`
|
41
|
+
#
|
42
|
+
# @param project [String]
|
43
|
+
# @param location [String]
|
44
|
+
#
|
45
|
+
# @return [::String]
|
46
|
+
def fulfillment_path **args
|
47
|
+
resources = {
|
48
|
+
"project" => (proc do |project:|
|
49
|
+
"projects/#{project}/agent/fulfillment"
|
50
|
+
end),
|
51
|
+
"location:project" => (proc do |project:, location:|
|
52
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
53
|
+
|
54
|
+
"projects/#{project}/locations/#{location}/agent/fulfillment"
|
55
|
+
end)
|
56
|
+
}
|
57
|
+
|
58
|
+
resource = resources[args.keys.sort.join(":")]
|
59
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
60
|
+
resource.call(**args)
|
61
|
+
end
|
62
|
+
|
63
|
+
extend self
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -27,15 +27,37 @@ module Google
|
|
27
27
|
##
|
28
28
|
# Create a fully-qualified Agent resource string.
|
29
29
|
#
|
30
|
-
#
|
30
|
+
# @overload agent_path(project:)
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `projects/{project}/agent`
|
34
|
+
#
|
35
|
+
# @param project [String]
|
31
36
|
#
|
32
|
-
#
|
37
|
+
# @overload agent_path(project:, location:)
|
38
|
+
# The resource will be in the following format:
|
39
|
+
#
|
40
|
+
# `projects/{project}/locations/{location}/agent`
|
33
41
|
#
|
34
|
-
#
|
42
|
+
# @param project [String]
|
43
|
+
# @param location [String]
|
35
44
|
#
|
36
45
|
# @return [::String]
|
37
|
-
def agent_path
|
38
|
-
|
46
|
+
def agent_path **args
|
47
|
+
resources = {
|
48
|
+
"project" => (proc do |project:|
|
49
|
+
"projects/#{project}/agent"
|
50
|
+
end),
|
51
|
+
"location:project" => (proc do |project:, location:|
|
52
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
53
|
+
|
54
|
+
"projects/#{project}/locations/#{location}/agent"
|
55
|
+
end)
|
56
|
+
}
|
57
|
+
|
58
|
+
resource = resources[args.keys.sort.join(":")]
|
59
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
60
|
+
resource.call(**args)
|
39
61
|
end
|
40
62
|
|
41
63
|
##
|
@@ -61,6 +83,28 @@ module Google
|
|
61
83
|
# @param session [String]
|
62
84
|
# @param context [String]
|
63
85
|
#
|
86
|
+
# @overload context_path(project:, location:, session:, context:)
|
87
|
+
# The resource will be in the following format:
|
88
|
+
#
|
89
|
+
# `projects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}`
|
90
|
+
#
|
91
|
+
# @param project [String]
|
92
|
+
# @param location [String]
|
93
|
+
# @param session [String]
|
94
|
+
# @param context [String]
|
95
|
+
#
|
96
|
+
# @overload context_path(project:, location:, environment:, user:, session:, context:)
|
97
|
+
# The resource will be in the following format:
|
98
|
+
#
|
99
|
+
# `projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}`
|
100
|
+
#
|
101
|
+
# @param project [String]
|
102
|
+
# @param location [String]
|
103
|
+
# @param environment [String]
|
104
|
+
# @param user [String]
|
105
|
+
# @param session [String]
|
106
|
+
# @param context [String]
|
107
|
+
#
|
64
108
|
# @return [::String]
|
65
109
|
def context_path **args
|
66
110
|
resources = {
|
@@ -77,6 +121,22 @@ module Google
|
|
77
121
|
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
78
122
|
|
79
123
|
"projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
|
124
|
+
end),
|
125
|
+
"context:location:project:session" => (proc do |project:, location:, session:, context:|
|
126
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
127
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
128
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
129
|
+
|
130
|
+
"projects/#{project}/locations/#{location}/agent/sessions/#{session}/contexts/#{context}"
|
131
|
+
end),
|
132
|
+
"context:environment:location:project:session:user" => (proc do |project:, location:, environment:, user:, session:, context:|
|
133
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
134
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
135
|
+
raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
|
136
|
+
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
|
137
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
138
|
+
|
139
|
+
"projects/#{project}/locations/#{location}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
|
80
140
|
end)
|
81
141
|
}
|
82
142
|
|
@@ -88,18 +148,42 @@ module Google
|
|
88
148
|
##
|
89
149
|
# Create a fully-qualified Intent resource string.
|
90
150
|
#
|
91
|
-
#
|
151
|
+
# @overload intent_path(project:, intent:)
|
152
|
+
# The resource will be in the following format:
|
153
|
+
#
|
154
|
+
# `projects/{project}/agent/intents/{intent}`
|
155
|
+
#
|
156
|
+
# @param project [String]
|
157
|
+
# @param intent [String]
|
158
|
+
#
|
159
|
+
# @overload intent_path(project:, location:, intent:)
|
160
|
+
# The resource will be in the following format:
|
92
161
|
#
|
93
|
-
#
|
162
|
+
# `projects/{project}/locations/{location}/agent/intents/{intent}`
|
94
163
|
#
|
95
|
-
#
|
96
|
-
#
|
164
|
+
# @param project [String]
|
165
|
+
# @param location [String]
|
166
|
+
# @param intent [String]
|
97
167
|
#
|
98
168
|
# @return [::String]
|
99
|
-
def intent_path
|
100
|
-
|
169
|
+
def intent_path **args
|
170
|
+
resources = {
|
171
|
+
"intent:project" => (proc do |project:, intent:|
|
172
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
101
173
|
|
102
|
-
|
174
|
+
"projects/#{project}/agent/intents/#{intent}"
|
175
|
+
end),
|
176
|
+
"intent:location:project" => (proc do |project:, location:, intent:|
|
177
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
178
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
179
|
+
|
180
|
+
"projects/#{project}/locations/#{location}/agent/intents/#{intent}"
|
181
|
+
end)
|
182
|
+
}
|
183
|
+
|
184
|
+
resource = resources[args.keys.sort.join(":")]
|
185
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
186
|
+
resource.call(**args)
|
103
187
|
end
|
104
188
|
|
105
189
|
extend self
|
@@ -47,6 +47,28 @@ module Google
|
|
47
47
|
# @param session [String]
|
48
48
|
# @param context [String]
|
49
49
|
#
|
50
|
+
# @overload context_path(project:, location:, session:, context:)
|
51
|
+
# The resource will be in the following format:
|
52
|
+
#
|
53
|
+
# `projects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}`
|
54
|
+
#
|
55
|
+
# @param project [String]
|
56
|
+
# @param location [String]
|
57
|
+
# @param session [String]
|
58
|
+
# @param context [String]
|
59
|
+
#
|
60
|
+
# @overload context_path(project:, location:, environment:, user:, session:, context:)
|
61
|
+
# The resource will be in the following format:
|
62
|
+
#
|
63
|
+
# `projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}`
|
64
|
+
#
|
65
|
+
# @param project [String]
|
66
|
+
# @param location [String]
|
67
|
+
# @param environment [String]
|
68
|
+
# @param user [String]
|
69
|
+
# @param session [String]
|
70
|
+
# @param context [String]
|
71
|
+
#
|
50
72
|
# @return [::String]
|
51
73
|
def context_path **args
|
52
74
|
resources = {
|
@@ -63,6 +85,22 @@ module Google
|
|
63
85
|
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
64
86
|
|
65
87
|
"projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
|
88
|
+
end),
|
89
|
+
"context:location:project:session" => (proc do |project:, location:, session:, context:|
|
90
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
91
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
92
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
93
|
+
|
94
|
+
"projects/#{project}/locations/#{location}/agent/sessions/#{session}/contexts/#{context}"
|
95
|
+
end),
|
96
|
+
"context:environment:location:project:session:user" => (proc do |project:, location:, environment:, user:, session:, context:|
|
97
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
98
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
99
|
+
raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
|
100
|
+
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
|
101
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
102
|
+
|
103
|
+
"projects/#{project}/locations/#{location}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
|
66
104
|
end)
|
67
105
|
}
|
68
106
|
|
@@ -225,6 +263,28 @@ module Google
|
|
225
263
|
# @param session [String]
|
226
264
|
# @param entity_type [String]
|
227
265
|
#
|
266
|
+
# @overload session_entity_type_path(project:, location:, session:, entity_type:)
|
267
|
+
# The resource will be in the following format:
|
268
|
+
#
|
269
|
+
# `projects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type}`
|
270
|
+
#
|
271
|
+
# @param project [String]
|
272
|
+
# @param location [String]
|
273
|
+
# @param session [String]
|
274
|
+
# @param entity_type [String]
|
275
|
+
#
|
276
|
+
# @overload session_entity_type_path(project:, location:, environment:, user:, session:, entity_type:)
|
277
|
+
# The resource will be in the following format:
|
278
|
+
#
|
279
|
+
# `projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}`
|
280
|
+
#
|
281
|
+
# @param project [String]
|
282
|
+
# @param location [String]
|
283
|
+
# @param environment [String]
|
284
|
+
# @param user [String]
|
285
|
+
# @param session [String]
|
286
|
+
# @param entity_type [String]
|
287
|
+
#
|
228
288
|
# @return [::String]
|
229
289
|
def session_entity_type_path **args
|
230
290
|
resources = {
|
@@ -241,6 +301,22 @@ module Google
|
|
241
301
|
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
242
302
|
|
243
303
|
"projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/entityTypes/#{entity_type}"
|
304
|
+
end),
|
305
|
+
"entity_type:location:project:session" => (proc do |project:, location:, session:, entity_type:|
|
306
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
307
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
308
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
309
|
+
|
310
|
+
"projects/#{project}/locations/#{location}/agent/sessions/#{session}/entityTypes/#{entity_type}"
|
311
|
+
end),
|
312
|
+
"entity_type:environment:location:project:session:user" => (proc do |project:, location:, environment:, user:, session:, entity_type:|
|
313
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
314
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
315
|
+
raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
|
316
|
+
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
|
317
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
318
|
+
|
319
|
+
"projects/#{project}/locations/#{location}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/entityTypes/#{entity_type}"
|
244
320
|
end)
|
245
321
|
}
|
246
322
|
|
@@ -45,6 +45,26 @@ module Google
|
|
45
45
|
# @param user [String]
|
46
46
|
# @param session [String]
|
47
47
|
#
|
48
|
+
# @overload session_path(project:, location:, session:)
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/locations/{location}/agent/sessions/{session}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param location [String]
|
55
|
+
# @param session [String]
|
56
|
+
#
|
57
|
+
# @overload session_path(project:, location:, environment:, user:, session:)
|
58
|
+
# The resource will be in the following format:
|
59
|
+
#
|
60
|
+
# `projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}`
|
61
|
+
#
|
62
|
+
# @param project [String]
|
63
|
+
# @param location [String]
|
64
|
+
# @param environment [String]
|
65
|
+
# @param user [String]
|
66
|
+
# @param session [String]
|
67
|
+
#
|
48
68
|
# @return [::String]
|
49
69
|
def session_path **args
|
50
70
|
resources = {
|
@@ -59,6 +79,20 @@ module Google
|
|
59
79
|
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
|
60
80
|
|
61
81
|
"projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}"
|
82
|
+
end),
|
83
|
+
"location:project:session" => (proc do |project:, location:, session:|
|
84
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
85
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
86
|
+
|
87
|
+
"projects/#{project}/locations/#{location}/agent/sessions/#{session}"
|
88
|
+
end),
|
89
|
+
"environment:location:project:session:user" => (proc do |project:, location:, environment:, user:, session:|
|
90
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
91
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
92
|
+
raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
|
93
|
+
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
|
94
|
+
|
95
|
+
"projects/#{project}/locations/#{location}/agent/environments/#{environment}/users/#{user}/sessions/#{session}"
|
62
96
|
end)
|
63
97
|
}
|
64
98
|
|
@@ -90,6 +124,28 @@ module Google
|
|
90
124
|
# @param session [String]
|
91
125
|
# @param entity_type [String]
|
92
126
|
#
|
127
|
+
# @overload session_entity_type_path(project:, location:, session:, entity_type:)
|
128
|
+
# The resource will be in the following format:
|
129
|
+
#
|
130
|
+
# `projects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type}`
|
131
|
+
#
|
132
|
+
# @param project [String]
|
133
|
+
# @param location [String]
|
134
|
+
# @param session [String]
|
135
|
+
# @param entity_type [String]
|
136
|
+
#
|
137
|
+
# @overload session_entity_type_path(project:, location:, environment:, user:, session:, entity_type:)
|
138
|
+
# The resource will be in the following format:
|
139
|
+
#
|
140
|
+
# `projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}`
|
141
|
+
#
|
142
|
+
# @param project [String]
|
143
|
+
# @param location [String]
|
144
|
+
# @param environment [String]
|
145
|
+
# @param user [String]
|
146
|
+
# @param session [String]
|
147
|
+
# @param entity_type [String]
|
148
|
+
#
|
93
149
|
# @return [::String]
|
94
150
|
def session_entity_type_path **args
|
95
151
|
resources = {
|
@@ -106,6 +162,22 @@ module Google
|
|
106
162
|
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
107
163
|
|
108
164
|
"projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/entityTypes/#{entity_type}"
|
165
|
+
end),
|
166
|
+
"entity_type:location:project:session" => (proc do |project:, location:, session:, entity_type:|
|
167
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
168
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
169
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
170
|
+
|
171
|
+
"projects/#{project}/locations/#{location}/agent/sessions/#{session}/entityTypes/#{entity_type}"
|
172
|
+
end),
|
173
|
+
"entity_type:environment:location:project:session:user" => (proc do |project:, location:, environment:, user:, session:, entity_type:|
|
174
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
175
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
176
|
+
raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
|
177
|
+
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
|
178
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
179
|
+
|
180
|
+
"projects/#{project}/locations/#{location}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/entityTypes/#{entity_type}"
|
109
181
|
end)
|
110
182
|
}
|
111
183
|
|