google-cloud-ces-v1 0.a → 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 +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/cloud/ces/v1/agent_pb.rb +30 -0
- data/lib/google/cloud/ces/v1/agent_service/client.rb +5315 -0
- data/lib/google/cloud/ces/v1/agent_service/credentials.rb +48 -0
- data/lib/google/cloud/ces/v1/agent_service/operations.rb +841 -0
- data/lib/google/cloud/ces/v1/agent_service/paths.rb +424 -0
- data/lib/google/cloud/ces/v1/agent_service/rest/client.rb +4944 -0
- data/lib/google/cloud/ces/v1/agent_service/rest/operations.rb +925 -0
- data/lib/google/cloud/ces/v1/agent_service/rest/service_stub.rb +3028 -0
- data/lib/google/cloud/ces/v1/agent_service/rest.rb +55 -0
- data/lib/google/cloud/ces/v1/agent_service.rb +57 -0
- data/lib/google/cloud/ces/v1/agent_service_pb.rb +105 -0
- data/lib/google/cloud/ces/v1/agent_service_services_pb.rb +142 -0
- data/lib/google/cloud/ces/v1/agent_tool_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/agent_transfers_pb.rb +29 -0
- data/lib/google/cloud/ces/v1/app_pb.rb +58 -0
- data/lib/google/cloud/ces/v1/app_version_pb.rb +32 -0
- data/lib/google/cloud/ces/v1/auth_pb.rb +34 -0
- data/lib/google/cloud/ces/v1/bigquery_export_pb.rb +23 -0
- data/lib/google/cloud/ces/v1/bindings_override.rb +75 -0
- data/lib/google/cloud/ces/v1/changelog_pb.rb +26 -0
- data/lib/google/cloud/ces/v1/client_function_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/common_pb.rb +46 -0
- data/lib/google/cloud/ces/v1/connector_tool_pb.rb +27 -0
- data/lib/google/cloud/ces/v1/connector_toolset_pb.rb +25 -0
- data/lib/google/cloud/ces/v1/conversation_pb.rb +31 -0
- data/lib/google/cloud/ces/v1/data_store_pb.rb +27 -0
- data/lib/google/cloud/ces/v1/data_store_tool_pb.rb +40 -0
- data/lib/google/cloud/ces/v1/deployment_pb.rb +26 -0
- data/lib/google/cloud/ces/v1/example_pb.rb +34 -0
- data/lib/google/cloud/ces/v1/fakes_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/file_search_tool_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/google_search_tool_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/guardrail_pb.rb +37 -0
- data/lib/google/cloud/ces/v1/mcp_tool_pb.rb +26 -0
- data/lib/google/cloud/ces/v1/mcp_toolset_pb.rb +25 -0
- data/lib/google/cloud/ces/v1/omnichannel_pb.rb +31 -0
- data/lib/google/cloud/ces/v1/omnichannel_service_pb.rb +27 -0
- data/lib/google/cloud/ces/v1/open_api_tool_pb.rb +25 -0
- data/lib/google/cloud/ces/v1/open_api_toolset_pb.rb +25 -0
- data/lib/google/cloud/ces/v1/python_function_pb.rb +23 -0
- data/lib/google/cloud/ces/v1/rest.rb +41 -0
- data/lib/google/cloud/ces/v1/schema_pb.rb +25 -0
- data/lib/google/cloud/ces/v1/search_suggestions_pb.rb +22 -0
- data/lib/google/cloud/ces/v1/security_settings_pb.rb +27 -0
- data/lib/google/cloud/ces/v1/session_service/client.rb +759 -0
- data/lib/google/cloud/ces/v1/session_service/credentials.rb +48 -0
- data/lib/google/cloud/ces/v1/session_service/paths.rb +117 -0
- data/lib/google/cloud/ces/v1/session_service/rest/client.rb +560 -0
- data/lib/google/cloud/ces/v1/session_service/rest/service_stub.rb +199 -0
- data/lib/google/cloud/ces/v1/session_service/rest.rb +53 -0
- data/lib/google/cloud/ces/v1/session_service.rb +55 -0
- data/lib/google/cloud/ces/v1/session_service_pb.rb +50 -0
- data/lib/google/cloud/ces/v1/session_service_services_pb.rb +119 -0
- data/lib/google/cloud/ces/v1/system_tool_pb.rb +23 -0
- data/lib/google/cloud/ces/v1/tool_pb.rb +38 -0
- data/lib/google/cloud/ces/v1/tool_service/client.rb +723 -0
- data/lib/google/cloud/ces/v1/tool_service/credentials.rb +48 -0
- data/lib/google/cloud/ces/v1/tool_service/paths.rb +94 -0
- data/lib/google/cloud/ces/v1/tool_service/rest/client.rb +667 -0
- data/lib/google/cloud/ces/v1/tool_service/rest/service_stub.rb +267 -0
- data/lib/google/cloud/ces/v1/tool_service/rest.rb +53 -0
- data/lib/google/cloud/ces/v1/tool_service.rb +55 -0
- data/lib/google/cloud/ces/v1/tool_service_pb.rb +35 -0
- data/lib/google/cloud/ces/v1/tool_service_services_pb.rb +50 -0
- data/lib/google/cloud/ces/v1/toolset_pb.rb +30 -0
- data/lib/google/cloud/ces/v1/toolset_tool_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/version.rb +7 -2
- data/lib/google/cloud/ces/v1/widget_service/client.rb +501 -0
- data/lib/google/cloud/ces/v1/widget_service/credentials.rb +48 -0
- data/lib/google/cloud/ces/v1/widget_service/paths.rb +75 -0
- data/lib/google/cloud/ces/v1/widget_service/rest/client.rb +459 -0
- data/lib/google/cloud/ces/v1/widget_service/rest/service_stub.rb +143 -0
- data/lib/google/cloud/ces/v1/widget_service/rest.rb +53 -0
- data/lib/google/cloud/ces/v1/widget_service.rb +55 -0
- data/lib/google/cloud/ces/v1/widget_service_pb.rb +28 -0
- data/lib/google/cloud/ces/v1/widget_service_services_pb.rb +46 -0
- data/lib/google/cloud/ces/v1/widget_tool_pb.rb +29 -0
- data/lib/google/cloud/ces/v1.rb +48 -0
- data/lib/google-cloud-ces-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +593 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/ces/v1/agent.rb +224 -0
- data/proto_docs/google/cloud/ces/v1/agent_service.rb +1250 -0
- data/proto_docs/google/cloud/ces/v1/agent_tool.rb +42 -0
- data/proto_docs/google/cloud/ces/v1/agent_transfers.rb +111 -0
- data/proto_docs/google/cloud/ces/v1/app.rb +685 -0
- data/proto_docs/google/cloud/ces/v1/app_version.rb +83 -0
- data/proto_docs/google/cloud/ces/v1/auth.rb +214 -0
- data/proto_docs/google/cloud/ces/v1/bigquery_export.rb +45 -0
- data/proto_docs/google/cloud/ces/v1/changelog.rb +73 -0
- data/proto_docs/google/cloud/ces/v1/client_function.rb +48 -0
- data/proto_docs/google/cloud/ces/v1/common.rb +375 -0
- data/proto_docs/google/cloud/ces/v1/connector_tool.rb +122 -0
- data/proto_docs/google/cloud/ces/v1/connector_toolset.rb +52 -0
- data/proto_docs/google/cloud/ces/v1/conversation.rb +152 -0
- data/proto_docs/google/cloud/ces/v1/data_store.rb +102 -0
- data/proto_docs/google/cloud/ces/v1/data_store_tool.rb +328 -0
- data/proto_docs/google/cloud/ces/v1/deployment.rb +62 -0
- data/proto_docs/google/cloud/ces/v1/example.rb +244 -0
- data/proto_docs/google/cloud/ces/v1/fakes.rb +55 -0
- data/proto_docs/google/cloud/ces/v1/file_search_tool.rb +60 -0
- data/proto_docs/google/cloud/ces/v1/google_search_tool.rb +76 -0
- data/proto_docs/google/cloud/ces/v1/guardrail.rb +324 -0
- data/proto_docs/google/cloud/ces/v1/mcp_tool.rb +85 -0
- data/proto_docs/google/cloud/ces/v1/mcp_toolset.rb +71 -0
- data/proto_docs/google/cloud/ces/v1/omnichannel.rb +163 -0
- data/proto_docs/google/cloud/ces/v1/omnichannel_service.rb +45 -0
- data/proto_docs/google/cloud/ces/v1/open_api_tool.rb +66 -0
- data/proto_docs/google/cloud/ces/v1/open_api_toolset.rb +57 -0
- data/proto_docs/google/cloud/ces/v1/python_function.rb +44 -0
- data/proto_docs/google/cloud/ces/v1/schema.rb +162 -0
- data/proto_docs/google/cloud/ces/v1/search_suggestions.rb +55 -0
- data/proto_docs/google/cloud/ces/v1/security_settings.rb +80 -0
- data/proto_docs/google/cloud/ces/v1/session_service.rb +464 -0
- data/proto_docs/google/cloud/ces/v1/system_tool.rb +38 -0
- data/proto_docs/google/cloud/ces/v1/tool.rb +126 -0
- data/proto_docs/google/cloud/ces/v1/tool_service.rb +168 -0
- data/proto_docs/google/cloud/ces/v1/toolset.rb +80 -0
- data/proto_docs/google/cloud/ces/v1/toolset_tool.rb +40 -0
- data/proto_docs/google/cloud/ces/v1/widget_service.rb +62 -0
- data/proto_docs/google/cloud/ces/v1/widget_tool.rb +146 -0
- data/proto_docs/google/longrunning/operations.rb +191 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +108 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- metadata +183 -9
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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 Ces
|
|
23
|
+
module V1
|
|
24
|
+
module AgentService
|
|
25
|
+
# Path helper methods for the AgentService API.
|
|
26
|
+
module Paths
|
|
27
|
+
##
|
|
28
|
+
# Create a fully-qualified Agent resource string.
|
|
29
|
+
#
|
|
30
|
+
# The resource will be in the following format:
|
|
31
|
+
#
|
|
32
|
+
# `projects/{project}/locations/{location}/apps/{app}/agents/{agent}`
|
|
33
|
+
#
|
|
34
|
+
# @param project [String]
|
|
35
|
+
# @param location [String]
|
|
36
|
+
# @param app [String]
|
|
37
|
+
# @param agent [String]
|
|
38
|
+
#
|
|
39
|
+
# @return [::String]
|
|
40
|
+
def agent_path project:, location:, app:, agent:
|
|
41
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
42
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
43
|
+
raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/"
|
|
44
|
+
|
|
45
|
+
"projects/#{project}/locations/#{location}/apps/#{app}/agents/#{agent}"
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
##
|
|
49
|
+
# Create a fully-qualified App resource string.
|
|
50
|
+
#
|
|
51
|
+
# The resource will be in the following format:
|
|
52
|
+
#
|
|
53
|
+
# `projects/{project}/locations/{location}/apps/{app}`
|
|
54
|
+
#
|
|
55
|
+
# @param project [String]
|
|
56
|
+
# @param location [String]
|
|
57
|
+
# @param app [String]
|
|
58
|
+
#
|
|
59
|
+
# @return [::String]
|
|
60
|
+
def app_path project:, location:, app:
|
|
61
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
62
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
63
|
+
|
|
64
|
+
"projects/#{project}/locations/#{location}/apps/#{app}"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
##
|
|
68
|
+
# Create a fully-qualified AppVersion resource string.
|
|
69
|
+
#
|
|
70
|
+
# The resource will be in the following format:
|
|
71
|
+
#
|
|
72
|
+
# `projects/{project}/locations/{location}/apps/{app}/versions/{version}`
|
|
73
|
+
#
|
|
74
|
+
# @param project [String]
|
|
75
|
+
# @param location [String]
|
|
76
|
+
# @param app [String]
|
|
77
|
+
# @param version [String]
|
|
78
|
+
#
|
|
79
|
+
# @return [::String]
|
|
80
|
+
def app_version_path project:, location:, app:, version:
|
|
81
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
82
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
83
|
+
raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/"
|
|
84
|
+
|
|
85
|
+
"projects/#{project}/locations/#{location}/apps/#{app}/versions/#{version}"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
##
|
|
89
|
+
# Create a fully-qualified Changelog resource string.
|
|
90
|
+
#
|
|
91
|
+
# The resource will be in the following format:
|
|
92
|
+
#
|
|
93
|
+
# `projects/{project}/locations/{location}/apps/{app}/changelogs/{changelog}`
|
|
94
|
+
#
|
|
95
|
+
# @param project [String]
|
|
96
|
+
# @param location [String]
|
|
97
|
+
# @param app [String]
|
|
98
|
+
# @param changelog [String]
|
|
99
|
+
#
|
|
100
|
+
# @return [::String]
|
|
101
|
+
def changelog_path project:, location:, app:, changelog:
|
|
102
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
103
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
104
|
+
raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/"
|
|
105
|
+
|
|
106
|
+
"projects/#{project}/locations/#{location}/apps/#{app}/changelogs/#{changelog}"
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
##
|
|
110
|
+
# Create a fully-qualified Conversation resource string.
|
|
111
|
+
#
|
|
112
|
+
# The resource will be in the following format:
|
|
113
|
+
#
|
|
114
|
+
# `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}`
|
|
115
|
+
#
|
|
116
|
+
# @param project [String]
|
|
117
|
+
# @param location [String]
|
|
118
|
+
# @param app [String]
|
|
119
|
+
# @param conversation [String]
|
|
120
|
+
#
|
|
121
|
+
# @return [::String]
|
|
122
|
+
def conversation_path project:, location:, app:, conversation:
|
|
123
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
124
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
125
|
+
raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/"
|
|
126
|
+
|
|
127
|
+
"projects/#{project}/locations/#{location}/apps/#{app}/conversations/#{conversation}"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
##
|
|
131
|
+
# Create a fully-qualified DeidentifyTemplate resource string.
|
|
132
|
+
#
|
|
133
|
+
# @overload deidentify_template_path(organization:, location:, deidentify_template:)
|
|
134
|
+
# The resource will be in the following format:
|
|
135
|
+
#
|
|
136
|
+
# `organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}`
|
|
137
|
+
#
|
|
138
|
+
# @param organization [String]
|
|
139
|
+
# @param location [String]
|
|
140
|
+
# @param deidentify_template [String]
|
|
141
|
+
#
|
|
142
|
+
# @overload deidentify_template_path(project:, location:, deidentify_template:)
|
|
143
|
+
# The resource will be in the following format:
|
|
144
|
+
#
|
|
145
|
+
# `projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}`
|
|
146
|
+
#
|
|
147
|
+
# @param project [String]
|
|
148
|
+
# @param location [String]
|
|
149
|
+
# @param deidentify_template [String]
|
|
150
|
+
#
|
|
151
|
+
# @return [::String]
|
|
152
|
+
def deidentify_template_path **args
|
|
153
|
+
resources = {
|
|
154
|
+
"deidentify_template:location:organization" => (proc do |organization:, location:, deidentify_template:|
|
|
155
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
156
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
157
|
+
|
|
158
|
+
"organizations/#{organization}/locations/#{location}/deidentifyTemplates/#{deidentify_template}"
|
|
159
|
+
end),
|
|
160
|
+
"deidentify_template:location:project" => (proc do |project:, location:, deidentify_template:|
|
|
161
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
162
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
163
|
+
|
|
164
|
+
"projects/#{project}/locations/#{location}/deidentifyTemplates/#{deidentify_template}"
|
|
165
|
+
end)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
resource = resources[args.keys.sort.join(":")]
|
|
169
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
170
|
+
resource.call(**args)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
##
|
|
174
|
+
# Create a fully-qualified Deployment resource string.
|
|
175
|
+
#
|
|
176
|
+
# The resource will be in the following format:
|
|
177
|
+
#
|
|
178
|
+
# `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}`
|
|
179
|
+
#
|
|
180
|
+
# @param project [String]
|
|
181
|
+
# @param location [String]
|
|
182
|
+
# @param app [String]
|
|
183
|
+
# @param deployment [String]
|
|
184
|
+
#
|
|
185
|
+
# @return [::String]
|
|
186
|
+
def deployment_path project:, location:, app:, deployment:
|
|
187
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
188
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
189
|
+
raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/"
|
|
190
|
+
|
|
191
|
+
"projects/#{project}/locations/#{location}/apps/#{app}/deployments/#{deployment}"
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
##
|
|
195
|
+
# Create a fully-qualified DialogflowAgent resource string.
|
|
196
|
+
#
|
|
197
|
+
# The resource will be in the following format:
|
|
198
|
+
#
|
|
199
|
+
# `projects/{project}/locations/{location}/agents/{agent}`
|
|
200
|
+
#
|
|
201
|
+
# @param project [String]
|
|
202
|
+
# @param location [String]
|
|
203
|
+
# @param agent [String]
|
|
204
|
+
#
|
|
205
|
+
# @return [::String]
|
|
206
|
+
def dialogflow_agent_path project:, location:, agent:
|
|
207
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
208
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
209
|
+
|
|
210
|
+
"projects/#{project}/locations/#{location}/agents/#{agent}"
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
##
|
|
214
|
+
# Create a fully-qualified Engine resource string.
|
|
215
|
+
#
|
|
216
|
+
# The resource will be in the following format:
|
|
217
|
+
#
|
|
218
|
+
# `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
|
|
219
|
+
#
|
|
220
|
+
# @param project [String]
|
|
221
|
+
# @param location [String]
|
|
222
|
+
# @param collection [String]
|
|
223
|
+
# @param engine [String]
|
|
224
|
+
#
|
|
225
|
+
# @return [::String]
|
|
226
|
+
def engine_path project:, location:, collection:, engine:
|
|
227
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
228
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
229
|
+
raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
|
|
230
|
+
|
|
231
|
+
"projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}"
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
##
|
|
235
|
+
# Create a fully-qualified Example resource string.
|
|
236
|
+
#
|
|
237
|
+
# The resource will be in the following format:
|
|
238
|
+
#
|
|
239
|
+
# `projects/{project}/locations/{location}/apps/{app}/examples/{example}`
|
|
240
|
+
#
|
|
241
|
+
# @param project [String]
|
|
242
|
+
# @param location [String]
|
|
243
|
+
# @param app [String]
|
|
244
|
+
# @param example [String]
|
|
245
|
+
#
|
|
246
|
+
# @return [::String]
|
|
247
|
+
def example_path project:, location:, app:, example:
|
|
248
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
249
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
250
|
+
raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/"
|
|
251
|
+
|
|
252
|
+
"projects/#{project}/locations/#{location}/apps/#{app}/examples/#{example}"
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
##
|
|
256
|
+
# Create a fully-qualified Guardrail resource string.
|
|
257
|
+
#
|
|
258
|
+
# The resource will be in the following format:
|
|
259
|
+
#
|
|
260
|
+
# `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}`
|
|
261
|
+
#
|
|
262
|
+
# @param project [String]
|
|
263
|
+
# @param location [String]
|
|
264
|
+
# @param app [String]
|
|
265
|
+
# @param guardrail [String]
|
|
266
|
+
#
|
|
267
|
+
# @return [::String]
|
|
268
|
+
def guardrail_path project:, location:, app:, guardrail:
|
|
269
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
270
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
271
|
+
raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/"
|
|
272
|
+
|
|
273
|
+
"projects/#{project}/locations/#{location}/apps/#{app}/guardrails/#{guardrail}"
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
##
|
|
277
|
+
# Create a fully-qualified InspectTemplate resource string.
|
|
278
|
+
#
|
|
279
|
+
# @overload inspect_template_path(organization:, location:, inspect_template:)
|
|
280
|
+
# The resource will be in the following format:
|
|
281
|
+
#
|
|
282
|
+
# `organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}`
|
|
283
|
+
#
|
|
284
|
+
# @param organization [String]
|
|
285
|
+
# @param location [String]
|
|
286
|
+
# @param inspect_template [String]
|
|
287
|
+
#
|
|
288
|
+
# @overload inspect_template_path(project:, location:, inspect_template:)
|
|
289
|
+
# The resource will be in the following format:
|
|
290
|
+
#
|
|
291
|
+
# `projects/{project}/locations/{location}/inspectTemplates/{inspect_template}`
|
|
292
|
+
#
|
|
293
|
+
# @param project [String]
|
|
294
|
+
# @param location [String]
|
|
295
|
+
# @param inspect_template [String]
|
|
296
|
+
#
|
|
297
|
+
# @return [::String]
|
|
298
|
+
def inspect_template_path **args
|
|
299
|
+
resources = {
|
|
300
|
+
"inspect_template:location:organization" => (proc do |organization:, location:, inspect_template:|
|
|
301
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
302
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
303
|
+
|
|
304
|
+
"organizations/#{organization}/locations/#{location}/inspectTemplates/#{inspect_template}"
|
|
305
|
+
end),
|
|
306
|
+
"inspect_template:location:project" => (proc do |project:, location:, inspect_template:|
|
|
307
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
308
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
309
|
+
|
|
310
|
+
"projects/#{project}/locations/#{location}/inspectTemplates/#{inspect_template}"
|
|
311
|
+
end)
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
resource = resources[args.keys.sort.join(":")]
|
|
315
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
316
|
+
resource.call(**args)
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
##
|
|
320
|
+
# Create a fully-qualified Location resource string.
|
|
321
|
+
#
|
|
322
|
+
# The resource will be in the following format:
|
|
323
|
+
#
|
|
324
|
+
# `projects/{project}/locations/{location}`
|
|
325
|
+
#
|
|
326
|
+
# @param project [String]
|
|
327
|
+
# @param location [String]
|
|
328
|
+
#
|
|
329
|
+
# @return [::String]
|
|
330
|
+
def location_path project:, location:
|
|
331
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
332
|
+
|
|
333
|
+
"projects/#{project}/locations/#{location}"
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
##
|
|
337
|
+
# Create a fully-qualified SecretVersion resource string.
|
|
338
|
+
#
|
|
339
|
+
# The resource will be in the following format:
|
|
340
|
+
#
|
|
341
|
+
# `projects/{project}/secrets/{secret}/versions/{secret_version}`
|
|
342
|
+
#
|
|
343
|
+
# @param project [String]
|
|
344
|
+
# @param secret [String]
|
|
345
|
+
# @param secret_version [String]
|
|
346
|
+
#
|
|
347
|
+
# @return [::String]
|
|
348
|
+
def secret_version_path project:, secret:, secret_version:
|
|
349
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
350
|
+
raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
|
|
351
|
+
|
|
352
|
+
"projects/#{project}/secrets/#{secret}/versions/#{secret_version}"
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
##
|
|
356
|
+
# Create a fully-qualified Service resource string.
|
|
357
|
+
#
|
|
358
|
+
# The resource will be in the following format:
|
|
359
|
+
#
|
|
360
|
+
# `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}`
|
|
361
|
+
#
|
|
362
|
+
# @param project [String]
|
|
363
|
+
# @param location [String]
|
|
364
|
+
# @param namespace [String]
|
|
365
|
+
# @param service [String]
|
|
366
|
+
#
|
|
367
|
+
# @return [::String]
|
|
368
|
+
def service_path project:, location:, namespace:, service:
|
|
369
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
370
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
371
|
+
raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/"
|
|
372
|
+
|
|
373
|
+
"projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}"
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
##
|
|
377
|
+
# Create a fully-qualified Tool resource string.
|
|
378
|
+
#
|
|
379
|
+
# The resource will be in the following format:
|
|
380
|
+
#
|
|
381
|
+
# `projects/{project}/locations/{location}/apps/{app}/tools/{tool}`
|
|
382
|
+
#
|
|
383
|
+
# @param project [String]
|
|
384
|
+
# @param location [String]
|
|
385
|
+
# @param app [String]
|
|
386
|
+
# @param tool [String]
|
|
387
|
+
#
|
|
388
|
+
# @return [::String]
|
|
389
|
+
def tool_path project:, location:, app:, tool:
|
|
390
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
391
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
392
|
+
raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/"
|
|
393
|
+
|
|
394
|
+
"projects/#{project}/locations/#{location}/apps/#{app}/tools/#{tool}"
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
##
|
|
398
|
+
# Create a fully-qualified Toolset resource string.
|
|
399
|
+
#
|
|
400
|
+
# The resource will be in the following format:
|
|
401
|
+
#
|
|
402
|
+
# `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}`
|
|
403
|
+
#
|
|
404
|
+
# @param project [String]
|
|
405
|
+
# @param location [String]
|
|
406
|
+
# @param app [String]
|
|
407
|
+
# @param toolset [String]
|
|
408
|
+
#
|
|
409
|
+
# @return [::String]
|
|
410
|
+
def toolset_path project:, location:, app:, toolset:
|
|
411
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
412
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
413
|
+
raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/"
|
|
414
|
+
|
|
415
|
+
"projects/#{project}/locations/#{location}/apps/#{app}/toolsets/#{toolset}"
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
extend self
|
|
419
|
+
end
|
|
420
|
+
end
|
|
421
|
+
end
|
|
422
|
+
end
|
|
423
|
+
end
|
|
424
|
+
end
|