google-cloud-run-v2 0.24.1 → 0.26.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/lib/google/cloud/run/v2/build_pb.rb +1 -1
- data/lib/google/cloud/run/v2/builds/paths.rb +2 -2
- data/lib/google/cloud/run/v2/instance_split_pb.rb +46 -0
- data/lib/google/cloud/run/v2/rest.rb +1 -0
- data/lib/google/cloud/run/v2/revision_pb.rb +1 -1
- data/lib/google/cloud/run/v2/revisions/rest/service_stub.rb +21 -0
- data/lib/google/cloud/run/v2/services/paths.rb +19 -19
- data/lib/google/cloud/run/v2/task_pb.rb +1 -1
- data/lib/google/cloud/run/v2/task_template_pb.rb +1 -1
- data/lib/google/cloud/run/v2/vendor_settings_pb.rb +2 -1
- data/lib/google/cloud/run/v2/version.rb +1 -1
- data/lib/google/cloud/run/v2/worker_pool_pb.rb +70 -0
- data/lib/google/cloud/run/v2/worker_pool_revision_template_pb.rb +51 -0
- data/lib/google/cloud/run/v2/worker_pool_services_pb.rb +63 -0
- data/lib/google/cloud/run/v2/worker_pools/client.rb +1258 -0
- data/lib/google/cloud/run/v2/worker_pools/credentials.rb +47 -0
- data/lib/google/cloud/run/v2/worker_pools/operations.rb +821 -0
- data/lib/google/cloud/run/v2/worker_pools/paths.rb +218 -0
- data/lib/google/cloud/run/v2/worker_pools/rest/client.rb +1161 -0
- data/lib/google/cloud/run/v2/worker_pools/rest/operations.rb +1082 -0
- data/lib/google/cloud/run/v2/worker_pools/rest/service_stub.rb +573 -0
- data/lib/google/cloud/run/v2/worker_pools/rest.rb +53 -0
- data/lib/google/cloud/run/v2/worker_pools.rb +56 -0
- data/lib/google/cloud/run/v2.rb +1 -0
- data/proto_docs/google/cloud/run/v2/instance_split.rb +71 -0
- data/proto_docs/google/cloud/run/v2/task.rb +12 -0
- data/proto_docs/google/cloud/run/v2/task_template.rb +3 -0
- data/proto_docs/google/cloud/run/v2/vendor_settings.rb +9 -0
- data/proto_docs/google/cloud/run/v2/worker_pool.rb +351 -0
- data/proto_docs/google/cloud/run/v2/worker_pool_revision_template.rb +117 -0
- metadata +17 -1
@@ -0,0 +1,218 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 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 Run
|
23
|
+
module V2
|
24
|
+
module WorkerPools
|
25
|
+
# Path helper methods for the WorkerPools API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Connector resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/connectors/{connector}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param connector [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def connector_path project:, location:, connector:
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/locations/#{location}/connectors/#{connector}"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Create a fully-qualified CryptoKey resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param location [String]
|
55
|
+
# @param key_ring [String]
|
56
|
+
# @param crypto_key [String]
|
57
|
+
#
|
58
|
+
# @return [::String]
|
59
|
+
def crypto_key_path project:, location:, key_ring:, crypto_key:
|
60
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
61
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
62
|
+
raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
|
63
|
+
|
64
|
+
"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
|
65
|
+
end
|
66
|
+
|
67
|
+
##
|
68
|
+
# Create a fully-qualified Location resource string.
|
69
|
+
#
|
70
|
+
# The resource will be in the following format:
|
71
|
+
#
|
72
|
+
# `projects/{project}/locations/{location}`
|
73
|
+
#
|
74
|
+
# @param project [String]
|
75
|
+
# @param location [String]
|
76
|
+
#
|
77
|
+
# @return [::String]
|
78
|
+
def location_path project:, location:
|
79
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
80
|
+
|
81
|
+
"projects/#{project}/locations/#{location}"
|
82
|
+
end
|
83
|
+
|
84
|
+
##
|
85
|
+
# Create a fully-qualified Mesh resource string.
|
86
|
+
#
|
87
|
+
# The resource will be in the following format:
|
88
|
+
#
|
89
|
+
# `projects/{project}/locations/{location}/meshes/{mesh}`
|
90
|
+
#
|
91
|
+
# @param project [String]
|
92
|
+
# @param location [String]
|
93
|
+
# @param mesh [String]
|
94
|
+
#
|
95
|
+
# @return [::String]
|
96
|
+
def mesh_path project:, location:, mesh:
|
97
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
98
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
99
|
+
|
100
|
+
"projects/#{project}/locations/#{location}/meshes/#{mesh}"
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Create a fully-qualified Policy resource string.
|
105
|
+
#
|
106
|
+
# @overload policy_path(project:)
|
107
|
+
# The resource will be in the following format:
|
108
|
+
#
|
109
|
+
# `projects/{project}/policy`
|
110
|
+
#
|
111
|
+
# @param project [String]
|
112
|
+
#
|
113
|
+
# @overload policy_path(location:)
|
114
|
+
# The resource will be in the following format:
|
115
|
+
#
|
116
|
+
# `locations/{location}/policy`
|
117
|
+
#
|
118
|
+
# @param location [String]
|
119
|
+
#
|
120
|
+
# @return [::String]
|
121
|
+
def policy_path **args
|
122
|
+
resources = {
|
123
|
+
"project" => (proc do |project:|
|
124
|
+
"projects/#{project}/policy"
|
125
|
+
end),
|
126
|
+
"location" => (proc do |location:|
|
127
|
+
"locations/#{location}/policy"
|
128
|
+
end)
|
129
|
+
}
|
130
|
+
|
131
|
+
resource = resources[args.keys.sort.join(":")]
|
132
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
133
|
+
resource.call(**args)
|
134
|
+
end
|
135
|
+
|
136
|
+
##
|
137
|
+
# Create a fully-qualified Revision resource string.
|
138
|
+
#
|
139
|
+
# The resource will be in the following format:
|
140
|
+
#
|
141
|
+
# `projects/{project}/locations/{location}/services/{service}/revisions/{revision}`
|
142
|
+
#
|
143
|
+
# @param project [String]
|
144
|
+
# @param location [String]
|
145
|
+
# @param service [String]
|
146
|
+
# @param revision [String]
|
147
|
+
#
|
148
|
+
# @return [::String]
|
149
|
+
def revision_path project:, location:, service:, revision:
|
150
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
151
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
152
|
+
raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/"
|
153
|
+
|
154
|
+
"projects/#{project}/locations/#{location}/services/#{service}/revisions/#{revision}"
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Create a fully-qualified Secret resource string.
|
159
|
+
#
|
160
|
+
# The resource will be in the following format:
|
161
|
+
#
|
162
|
+
# `projects/{project}/secrets/{secret}`
|
163
|
+
#
|
164
|
+
# @param project [String]
|
165
|
+
# @param secret [String]
|
166
|
+
#
|
167
|
+
# @return [::String]
|
168
|
+
def secret_path project:, secret:
|
169
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
170
|
+
|
171
|
+
"projects/#{project}/secrets/#{secret}"
|
172
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# Create a fully-qualified SecretVersion resource string.
|
176
|
+
#
|
177
|
+
# The resource will be in the following format:
|
178
|
+
#
|
179
|
+
# `projects/{project}/secrets/{secret}/versions/{version}`
|
180
|
+
#
|
181
|
+
# @param project [String]
|
182
|
+
# @param secret [String]
|
183
|
+
# @param version [String]
|
184
|
+
#
|
185
|
+
# @return [::String]
|
186
|
+
def secret_version_path project:, secret:, version:
|
187
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
188
|
+
raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
|
189
|
+
|
190
|
+
"projects/#{project}/secrets/#{secret}/versions/#{version}"
|
191
|
+
end
|
192
|
+
|
193
|
+
##
|
194
|
+
# Create a fully-qualified WorkerPool resource string.
|
195
|
+
#
|
196
|
+
# The resource will be in the following format:
|
197
|
+
#
|
198
|
+
# `projects/{project}/locations/{location}/workerPools/{worker_pool}`
|
199
|
+
#
|
200
|
+
# @param project [String]
|
201
|
+
# @param location [String]
|
202
|
+
# @param worker_pool [String]
|
203
|
+
#
|
204
|
+
# @return [::String]
|
205
|
+
def worker_pool_path project:, location:, worker_pool:
|
206
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
207
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
208
|
+
|
209
|
+
"projects/#{project}/locations/#{location}/workerPools/#{worker_pool}"
|
210
|
+
end
|
211
|
+
|
212
|
+
extend self
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|