forked from googleapis/google-api-php-client-services
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnitOperation.php
More file actions
566 lines (562 loc) · 14.5 KB
/
UnitOperation.php
File metadata and controls
566 lines (562 loc) · 14.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\SaaSServiceManagement;
class UnitOperation extends \Google\Collection
{
/**
* Unit operation error category is unspecified
*/
public const ERROR_CATEGORY_UNIT_OPERATION_ERROR_CATEGORY_UNSPECIFIED = 'UNIT_OPERATION_ERROR_CATEGORY_UNSPECIFIED';
/**
* Unit operation error category is not applicable, or it is not an error
*/
public const ERROR_CATEGORY_NOT_APPLICABLE = 'NOT_APPLICABLE';
/**
* Unit operation error category is fatal
*/
public const ERROR_CATEGORY_FATAL = 'FATAL';
/**
* Unit operation error category is retriable
*/
public const ERROR_CATEGORY_RETRIABLE = 'RETRIABLE';
/**
* Unit operation error category is ignorable
*/
public const ERROR_CATEGORY_IGNORABLE = 'IGNORABLE';
/**
* Unit operation error category is standard, counts towards Rollout error
* budget
*/
public const ERROR_CATEGORY_STANDARD = 'STANDARD';
public const STATE_UNIT_OPERATION_STATE_UNKNOWN = 'UNIT_OPERATION_STATE_UNKNOWN';
/**
* Unit operation is accepted but not ready to run.
*/
public const STATE_UNIT_OPERATION_STATE_PENDING = 'UNIT_OPERATION_STATE_PENDING';
/**
* Unit operation is accepted and scheduled.
*/
public const STATE_UNIT_OPERATION_STATE_SCHEDULED = 'UNIT_OPERATION_STATE_SCHEDULED';
/**
* Unit operation is running.
*/
public const STATE_UNIT_OPERATION_STATE_RUNNING = 'UNIT_OPERATION_STATE_RUNNING';
/**
* Unit operation has completed successfully.
*/
public const STATE_UNIT_OPERATION_STATE_SUCCEEDED = 'UNIT_OPERATION_STATE_SUCCEEDED';
/**
* Unit operation has failed.
*/
public const STATE_UNIT_OPERATION_STATE_FAILED = 'UNIT_OPERATION_STATE_FAILED';
/**
* Unit operation was cancelled.
*/
public const STATE_UNIT_OPERATION_STATE_CANCELLED = 'UNIT_OPERATION_STATE_CANCELLED';
protected $collection_key = 'conditions';
/**
* Optional. Annotations is an unstructured key-value map stored with a
* resource that may be set by external tools to store and retrieve arbitrary
* metadata. They are not queryable and should be preserved when modifying
* objects. More info: https://kubernetes.io/docs/user-guide/annotations
*
* @var string[]
*/
public $annotations;
/**
* Optional. When true, attempt to cancel the operation. Cancellation may fail
* if the operation is already executing. (Optional)
*
* @var bool
*/
public $cancel;
protected $conditionsType = UnitOperationCondition::class;
protected $conditionsDataType = 'array';
/**
* Output only. The timestamp when the resource was created.
*
* @var string
*/
public $createTime;
/**
* Output only. The timestamp when the resource was marked for deletion
* (deletion is an asynchronous operation).
*
* @var string
*/
public $deleteTime;
protected $deprovisionType = Deprovision::class;
protected $deprovisionDataType = '';
/**
* Optional. Output only. The engine state for on-going deployment engine
* operation(s). This field is opaque for external usage.
*
* @var string
*/
public $engineState;
/**
* Optional. Output only. UnitOperationErrorCategory describe the error
* category.
*
* @var string
*/
public $errorCategory;
/**
* Output only. An opaque value that uniquely identifies a version or
* generation of a resource. It can be used to confirm that the client and
* server agree on the ordering of a resource being written.
*
* @var string
*/
public $etag;
protected $flagUpdateType = FlagUpdate::class;
protected $flagUpdateDataType = '';
/**
* Optional. The labels on the resource, which can be used for categorization.
* similar to Kubernetes resource labels.
*
* @var string[]
*/
public $labels;
/**
* Identifier. The resource name (full URI of the resource) following the
* standard naming scheme:
* "projects/{project}/locations/{location}/unitOperations/{unitOperation}"
*
* @var string
*/
public $name;
/**
* Optional. Reference to parent resource: UnitOperation. If an operation
* needs to create other operations as part of its workflow, each of the child
* operations should have this field set to the parent. This can be used for
* tracing. (Optional)
*
* @var string
*/
public $parentUnitOperation;
protected $provisionType = Provision::class;
protected $provisionDataType = '';
/**
* Optional. Specifies which rollout created this Unit Operation. This cannot
* be modified and is used for filtering purposes only. If a dependent unit
* and unit operation are created as part of another unit operation, they will
* use the same rolloutId.
*
* @var string
*/
public $rollout;
protected $scheduleType = Schedule::class;
protected $scheduleDataType = '';
/**
* Optional. Output only. UnitOperationState describes the current state of
* the unit operation.
*
* @var string
*/
public $state;
/**
* Output only. The unique identifier of the resource. UID is unique in the
* time and space for this resource within the scope of the service. It is
* typically generated by the server on successful creation of a resource and
* must not be changed. UID is used to uniquely identify resources with
* resource name reuses. This should be a UUID4.
*
* @var string
*/
public $uid;
/**
* Required. Immutable. The Unit a given UnitOperation will act upon.
*
* @var string
*/
public $unit;
/**
* Output only. The timestamp when the resource was last updated. Any change
* to the resource made by users must refresh this value. Changes to a
* resource made by the service should refresh this value.
*
* @var string
*/
public $updateTime;
protected $upgradeType = Upgrade::class;
protected $upgradeDataType = '';
/**
* Optional. Annotations is an unstructured key-value map stored with a
* resource that may be set by external tools to store and retrieve arbitrary
* metadata. They are not queryable and should be preserved when modifying
* objects. More info: https://kubernetes.io/docs/user-guide/annotations
*
* @param string[] $annotations
*/
public function setAnnotations($annotations)
{
$this->annotations = $annotations;
}
/**
* @return string[]
*/
public function getAnnotations()
{
return $this->annotations;
}
/**
* Optional. When true, attempt to cancel the operation. Cancellation may fail
* if the operation is already executing. (Optional)
*
* @param bool $cancel
*/
public function setCancel($cancel)
{
$this->cancel = $cancel;
}
/**
* @return bool
*/
public function getCancel()
{
return $this->cancel;
}
/**
* Optional. Output only. A set of conditions which indicate the various
* conditions this resource can have.
*
* @param UnitOperationCondition[] $conditions
*/
public function setConditions($conditions)
{
$this->conditions = $conditions;
}
/**
* @return UnitOperationCondition[]
*/
public function getConditions()
{
return $this->conditions;
}
/**
* Output only. The timestamp when the resource was created.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Output only. The timestamp when the resource was marked for deletion
* (deletion is an asynchronous operation).
*
* @param string $deleteTime
*/
public function setDeleteTime($deleteTime)
{
$this->deleteTime = $deleteTime;
}
/**
* @return string
*/
public function getDeleteTime()
{
return $this->deleteTime;
}
/**
* @param Deprovision $deprovision
*/
public function setDeprovision(Deprovision $deprovision)
{
$this->deprovision = $deprovision;
}
/**
* @return Deprovision
*/
public function getDeprovision()
{
return $this->deprovision;
}
/**
* Optional. Output only. The engine state for on-going deployment engine
* operation(s). This field is opaque for external usage.
*
* @param string $engineState
*/
public function setEngineState($engineState)
{
$this->engineState = $engineState;
}
/**
* @return string
*/
public function getEngineState()
{
return $this->engineState;
}
/**
* Optional. Output only. UnitOperationErrorCategory describe the error
* category.
*
* Accepted values: UNIT_OPERATION_ERROR_CATEGORY_UNSPECIFIED, NOT_APPLICABLE,
* FATAL, RETRIABLE, IGNORABLE, STANDARD
*
* @param self::ERROR_CATEGORY_* $errorCategory
*/
public function setErrorCategory($errorCategory)
{
$this->errorCategory = $errorCategory;
}
/**
* @return self::ERROR_CATEGORY_*
*/
public function getErrorCategory()
{
return $this->errorCategory;
}
/**
* Output only. An opaque value that uniquely identifies a version or
* generation of a resource. It can be used to confirm that the client and
* server agree on the ordering of a resource being written.
*
* @param string $etag
*/
public function setEtag($etag)
{
$this->etag = $etag;
}
/**
* @return string
*/
public function getEtag()
{
return $this->etag;
}
/**
* @param FlagUpdate $flagUpdate
*/
public function setFlagUpdate(FlagUpdate $flagUpdate)
{
$this->flagUpdate = $flagUpdate;
}
/**
* @return FlagUpdate
*/
public function getFlagUpdate()
{
return $this->flagUpdate;
}
/**
* Optional. The labels on the resource, which can be used for categorization.
* similar to Kubernetes resource labels.
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* Identifier. The resource name (full URI of the resource) following the
* standard naming scheme:
* "projects/{project}/locations/{location}/unitOperations/{unitOperation}"
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Optional. Reference to parent resource: UnitOperation. If an operation
* needs to create other operations as part of its workflow, each of the child
* operations should have this field set to the parent. This can be used for
* tracing. (Optional)
*
* @param string $parentUnitOperation
*/
public function setParentUnitOperation($parentUnitOperation)
{
$this->parentUnitOperation = $parentUnitOperation;
}
/**
* @return string
*/
public function getParentUnitOperation()
{
return $this->parentUnitOperation;
}
/**
* @param Provision $provision
*/
public function setProvision(Provision $provision)
{
$this->provision = $provision;
}
/**
* @return Provision
*/
public function getProvision()
{
return $this->provision;
}
/**
* Optional. Specifies which rollout created this Unit Operation. This cannot
* be modified and is used for filtering purposes only. If a dependent unit
* and unit operation are created as part of another unit operation, they will
* use the same rolloutId.
*
* @param string $rollout
*/
public function setRollout($rollout)
{
$this->rollout = $rollout;
}
/**
* @return string
*/
public function getRollout()
{
return $this->rollout;
}
/**
* Optional. When to schedule this operation.
*
* @param Schedule $schedule
*/
public function setSchedule(Schedule $schedule)
{
$this->schedule = $schedule;
}
/**
* @return Schedule
*/
public function getSchedule()
{
return $this->schedule;
}
/**
* Optional. Output only. UnitOperationState describes the current state of
* the unit operation.
*
* Accepted values: UNIT_OPERATION_STATE_UNKNOWN,
* UNIT_OPERATION_STATE_PENDING, UNIT_OPERATION_STATE_SCHEDULED,
* UNIT_OPERATION_STATE_RUNNING, UNIT_OPERATION_STATE_SUCCEEDED,
* UNIT_OPERATION_STATE_FAILED, UNIT_OPERATION_STATE_CANCELLED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
/**
* Output only. The unique identifier of the resource. UID is unique in the
* time and space for this resource within the scope of the service. It is
* typically generated by the server on successful creation of a resource and
* must not be changed. UID is used to uniquely identify resources with
* resource name reuses. This should be a UUID4.
*
* @param string $uid
*/
public function setUid($uid)
{
$this->uid = $uid;
}
/**
* @return string
*/
public function getUid()
{
return $this->uid;
}
/**
* Required. Immutable. The Unit a given UnitOperation will act upon.
*
* @param string $unit
*/
public function setUnit($unit)
{
$this->unit = $unit;
}
/**
* @return string
*/
public function getUnit()
{
return $this->unit;
}
/**
* Output only. The timestamp when the resource was last updated. Any change
* to the resource made by users must refresh this value. Changes to a
* resource made by the service should refresh this value.
*
* @param string $updateTime
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
/**
* @param Upgrade $upgrade
*/
public function setUpgrade(Upgrade $upgrade)
{
$this->upgrade = $upgrade;
}
/**
* @return Upgrade
*/
public function getUpgrade()
{
return $this->upgrade;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UnitOperation::class, 'Google_Service_SaaSServiceManagement_UnitOperation');