1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://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, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\CloudRun;
|
---|
19 |
|
---|
20 | class Container extends \Google\Collection
|
---|
21 | {
|
---|
22 | protected $collection_key = 'volumeMounts';
|
---|
23 | /**
|
---|
24 | * @var string[]
|
---|
25 | */
|
---|
26 | public $args;
|
---|
27 | /**
|
---|
28 | * @var string[]
|
---|
29 | */
|
---|
30 | public $command;
|
---|
31 | protected $envType = EnvVar::class;
|
---|
32 | protected $envDataType = 'array';
|
---|
33 | protected $envFromType = EnvFromSource::class;
|
---|
34 | protected $envFromDataType = 'array';
|
---|
35 | /**
|
---|
36 | * @var string
|
---|
37 | */
|
---|
38 | public $image;
|
---|
39 | /**
|
---|
40 | * @var string
|
---|
41 | */
|
---|
42 | public $imagePullPolicy;
|
---|
43 | protected $livenessProbeType = Probe::class;
|
---|
44 | protected $livenessProbeDataType = '';
|
---|
45 | /**
|
---|
46 | * @var string
|
---|
47 | */
|
---|
48 | public $name;
|
---|
49 | protected $portsType = ContainerPort::class;
|
---|
50 | protected $portsDataType = 'array';
|
---|
51 | protected $readinessProbeType = Probe::class;
|
---|
52 | protected $readinessProbeDataType = '';
|
---|
53 | protected $resourcesType = ResourceRequirements::class;
|
---|
54 | protected $resourcesDataType = '';
|
---|
55 | protected $securityContextType = SecurityContext::class;
|
---|
56 | protected $securityContextDataType = '';
|
---|
57 | protected $startupProbeType = Probe::class;
|
---|
58 | protected $startupProbeDataType = '';
|
---|
59 | /**
|
---|
60 | * @var string
|
---|
61 | */
|
---|
62 | public $terminationMessagePath;
|
---|
63 | /**
|
---|
64 | * @var string
|
---|
65 | */
|
---|
66 | public $terminationMessagePolicy;
|
---|
67 | protected $volumeMountsType = VolumeMount::class;
|
---|
68 | protected $volumeMountsDataType = 'array';
|
---|
69 | /**
|
---|
70 | * @var string
|
---|
71 | */
|
---|
72 | public $workingDir;
|
---|
73 |
|
---|
74 | /**
|
---|
75 | * @param string[]
|
---|
76 | */
|
---|
77 | public function setArgs($args)
|
---|
78 | {
|
---|
79 | $this->args = $args;
|
---|
80 | }
|
---|
81 | /**
|
---|
82 | * @return string[]
|
---|
83 | */
|
---|
84 | public function getArgs()
|
---|
85 | {
|
---|
86 | return $this->args;
|
---|
87 | }
|
---|
88 | /**
|
---|
89 | * @param string[]
|
---|
90 | */
|
---|
91 | public function setCommand($command)
|
---|
92 | {
|
---|
93 | $this->command = $command;
|
---|
94 | }
|
---|
95 | /**
|
---|
96 | * @return string[]
|
---|
97 | */
|
---|
98 | public function getCommand()
|
---|
99 | {
|
---|
100 | return $this->command;
|
---|
101 | }
|
---|
102 | /**
|
---|
103 | * @param EnvVar[]
|
---|
104 | */
|
---|
105 | public function setEnv($env)
|
---|
106 | {
|
---|
107 | $this->env = $env;
|
---|
108 | }
|
---|
109 | /**
|
---|
110 | * @return EnvVar[]
|
---|
111 | */
|
---|
112 | public function getEnv()
|
---|
113 | {
|
---|
114 | return $this->env;
|
---|
115 | }
|
---|
116 | /**
|
---|
117 | * @param EnvFromSource[]
|
---|
118 | */
|
---|
119 | public function setEnvFrom($envFrom)
|
---|
120 | {
|
---|
121 | $this->envFrom = $envFrom;
|
---|
122 | }
|
---|
123 | /**
|
---|
124 | * @return EnvFromSource[]
|
---|
125 | */
|
---|
126 | public function getEnvFrom()
|
---|
127 | {
|
---|
128 | return $this->envFrom;
|
---|
129 | }
|
---|
130 | /**
|
---|
131 | * @param string
|
---|
132 | */
|
---|
133 | public function setImage($image)
|
---|
134 | {
|
---|
135 | $this->image = $image;
|
---|
136 | }
|
---|
137 | /**
|
---|
138 | * @return string
|
---|
139 | */
|
---|
140 | public function getImage()
|
---|
141 | {
|
---|
142 | return $this->image;
|
---|
143 | }
|
---|
144 | /**
|
---|
145 | * @param string
|
---|
146 | */
|
---|
147 | public function setImagePullPolicy($imagePullPolicy)
|
---|
148 | {
|
---|
149 | $this->imagePullPolicy = $imagePullPolicy;
|
---|
150 | }
|
---|
151 | /**
|
---|
152 | * @return string
|
---|
153 | */
|
---|
154 | public function getImagePullPolicy()
|
---|
155 | {
|
---|
156 | return $this->imagePullPolicy;
|
---|
157 | }
|
---|
158 | /**
|
---|
159 | * @param Probe
|
---|
160 | */
|
---|
161 | public function setLivenessProbe(Probe $livenessProbe)
|
---|
162 | {
|
---|
163 | $this->livenessProbe = $livenessProbe;
|
---|
164 | }
|
---|
165 | /**
|
---|
166 | * @return Probe
|
---|
167 | */
|
---|
168 | public function getLivenessProbe()
|
---|
169 | {
|
---|
170 | return $this->livenessProbe;
|
---|
171 | }
|
---|
172 | /**
|
---|
173 | * @param string
|
---|
174 | */
|
---|
175 | public function setName($name)
|
---|
176 | {
|
---|
177 | $this->name = $name;
|
---|
178 | }
|
---|
179 | /**
|
---|
180 | * @return string
|
---|
181 | */
|
---|
182 | public function getName()
|
---|
183 | {
|
---|
184 | return $this->name;
|
---|
185 | }
|
---|
186 | /**
|
---|
187 | * @param ContainerPort[]
|
---|
188 | */
|
---|
189 | public function setPorts($ports)
|
---|
190 | {
|
---|
191 | $this->ports = $ports;
|
---|
192 | }
|
---|
193 | /**
|
---|
194 | * @return ContainerPort[]
|
---|
195 | */
|
---|
196 | public function getPorts()
|
---|
197 | {
|
---|
198 | return $this->ports;
|
---|
199 | }
|
---|
200 | /**
|
---|
201 | * @param Probe
|
---|
202 | */
|
---|
203 | public function setReadinessProbe(Probe $readinessProbe)
|
---|
204 | {
|
---|
205 | $this->readinessProbe = $readinessProbe;
|
---|
206 | }
|
---|
207 | /**
|
---|
208 | * @return Probe
|
---|
209 | */
|
---|
210 | public function getReadinessProbe()
|
---|
211 | {
|
---|
212 | return $this->readinessProbe;
|
---|
213 | }
|
---|
214 | /**
|
---|
215 | * @param ResourceRequirements
|
---|
216 | */
|
---|
217 | public function setResources(ResourceRequirements $resources)
|
---|
218 | {
|
---|
219 | $this->resources = $resources;
|
---|
220 | }
|
---|
221 | /**
|
---|
222 | * @return ResourceRequirements
|
---|
223 | */
|
---|
224 | public function getResources()
|
---|
225 | {
|
---|
226 | return $this->resources;
|
---|
227 | }
|
---|
228 | /**
|
---|
229 | * @param SecurityContext
|
---|
230 | */
|
---|
231 | public function setSecurityContext(SecurityContext $securityContext)
|
---|
232 | {
|
---|
233 | $this->securityContext = $securityContext;
|
---|
234 | }
|
---|
235 | /**
|
---|
236 | * @return SecurityContext
|
---|
237 | */
|
---|
238 | public function getSecurityContext()
|
---|
239 | {
|
---|
240 | return $this->securityContext;
|
---|
241 | }
|
---|
242 | /**
|
---|
243 | * @param Probe
|
---|
244 | */
|
---|
245 | public function setStartupProbe(Probe $startupProbe)
|
---|
246 | {
|
---|
247 | $this->startupProbe = $startupProbe;
|
---|
248 | }
|
---|
249 | /**
|
---|
250 | * @return Probe
|
---|
251 | */
|
---|
252 | public function getStartupProbe()
|
---|
253 | {
|
---|
254 | return $this->startupProbe;
|
---|
255 | }
|
---|
256 | /**
|
---|
257 | * @param string
|
---|
258 | */
|
---|
259 | public function setTerminationMessagePath($terminationMessagePath)
|
---|
260 | {
|
---|
261 | $this->terminationMessagePath = $terminationMessagePath;
|
---|
262 | }
|
---|
263 | /**
|
---|
264 | * @return string
|
---|
265 | */
|
---|
266 | public function getTerminationMessagePath()
|
---|
267 | {
|
---|
268 | return $this->terminationMessagePath;
|
---|
269 | }
|
---|
270 | /**
|
---|
271 | * @param string
|
---|
272 | */
|
---|
273 | public function setTerminationMessagePolicy($terminationMessagePolicy)
|
---|
274 | {
|
---|
275 | $this->terminationMessagePolicy = $terminationMessagePolicy;
|
---|
276 | }
|
---|
277 | /**
|
---|
278 | * @return string
|
---|
279 | */
|
---|
280 | public function getTerminationMessagePolicy()
|
---|
281 | {
|
---|
282 | return $this->terminationMessagePolicy;
|
---|
283 | }
|
---|
284 | /**
|
---|
285 | * @param VolumeMount[]
|
---|
286 | */
|
---|
287 | public function setVolumeMounts($volumeMounts)
|
---|
288 | {
|
---|
289 | $this->volumeMounts = $volumeMounts;
|
---|
290 | }
|
---|
291 | /**
|
---|
292 | * @return VolumeMount[]
|
---|
293 | */
|
---|
294 | public function getVolumeMounts()
|
---|
295 | {
|
---|
296 | return $this->volumeMounts;
|
---|
297 | }
|
---|
298 | /**
|
---|
299 | * @param string
|
---|
300 | */
|
---|
301 | public function setWorkingDir($workingDir)
|
---|
302 | {
|
---|
303 | $this->workingDir = $workingDir;
|
---|
304 | }
|
---|
305 | /**
|
---|
306 | * @return string
|
---|
307 | */
|
---|
308 | public function getWorkingDir()
|
---|
309 | {
|
---|
310 | return $this->workingDir;
|
---|
311 | }
|
---|
312 | }
|
---|
313 |
|
---|
314 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
315 | class_alias(Container::class, 'Google_Service_CloudRun_Container');
|
---|