-
Notifications
You must be signed in to change notification settings - Fork 867
/
classes.rb
5504 lines (4570 loc) · 224 KB
/
classes.rb
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
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2020 Google LLC
#
# 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ClouddeployV1
# The request object used by `AbandonRelease`.
class AbandonReleaseRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# The response object for `AbandonRelease`.
class AbandonReleaseResponse
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# An advanceChildRollout Job.
class AdvanceChildRolloutJob
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# AdvanceChildRolloutJobRun contains information specific to a
# advanceChildRollout `JobRun`.
class AdvanceChildRolloutJobRun
include Google::Apis::Core::Hashable
# Output only. Name of the `ChildRollout`. Format is `projects/`project`/
# locations/`location`/deliveryPipelines/`deliveryPipeline`/releases/`release`/
# rollouts/a-z`0,62``.
# Corresponds to the JSON property `rollout`
# @return [String]
attr_accessor :rollout
# Output only. the ID of the ChildRollout's Phase.
# Corresponds to the JSON property `rolloutPhaseId`
# @return [String]
attr_accessor :rollout_phase_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@rollout = args[:rollout] if args.key?(:rollout)
@rollout_phase_id = args[:rollout_phase_id] if args.key?(:rollout_phase_id)
end
end
# Contains the information of an automated advance-rollout operation.
class AdvanceRolloutOperation
include Google::Apis::Core::Hashable
# Output only. The phase the rollout will be advanced to.
# Corresponds to the JSON property `destinationPhase`
# @return [String]
attr_accessor :destination_phase
# Output only. The name of the rollout that initiates the `AutomationRun`.
# Corresponds to the JSON property `rollout`
# @return [String]
attr_accessor :rollout
# Output only. The phase of a deployment that initiated the operation.
# Corresponds to the JSON property `sourcePhase`
# @return [String]
attr_accessor :source_phase
# Output only. How long the operation will be paused.
# Corresponds to the JSON property `wait`
# @return [String]
attr_accessor :wait
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@destination_phase = args[:destination_phase] if args.key?(:destination_phase)
@rollout = args[:rollout] if args.key?(:rollout)
@source_phase = args[:source_phase] if args.key?(:source_phase)
@wait = args[:wait] if args.key?(:wait)
end
end
# The request object used by `AdvanceRollout`.
class AdvanceRolloutRequest
include Google::Apis::Core::Hashable
# Required. The phase ID to advance the `Rollout` to.
# Corresponds to the JSON property `phaseId`
# @return [String]
attr_accessor :phase_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@phase_id = args[:phase_id] if args.key?(:phase_id)
end
end
# The response object from `AdvanceRollout`.
class AdvanceRolloutResponse
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# The `AdvanceRollout` automation rule will automatically advance a successful
# Rollout to the next phase.
class AdvanceRolloutRule
include Google::Apis::Core::Hashable
# `AutomationRuleCondition` contains conditions relevant to an `Automation` rule.
# Corresponds to the JSON property `condition`
# @return [Google::Apis::ClouddeployV1::AutomationRuleCondition]
attr_accessor :condition
# Required. ID of the rule. This id must be unique in the `Automation` resource
# to which this rule belongs. The format is `a-z`0,62``.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Optional. Proceeds only after phase name matched any one in the list. This
# value must consist of lower-case letters, numbers, and hyphens, start with a
# letter and end with a letter or a number, and have a max length of 63
# characters. In other words, it must match the following regex: `^[a-z]([a-z0-9-
# ]`0,61`[a-z0-9])?$`.
# Corresponds to the JSON property `sourcePhases`
# @return [Array<String>]
attr_accessor :source_phases
# Optional. How long to wait after a rollout is finished.
# Corresponds to the JSON property `wait`
# @return [String]
attr_accessor :wait
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@condition = args[:condition] if args.key?(:condition)
@id = args[:id] if args.key?(:id)
@source_phases = args[:source_phases] if args.key?(:source_phases)
@wait = args[:wait] if args.key?(:wait)
end
end
# Information specifying an Anthos Cluster.
class AnthosCluster
include Google::Apis::Core::Hashable
# Membership of the GKE Hub-registered cluster to which to apply the Skaffold
# configuration. Format is `projects/`project`/locations/`location`/memberships/`
# membership_name``.
# Corresponds to the JSON property `membership`
# @return [String]
attr_accessor :membership
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@membership = args[:membership] if args.key?(:membership)
end
end
# The request object used by `ApproveRollout`.
class ApproveRolloutRequest
include Google::Apis::Core::Hashable
# Required. True = approve; false = reject
# Corresponds to the JSON property `approved`
# @return [Boolean]
attr_accessor :approved
alias_method :approved?, :approved
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@approved = args[:approved] if args.key?(:approved)
end
end
# The response object from `ApproveRollout`.
class ApproveRolloutResponse
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Specifies the audit configuration for a service. The configuration determines
# which permission types are logged, and what identities, if any, are exempted
# from logging. An AuditConfig must have one or more AuditLogConfigs. If there
# are AuditConfigs for both `allServices` and a specific service, the union of
# the two AuditConfigs is used for that service: the log_types specified in each
# AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
# exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
# service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
# exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
# ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
# "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
# , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
# this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
# exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com`
# from DATA_WRITE logging.
class AuditConfig
include Google::Apis::Core::Hashable
# The configuration for logging of each type of permission.
# Corresponds to the JSON property `auditLogConfigs`
# @return [Array<Google::Apis::ClouddeployV1::AuditLogConfig>]
attr_accessor :audit_log_configs
# Specifies a service that will be enabled for audit logging. For example, `
# storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
# value that covers all services.
# Corresponds to the JSON property `service`
# @return [String]
attr_accessor :service
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
@service = args[:service] if args.key?(:service)
end
end
# Provides the configuration for logging a type of permissions. Example: ` "
# audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
# jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
# DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
# DATA_READ logging.
class AuditLogConfig
include Google::Apis::Core::Hashable
# Specifies the identities that do not cause logging for this type of permission.
# Follows the same format of Binding.members.
# Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>]
attr_accessor :exempted_members
# The log type that this config enables.
# Corresponds to the JSON property `logType`
# @return [String]
attr_accessor :log_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@log_type = args[:log_type] if args.key?(:log_type)
end
end
# An `Automation` resource in the Cloud Deploy API. An `Automation` enables the
# automation of manually driven actions for a Delivery Pipeline, which includes
# Release promotion among Targets, Rollout repair and Rollout deployment
# strategy advancement. The intention of Automation is to reduce manual
# intervention in the continuous delivery process.
class Automation
include Google::Apis::Core::Hashable
# Optional. User annotations. These attributes can only be set and used by the
# user, and not by Cloud Deploy. Annotations must meet the following constraints:
# * Annotations are key/value pairs. * Valid annotation keys have two segments:
# an optional prefix and name, separated by a slash (`/`). * The name segment is
# required and must be 63 characters or less, beginning and ending with an
# alphanumeric character (`[a-z0-9A-Z]`) with dashes (`-`), underscores (`_`),
# dots (`.`), and alphanumerics between. * The prefix is optional. If specified,
# the prefix must be a DNS subdomain: a series of DNS labels separated by dots(`.
# `), not longer than 253 characters in total, followed by a slash (`/`). See
# https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#
# syntax-and-character-set for more details.
# Corresponds to the JSON property `annotations`
# @return [Hash<String,String>]
attr_accessor :annotations
# Output only. Time at which the automation was created.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# Optional. Description of the `Automation`. Max length is 255 characters.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Optional. The weak etag of the `Automation` resource. This checksum is
# computed by the server based on the value of other fields, and may be sent on
# update and delete requests to ensure the client has an up-to-date value before
# proceeding.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# Optional. Labels are attributes that can be set and used by both the user and
# by Cloud Deploy. Labels must meet the following constraints: * Keys and values
# can contain only lowercase letters, numeric characters, underscores, and
# dashes. * All characters must use UTF-8 encoding, and international characters
# are allowed. * Keys must start with a lowercase letter or international
# character. * Each resource is limited to a maximum of 64 labels. Both keys and
# values are additionally constrained to be <= 63 characters.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Output only. Name of the `Automation`. Format is `projects/`project`/locations/
# `location`/deliveryPipelines/`delivery_pipeline`/automations/`automation``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Required. List of Automation rules associated with the Automation resource.
# Must have at least one rule and limited to 250 rules per Delivery Pipeline.
# Note: the order of the rules here is not the same as the order of execution.
# Corresponds to the JSON property `rules`
# @return [Array<Google::Apis::ClouddeployV1::AutomationRule>]
attr_accessor :rules
# AutomationResourceSelector contains the information to select the resources to
# which an Automation is going to be applied.
# Corresponds to the JSON property `selector`
# @return [Google::Apis::ClouddeployV1::AutomationResourceSelector]
attr_accessor :selector
# Required. Email address of the user-managed IAM service account that creates
# Cloud Deploy release and rollout resources.
# Corresponds to the JSON property `serviceAccount`
# @return [String]
attr_accessor :service_account
# Optional. When Suspended, automation is deactivated from execution.
# Corresponds to the JSON property `suspended`
# @return [Boolean]
attr_accessor :suspended
alias_method :suspended?, :suspended
# Output only. Unique identifier of the `Automation`.
# Corresponds to the JSON property `uid`
# @return [String]
attr_accessor :uid
# Output only. Time at which the automation was updated.
# Corresponds to the JSON property `updateTime`
# @return [String]
attr_accessor :update_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@annotations = args[:annotations] if args.key?(:annotations)
@create_time = args[:create_time] if args.key?(:create_time)
@description = args[:description] if args.key?(:description)
@etag = args[:etag] if args.key?(:etag)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name)
@rules = args[:rules] if args.key?(:rules)
@selector = args[:selector] if args.key?(:selector)
@service_account = args[:service_account] if args.key?(:service_account)
@suspended = args[:suspended] if args.key?(:suspended)
@uid = args[:uid] if args.key?(:uid)
@update_time = args[:update_time] if args.key?(:update_time)
end
end
# Payload proto for "clouddeploy.googleapis.com/automation" Platform Log event
# that describes the Automation related events.
class AutomationEvent
include Google::Apis::Core::Hashable
# The name of the `AutomationRun`.
# Corresponds to the JSON property `automation`
# @return [String]
attr_accessor :automation
# Debug message for when there is an update on the AutomationRun. Provides
# further details about the resource creation or state change.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
# Unique identifier of the `DeliveryPipeline`.
# Corresponds to the JSON property `pipelineUid`
# @return [String]
attr_accessor :pipeline_uid
# Type of this notification, e.g. for a Pub/Sub failure.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@automation = args[:automation] if args.key?(:automation)
@message = args[:message] if args.key?(:message)
@pipeline_uid = args[:pipeline_uid] if args.key?(:pipeline_uid)
@type = args[:type] if args.key?(:type)
end
end
# AutomationResourceSelector contains the information to select the resources to
# which an Automation is going to be applied.
class AutomationResourceSelector
include Google::Apis::Core::Hashable
# Contains attributes about a target.
# Corresponds to the JSON property `targets`
# @return [Array<Google::Apis::ClouddeployV1::TargetAttribute>]
attr_accessor :targets
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@targets = args[:targets] if args.key?(:targets)
end
end
# AutomationRolloutMetadata contains Automation-related actions that were
# performed on a rollout.
class AutomationRolloutMetadata
include Google::Apis::Core::Hashable
# Output only. The IDs of the AutomationRuns initiated by an advance rollout
# rule.
# Corresponds to the JSON property `advanceAutomationRuns`
# @return [Array<String>]
attr_accessor :advance_automation_runs
# Output only. The current AutomationRun repairing the rollout.
# Corresponds to the JSON property `currentRepairAutomationRun`
# @return [String]
attr_accessor :current_repair_automation_run
# Output only. The ID of the AutomationRun initiated by a promote release rule.
# Corresponds to the JSON property `promoteAutomationRun`
# @return [String]
attr_accessor :promote_automation_run
# Output only. The IDs of the AutomationRuns initiated by a repair rollout rule.
# Corresponds to the JSON property `repairAutomationRuns`
# @return [Array<String>]
attr_accessor :repair_automation_runs
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@advance_automation_runs = args[:advance_automation_runs] if args.key?(:advance_automation_runs)
@current_repair_automation_run = args[:current_repair_automation_run] if args.key?(:current_repair_automation_run)
@promote_automation_run = args[:promote_automation_run] if args.key?(:promote_automation_run)
@repair_automation_runs = args[:repair_automation_runs] if args.key?(:repair_automation_runs)
end
end
# `AutomationRule` defines the automation activities.
class AutomationRule
include Google::Apis::Core::Hashable
# The `AdvanceRollout` automation rule will automatically advance a successful
# Rollout to the next phase.
# Corresponds to the JSON property `advanceRolloutRule`
# @return [Google::Apis::ClouddeployV1::AdvanceRolloutRule]
attr_accessor :advance_rollout_rule
# `PromoteRelease` rule will automatically promote a release from the current
# target to a specified target.
# Corresponds to the JSON property `promoteReleaseRule`
# @return [Google::Apis::ClouddeployV1::PromoteReleaseRule]
attr_accessor :promote_release_rule
# The `RepairRolloutRule` automation rule will automatically repair a failed `
# Rollout`.
# Corresponds to the JSON property `repairRolloutRule`
# @return [Google::Apis::ClouddeployV1::RepairRolloutRule]
attr_accessor :repair_rollout_rule
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@advance_rollout_rule = args[:advance_rollout_rule] if args.key?(:advance_rollout_rule)
@promote_release_rule = args[:promote_release_rule] if args.key?(:promote_release_rule)
@repair_rollout_rule = args[:repair_rollout_rule] if args.key?(:repair_rollout_rule)
end
end
# `AutomationRuleCondition` contains conditions relevant to an `Automation` rule.
class AutomationRuleCondition
include Google::Apis::Core::Hashable
# `TargetsPresentCondition` contains information on any Targets referenced in
# the Delivery Pipeline that do not actually exist.
# Corresponds to the JSON property `targetsPresentCondition`
# @return [Google::Apis::ClouddeployV1::TargetsPresentCondition]
attr_accessor :targets_present_condition
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@targets_present_condition = args[:targets_present_condition] if args.key?(:targets_present_condition)
end
end
# An `AutomationRun` resource in the Cloud Deploy API. An `AutomationRun`
# represents an execution instance of an automation rule.
class AutomationRun
include Google::Apis::Core::Hashable
# Contains the information of an automated advance-rollout operation.
# Corresponds to the JSON property `advanceRolloutOperation`
# @return [Google::Apis::ClouddeployV1::AdvanceRolloutOperation]
attr_accessor :advance_rollout_operation
# Output only. The ID of the automation that initiated the operation.
# Corresponds to the JSON property `automationId`
# @return [String]
attr_accessor :automation_id
# An `Automation` resource in the Cloud Deploy API. An `Automation` enables the
# automation of manually driven actions for a Delivery Pipeline, which includes
# Release promotion among Targets, Rollout repair and Rollout deployment
# strategy advancement. The intention of Automation is to reduce manual
# intervention in the continuous delivery process.
# Corresponds to the JSON property `automationSnapshot`
# @return [Google::Apis::ClouddeployV1::Automation]
attr_accessor :automation_snapshot
# Output only. Time at which the `AutomationRun` was created.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# Output only. The weak etag of the `AutomationRun` resource. This checksum is
# computed by the server based on the value of other fields, and may be sent on
# update and delete requests to ensure the client has an up-to-date value before
# proceeding.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# Output only. Time the `AutomationRun` expires. An `AutomationRun` expires
# after 14 days from its creation date.
# Corresponds to the JSON property `expireTime`
# @return [String]
attr_accessor :expire_time
# Output only. Name of the `AutomationRun`. Format is `projects/`project`/
# locations/`location`/deliveryPipelines/`delivery_pipeline`/automationRuns/`
# automation_run``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Contains the information of an automated promote-release operation.
# Corresponds to the JSON property `promoteReleaseOperation`
# @return [Google::Apis::ClouddeployV1::PromoteReleaseOperation]
attr_accessor :promote_release_operation
# Contains the information for an automated `repair rollout` operation.
# Corresponds to the JSON property `repairRolloutOperation`
# @return [Google::Apis::ClouddeployV1::RepairRolloutOperation]
attr_accessor :repair_rollout_operation
# Output only. The ID of the automation rule that initiated the operation.
# Corresponds to the JSON property `ruleId`
# @return [String]
attr_accessor :rule_id
# Output only. Email address of the user-managed IAM service account that
# performs the operations against Cloud Deploy resources.
# Corresponds to the JSON property `serviceAccount`
# @return [String]
attr_accessor :service_account
# Output only. Current state of the `AutomationRun`.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
# Output only. Explains the current state of the `AutomationRun`. Present only
# when an explanation is needed.
# Corresponds to the JSON property `stateDescription`
# @return [String]
attr_accessor :state_description
# Output only. The ID of the target that represents the promotion stage that
# initiates the `AutomationRun`. The value of this field is the last segment of
# a target name.
# Corresponds to the JSON property `targetId`
# @return [String]
attr_accessor :target_id
# Output only. Time at which the automationRun was updated.
# Corresponds to the JSON property `updateTime`
# @return [String]
attr_accessor :update_time
# Output only. Earliest time the `AutomationRun` will attempt to resume. Wait-
# time is configured by `wait` in automation rule.
# Corresponds to the JSON property `waitUntilTime`
# @return [String]
attr_accessor :wait_until_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@advance_rollout_operation = args[:advance_rollout_operation] if args.key?(:advance_rollout_operation)
@automation_id = args[:automation_id] if args.key?(:automation_id)
@automation_snapshot = args[:automation_snapshot] if args.key?(:automation_snapshot)
@create_time = args[:create_time] if args.key?(:create_time)
@etag = args[:etag] if args.key?(:etag)
@expire_time = args[:expire_time] if args.key?(:expire_time)
@name = args[:name] if args.key?(:name)
@promote_release_operation = args[:promote_release_operation] if args.key?(:promote_release_operation)
@repair_rollout_operation = args[:repair_rollout_operation] if args.key?(:repair_rollout_operation)
@rule_id = args[:rule_id] if args.key?(:rule_id)
@service_account = args[:service_account] if args.key?(:service_account)
@state = args[:state] if args.key?(:state)
@state_description = args[:state_description] if args.key?(:state_description)
@target_id = args[:target_id] if args.key?(:target_id)
@update_time = args[:update_time] if args.key?(:update_time)
@wait_until_time = args[:wait_until_time] if args.key?(:wait_until_time)
end
end
# Payload proto for "clouddeploy.googleapis.com/automation_run" Platform Log
# event that describes the AutomationRun related events.
class AutomationRunEvent
include Google::Apis::Core::Hashable
# Identifier of the `Automation`.
# Corresponds to the JSON property `automationId`
# @return [String]
attr_accessor :automation_id
# The name of the `AutomationRun`.
# Corresponds to the JSON property `automationRun`
# @return [String]
attr_accessor :automation_run
# ID of the `Target` to which the `AutomationRun` is created.
# Corresponds to the JSON property `destinationTargetId`
# @return [String]
attr_accessor :destination_target_id
# Debug message for when there is an update on the AutomationRun. Provides
# further details about the resource creation or state change.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
# Unique identifier of the `DeliveryPipeline`.
# Corresponds to the JSON property `pipelineUid`
# @return [String]
attr_accessor :pipeline_uid
# Identifier of the `Automation` rule.
# Corresponds to the JSON property `ruleId`
# @return [String]
attr_accessor :rule_id
# Type of this notification, e.g. for a Pub/Sub failure.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@automation_id = args[:automation_id] if args.key?(:automation_id)
@automation_run = args[:automation_run] if args.key?(:automation_run)
@destination_target_id = args[:destination_target_id] if args.key?(:destination_target_id)
@message = args[:message] if args.key?(:message)
@pipeline_uid = args[:pipeline_uid] if args.key?(:pipeline_uid)
@rule_id = args[:rule_id] if args.key?(:rule_id)
@type = args[:type] if args.key?(:type)
end
end
# Associates `members`, or principals, with a `role`.
class Binding
include Google::Apis::Core::Hashable
# Represents a textual expression in the Common Expression Language (CEL) syntax.
# CEL is a C-like expression language. The syntax and semantics of CEL are
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
# "Summary size limit" description: "Determines if a summary is less than 100
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
# Requestor is owner" description: "Determines if requestor is the document
# owner" expression: "document.owner == request.auth.claims.email" Example (
# Logic): title: "Public documents" description: "Determine whether the document
# should be publicly visible" expression: "document.type != 'private' &&
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
# string" description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)" The
# exact variables and functions that may be referenced within an expression are
# determined by the service that evaluates it. See the service documentation for
# additional information.
# Corresponds to the JSON property `condition`
# @return [Google::Apis::ClouddeployV1::Expr]
attr_accessor :condition
# Specifies the principals requesting access for a Google Cloud resource. `
# members` can have the following values: * `allUsers`: A special identifier
# that represents anyone who is on the internet; with or without a Google
# account. * `allAuthenticatedUsers`: A special identifier that represents
# anyone who is authenticated with a Google account or a service account. Does
# not include identities that come from external identity providers (IdPs)
# through identity federation. * `user:`emailid``: An email address that
# represents a specific Google account. For example, `alice@example.com` . * `
# serviceAccount:`emailid``: An email address that represents a Google service
# account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
# serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
# identifier for a [Kubernetes service account](https://cloud.google.com/
# kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
# project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
# email address that represents a Google group. For example, `admins@example.com`
# . * `domain:`domain``: The G Suite domain (primary) that represents all the
# users of that domain. For example, `google.com` or `example.com`. * `principal:
# //iam.googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
# subject_attribute_value``: A single identity in a workforce identity pool. * `
# principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/
# group/`group_id``: All workforce identities in a group. * `principalSet://iam.
# googleapis.com/locations/global/workforcePools/`pool_id`/attribute.`
# attribute_name`/`attribute_value``: All workforce identities with a specific
# attribute value. * `principalSet://iam.googleapis.com/locations/global/
# workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * `
# principal://iam.googleapis.com/projects/`project_number`/locations/global/
# workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single
# identity in a workload identity pool. * `principalSet://iam.googleapis.com/
# projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/
# group/`group_id``: A workload identity pool group. * `principalSet://iam.
# googleapis.com/projects/`project_number`/locations/global/
# workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``:
# All identities in a workload identity pool with a certain attribute. * `
# principalSet://iam.googleapis.com/projects/`project_number`/locations/global/
# workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool.
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a user that has been recently deleted. For example, `
# alice@example.com?uid=123456789012345678901`. If the user is recovered, this
# value reverts to `user:`emailid`` and the recovered user retains the role in
# the binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email
# address (plus unique identifier) representing a service account that has been
# recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
# 123456789012345678901`. If the service account is undeleted, this value
# reverts to `serviceAccount:`emailid`` and the undeleted service account
# retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
# An email address (plus unique identifier) representing a Google group that has
# been recently deleted. For example, `admins@example.com?uid=
# 123456789012345678901`. If the group is recovered, this value reverts to `
# group:`emailid`` and the recovered group retains the role in the binding. * `
# deleted:principal://iam.googleapis.com/locations/global/workforcePools/`
# pool_id`/subject/`subject_attribute_value``: Deleted single identity in a
# workforce identity pool. For example, `deleted:principal://iam.googleapis.com/
# locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
# Role that is assigned to the list of `members`, or principals. For example, `
# roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM
# roles and permissions, see the [IAM documentation](https://cloud.google.com/
# iam/docs/roles-overview). For a list of the available pre-defined roles, see [
# here](https://cloud.google.com/iam/docs/understanding-roles).
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@condition = args[:condition] if args.key?(:condition)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# Description of an a image to use during Skaffold rendering.
class BuildArtifact
include Google::Apis::Core::Hashable
# Image name in Skaffold configuration.
# Corresponds to the JSON property `image`
# @return [String]
attr_accessor :image
# Image tag to use. This will generally be the full path to an image, such as "
# gcr.io/my-project/busybox:1.2.3" or "gcr.io/my-project/busybox@sha256:abc123".
# Corresponds to the JSON property `tag`
# @return [String]
attr_accessor :tag
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@image = args[:image] if args.key?(:image)
@tag = args[:tag] if args.key?(:tag)
end
end
# Canary represents the canary deployment strategy.
class Canary
include Google::Apis::Core::Hashable
# CanaryDeployment represents the canary deployment configuration
# Corresponds to the JSON property `canaryDeployment`
# @return [Google::Apis::ClouddeployV1::CanaryDeployment]
attr_accessor :canary_deployment
# CustomCanaryDeployment represents the custom canary deployment configuration.
# Corresponds to the JSON property `customCanaryDeployment`
# @return [Google::Apis::ClouddeployV1::CustomCanaryDeployment]
attr_accessor :custom_canary_deployment
# RuntimeConfig contains the runtime specific configurations for a deployment
# strategy.
# Corresponds to the JSON property `runtimeConfig`
# @return [Google::Apis::ClouddeployV1::RuntimeConfig]
attr_accessor :runtime_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@canary_deployment = args[:canary_deployment] if args.key?(:canary_deployment)
@custom_canary_deployment = args[:custom_canary_deployment] if args.key?(:custom_canary_deployment)
@runtime_config = args[:runtime_config] if args.key?(:runtime_config)
end
end
# CanaryDeployment represents the canary deployment configuration
class CanaryDeployment
include Google::Apis::Core::Hashable
# Required. The percentage based deployments that will occur as a part of a `
# Rollout`. List is expected in ascending order and each integer n is 0 <= n <
# 100.
# Corresponds to the JSON property `percentages`
# @return [Array<Fixnum>]
attr_accessor :percentages
# Postdeploy contains the postdeploy job configuration information.
# Corresponds to the JSON property `postdeploy`
# @return [Google::Apis::ClouddeployV1::Postdeploy]
attr_accessor :postdeploy
# Predeploy contains the predeploy job configuration information.
# Corresponds to the JSON property `predeploy`
# @return [Google::Apis::ClouddeployV1::Predeploy]
attr_accessor :predeploy
# Whether to run verify tests after each percentage deployment.
# Corresponds to the JSON property `verify`
# @return [Boolean]
attr_accessor :verify
alias_method :verify?, :verify
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@percentages = args[:percentages] if args.key?(:percentages)
@postdeploy = args[:postdeploy] if args.key?(:postdeploy)
@predeploy = args[:predeploy] if args.key?(:predeploy)
@verify = args[:verify] if args.key?(:verify)
end
end
# The request object used by `CancelAutomationRun`.
class CancelAutomationRunRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# The response object from `CancelAutomationRun`.
class CancelAutomationRunResponse
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end