google-apis-clouddeploy_v1 0.49.0 → 0.50.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.
@@ -130,6 +130,12 @@ module Google
130
130
  class AdvanceRolloutRequest
131
131
  include Google::Apis::Core::Hashable
132
132
 
133
+ # Optional. Deploy policies to override. Format is `projects/`project`/locations/
134
+ # `location`/deployPolicies/`deployPolicy``.
135
+ # Corresponds to the JSON property `overrideDeployPolicy`
136
+ # @return [Array<String>]
137
+ attr_accessor :override_deploy_policy
138
+
133
139
  # Required. The phase ID to advance the `Rollout` to.
134
140
  # Corresponds to the JSON property `phaseId`
135
141
  # @return [String]
@@ -141,6 +147,7 @@ module Google
141
147
 
142
148
  # Update properties of this object
143
149
  def update!(**args)
150
+ @override_deploy_policy = args[:override_deploy_policy] if args.key?(:override_deploy_policy)
144
151
  @phase_id = args[:phase_id] if args.key?(:phase_id)
145
152
  end
146
153
  end
@@ -232,6 +239,12 @@ module Google
232
239
  attr_accessor :approved
233
240
  alias_method :approved?, :approved
234
241
 
242
+ # Optional. Deploy policies to override. Format is `projects/`project`/locations/
243
+ # `location`/deployPolicies/`deployPolicy``.
244
+ # Corresponds to the JSON property `overrideDeployPolicy`
245
+ # @return [Array<String>]
246
+ attr_accessor :override_deploy_policy
247
+
235
248
  def initialize(**args)
236
249
  update!(**args)
237
250
  end
@@ -239,6 +252,7 @@ module Google
239
252
  # Update properties of this object
240
253
  def update!(**args)
241
254
  @approved = args[:approved] if args.key?(:approved)
255
+ @override_deploy_policy = args[:override_deploy_policy] if args.key?(:override_deploy_policy)
242
256
  end
243
257
  end
244
258
 
@@ -637,6 +651,13 @@ module Google
637
651
  # @return [String]
638
652
  attr_accessor :name
639
653
 
654
+ # Returned from an action if one or more policies were violated, and therefore
655
+ # the action was prevented. Contains information about what policies were
656
+ # violated and why.
657
+ # Corresponds to the JSON property `policyViolation`
658
+ # @return [Google::Apis::ClouddeployV1::PolicyViolation]
659
+ attr_accessor :policy_violation
660
+
640
661
  # Contains the information of an automated promote-release operation.
641
662
  # Corresponds to the JSON property `promoteReleaseOperation`
642
663
  # @return [Google::Apis::ClouddeployV1::PromoteReleaseOperation]
@@ -700,6 +721,7 @@ module Google
700
721
  @etag = args[:etag] if args.key?(:etag)
701
722
  @expire_time = args[:expire_time] if args.key?(:expire_time)
702
723
  @name = args[:name] if args.key?(:name)
724
+ @policy_violation = args[:policy_violation] if args.key?(:policy_violation)
703
725
  @promote_release_operation = args[:promote_release_operation] if args.key?(:promote_release_operation)
704
726
  @repair_rollout_operation = args[:repair_rollout_operation] if args.key?(:repair_rollout_operation)
705
727
  @rule_id = args[:rule_id] if args.key?(:rule_id)
@@ -1012,12 +1034,19 @@ module Google
1012
1034
  class CancelRolloutRequest
1013
1035
  include Google::Apis::Core::Hashable
1014
1036
 
1037
+ # Optional. Deploy policies to override. Format is `projects/`project`/locations/
1038
+ # `location`/deployPolicies/`deployPolicy``.
1039
+ # Corresponds to the JSON property `overrideDeployPolicy`
1040
+ # @return [Array<String>]
1041
+ attr_accessor :override_deploy_policy
1042
+
1015
1043
  def initialize(**args)
1016
1044
  update!(**args)
1017
1045
  end
1018
1046
 
1019
1047
  # Update properties of this object
1020
1048
  def update!(**args)
1049
+ @override_deploy_policy = args[:override_deploy_policy] if args.key?(:override_deploy_policy)
1021
1050
  end
1022
1051
  end
1023
1052
 
@@ -1661,6 +1690,33 @@ module Google
1661
1690
  end
1662
1691
  end
1663
1692
 
1693
+ # Contains criteria for selecting DeliveryPipelines.
1694
+ class DeliveryPipelineAttribute
1695
+ include Google::Apis::Core::Hashable
1696
+
1697
+ # ID of the `DeliveryPipeline`. The value of this field could be one of the
1698
+ # following: * The last segment of a pipeline name * "*", all delivery pipelines
1699
+ # in a location
1700
+ # Corresponds to the JSON property `id`
1701
+ # @return [String]
1702
+ attr_accessor :id
1703
+
1704
+ # DeliveryPipeline labels.
1705
+ # Corresponds to the JSON property `labels`
1706
+ # @return [Hash<String,String>]
1707
+ attr_accessor :labels
1708
+
1709
+ def initialize(**args)
1710
+ update!(**args)
1711
+ end
1712
+
1713
+ # Update properties of this object
1714
+ def update!(**args)
1715
+ @id = args[:id] if args.key?(:id)
1716
+ @labels = args[:labels] if args.key?(:labels)
1717
+ end
1718
+ end
1719
+
1664
1720
  # Payload proto for "clouddeploy.googleapis.com/deliverypipeline_notification"
1665
1721
  # Platform Log event that describes the failure to send delivery pipeline status
1666
1722
  # change Pub/Sub notification.
@@ -1846,6 +1902,210 @@ module Google
1846
1902
  end
1847
1903
  end
1848
1904
 
1905
+ # A `DeployPolicy` resource in the Cloud Deploy API. A `DeployPolicy` inhibits
1906
+ # manual or automation driven actions within a Delivery Pipeline or Target.
1907
+ class DeployPolicy
1908
+ include Google::Apis::Core::Hashable
1909
+
1910
+ # User annotations. These attributes can only be set and used by the user, and
1911
+ # not by Cloud Deploy. Annotations must meet the following constraints: *
1912
+ # Annotations are key/value pairs. * Valid annotation keys have two segments: an
1913
+ # optional prefix and name, separated by a slash (`/`). * The name segment is
1914
+ # required and must be 63 characters or less, beginning and ending with an
1915
+ # alphanumeric character (`[a-z0-9A-Z]`) with dashes (`-`), underscores (`_`),
1916
+ # dots (`.`), and alphanumerics between. * The prefix is optional. If specified,
1917
+ # the prefix must be a DNS subdomain: a series of DNS labels separated by dots(`.
1918
+ # `), not longer than 253 characters in total, followed by a slash (`/`). See
1919
+ # https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#
1920
+ # syntax-and-character-set for more details.
1921
+ # Corresponds to the JSON property `annotations`
1922
+ # @return [Hash<String,String>]
1923
+ attr_accessor :annotations
1924
+
1925
+ # Output only. Time at which the deploy policy was created.
1926
+ # Corresponds to the JSON property `createTime`
1927
+ # @return [String]
1928
+ attr_accessor :create_time
1929
+
1930
+ # Description of the `DeployPolicy`. Max length is 255 characters.
1931
+ # Corresponds to the JSON property `description`
1932
+ # @return [String]
1933
+ attr_accessor :description
1934
+
1935
+ # The weak etag of the `Automation` resource. This checksum is computed by the
1936
+ # server based on the value of other fields, and may be sent on update and
1937
+ # delete requests to ensure the client has an up-to-date value before proceeding.
1938
+ # Corresponds to the JSON property `etag`
1939
+ # @return [String]
1940
+ attr_accessor :etag
1941
+
1942
+ # Labels are attributes that can be set and used by both the user and by Cloud
1943
+ # Deploy. Labels must meet the following constraints: * Keys and values can
1944
+ # contain only lowercase letters, numeric characters, underscores, and dashes. *
1945
+ # All characters must use UTF-8 encoding, and international characters are
1946
+ # allowed. * Keys must start with a lowercase letter or international character.
1947
+ # * Each resource is limited to a maximum of 64 labels. Both keys and values are
1948
+ # additionally constrained to be <= 128 bytes.
1949
+ # Corresponds to the JSON property `labels`
1950
+ # @return [Hash<String,String>]
1951
+ attr_accessor :labels
1952
+
1953
+ # Output only. Name of the `DeployPolicy`. Format is `projects/`project`/
1954
+ # locations/`location`/deployPolicies/`deployPolicy``. The `deployPolicy`
1955
+ # component must match `[a-z]([a-z0-9-]`0,61`[a-z0-9])?`
1956
+ # Corresponds to the JSON property `name`
1957
+ # @return [String]
1958
+ attr_accessor :name
1959
+
1960
+ # Required. Rules to apply. At least one rule must be present.
1961
+ # Corresponds to the JSON property `rules`
1962
+ # @return [Array<Google::Apis::ClouddeployV1::PolicyRule>]
1963
+ attr_accessor :rules
1964
+
1965
+ # Required. Selected resources to which the policy will be applied. At least one
1966
+ # selector is required. If one selector matches the resource the policy applies.
1967
+ # For example, if there are two selectors and the action being attempted matches
1968
+ # one of them, the policy will apply to that action.
1969
+ # Corresponds to the JSON property `selectors`
1970
+ # @return [Array<Google::Apis::ClouddeployV1::DeployPolicyResourceSelector>]
1971
+ attr_accessor :selectors
1972
+
1973
+ # When suspended, the policy will not prevent actions from occurring, even if
1974
+ # the action violates the policy.
1975
+ # Corresponds to the JSON property `suspended`
1976
+ # @return [Boolean]
1977
+ attr_accessor :suspended
1978
+ alias_method :suspended?, :suspended
1979
+
1980
+ # Output only. Unique identifier of the `DeployPolicy`.
1981
+ # Corresponds to the JSON property `uid`
1982
+ # @return [String]
1983
+ attr_accessor :uid
1984
+
1985
+ # Output only. Most recent time at which the deploy policy was updated.
1986
+ # Corresponds to the JSON property `updateTime`
1987
+ # @return [String]
1988
+ attr_accessor :update_time
1989
+
1990
+ def initialize(**args)
1991
+ update!(**args)
1992
+ end
1993
+
1994
+ # Update properties of this object
1995
+ def update!(**args)
1996
+ @annotations = args[:annotations] if args.key?(:annotations)
1997
+ @create_time = args[:create_time] if args.key?(:create_time)
1998
+ @description = args[:description] if args.key?(:description)
1999
+ @etag = args[:etag] if args.key?(:etag)
2000
+ @labels = args[:labels] if args.key?(:labels)
2001
+ @name = args[:name] if args.key?(:name)
2002
+ @rules = args[:rules] if args.key?(:rules)
2003
+ @selectors = args[:selectors] if args.key?(:selectors)
2004
+ @suspended = args[:suspended] if args.key?(:suspended)
2005
+ @uid = args[:uid] if args.key?(:uid)
2006
+ @update_time = args[:update_time] if args.key?(:update_time)
2007
+ end
2008
+ end
2009
+
2010
+ # Payload proto for "clouddeploy.googleapis.com/deploypolicy_evaluation"
2011
+ # Platform Log event that describes the deploy policy evaluation event.
2012
+ class DeployPolicyEvaluationEvent
2013
+ include Google::Apis::Core::Hashable
2014
+
2015
+ # Whether the request is allowed. Allowed is set as true if: (1) the request
2016
+ # complies with the policy; or (2) the request doesn't comply with the policy
2017
+ # but the policy was overridden; or (3) the request doesn't comply with the
2018
+ # policy but the policy was suspended
2019
+ # Corresponds to the JSON property `allowed`
2020
+ # @return [Boolean]
2021
+ attr_accessor :allowed
2022
+ alias_method :allowed?, :allowed
2023
+
2024
+ # The name of the `Delivery Pipeline`.
2025
+ # Corresponds to the JSON property `deliveryPipeline`
2026
+ # @return [String]
2027
+ attr_accessor :delivery_pipeline
2028
+
2029
+ # The name of the `DeployPolicy`.
2030
+ # Corresponds to the JSON property `deployPolicy`
2031
+ # @return [String]
2032
+ attr_accessor :deploy_policy
2033
+
2034
+ # Unique identifier of the `DeployPolicy`.
2035
+ # Corresponds to the JSON property `deployPolicyUid`
2036
+ # @return [String]
2037
+ attr_accessor :deploy_policy_uid
2038
+
2039
+ # What invoked the action (e.g. a user or automation).
2040
+ # Corresponds to the JSON property `invoker`
2041
+ # @return [String]
2042
+ attr_accessor :invoker
2043
+
2044
+ # Debug message for when a deploy policy event occurs.
2045
+ # Corresponds to the JSON property `message`
2046
+ # @return [String]
2047
+ attr_accessor :message
2048
+
2049
+ # Things that could have overridden the policy verdict. Overrides together with
2050
+ # verdict decide whether the request is allowed.
2051
+ # Corresponds to the JSON property `overrides`
2052
+ # @return [Array<String>]
2053
+ attr_accessor :overrides
2054
+
2055
+ # Unique identifier of the `Delivery Pipeline`.
2056
+ # Corresponds to the JSON property `pipelineUid`
2057
+ # @return [String]
2058
+ attr_accessor :pipeline_uid
2059
+
2060
+ # Rule id.
2061
+ # Corresponds to the JSON property `rule`
2062
+ # @return [String]
2063
+ attr_accessor :rule
2064
+
2065
+ # Rule type (e.g. Restrict Rollouts).
2066
+ # Corresponds to the JSON property `ruleType`
2067
+ # @return [String]
2068
+ attr_accessor :rule_type
2069
+
2070
+ # The name of the `Target`. This is an optional field, as a `Target` may not
2071
+ # always be applicable to a policy.
2072
+ # Corresponds to the JSON property `target`
2073
+ # @return [String]
2074
+ attr_accessor :target
2075
+
2076
+ # Unique identifier of the `Target`. This is an optional field, as a `Target`
2077
+ # may not always be applicable to a policy.
2078
+ # Corresponds to the JSON property `targetUid`
2079
+ # @return [String]
2080
+ attr_accessor :target_uid
2081
+
2082
+ # The policy verdict of the request.
2083
+ # Corresponds to the JSON property `verdict`
2084
+ # @return [String]
2085
+ attr_accessor :verdict
2086
+
2087
+ def initialize(**args)
2088
+ update!(**args)
2089
+ end
2090
+
2091
+ # Update properties of this object
2092
+ def update!(**args)
2093
+ @allowed = args[:allowed] if args.key?(:allowed)
2094
+ @delivery_pipeline = args[:delivery_pipeline] if args.key?(:delivery_pipeline)
2095
+ @deploy_policy = args[:deploy_policy] if args.key?(:deploy_policy)
2096
+ @deploy_policy_uid = args[:deploy_policy_uid] if args.key?(:deploy_policy_uid)
2097
+ @invoker = args[:invoker] if args.key?(:invoker)
2098
+ @message = args[:message] if args.key?(:message)
2099
+ @overrides = args[:overrides] if args.key?(:overrides)
2100
+ @pipeline_uid = args[:pipeline_uid] if args.key?(:pipeline_uid)
2101
+ @rule = args[:rule] if args.key?(:rule)
2102
+ @rule_type = args[:rule_type] if args.key?(:rule_type)
2103
+ @target = args[:target] if args.key?(:target)
2104
+ @target_uid = args[:target_uid] if args.key?(:target_uid)
2105
+ @verdict = args[:verdict] if args.key?(:verdict)
2106
+ end
2107
+ end
2108
+
1849
2109
  # Payload proto for "clouddeploy.googleapis.com/deploypolicy_notification".
1850
2110
  # Platform Log event that describes the failure to send a pub/sub notification
1851
2111
  # when there is a DeployPolicy status change.
@@ -1885,6 +2145,35 @@ module Google
1885
2145
  end
1886
2146
  end
1887
2147
 
2148
+ # Contains information on the resources to select for a deploy policy.
2149
+ # Attributes provided must all match the resource in order for policy
2150
+ # restrictions to apply. For example, if delivery pipelines attributes given are
2151
+ # an id "prod" and labels "foo: bar", a delivery pipeline resource must match
2152
+ # both that id and have that label in order to be subject to the policy.
2153
+ class DeployPolicyResourceSelector
2154
+ include Google::Apis::Core::Hashable
2155
+
2156
+ # Contains criteria for selecting DeliveryPipelines.
2157
+ # Corresponds to the JSON property `deliveryPipeline`
2158
+ # @return [Google::Apis::ClouddeployV1::DeliveryPipelineAttribute]
2159
+ attr_accessor :delivery_pipeline
2160
+
2161
+ # Contains criteria for selecting Targets.
2162
+ # Corresponds to the JSON property `target`
2163
+ # @return [Google::Apis::ClouddeployV1::TargetAttribute]
2164
+ attr_accessor :target
2165
+
2166
+ def initialize(**args)
2167
+ update!(**args)
2168
+ end
2169
+
2170
+ # Update properties of this object
2171
+ def update!(**args)
2172
+ @delivery_pipeline = args[:delivery_pipeline] if args.key?(:delivery_pipeline)
2173
+ @target = args[:target] if args.key?(:target)
2174
+ end
2175
+ end
2176
+
1888
2177
  # Deployment job composition.
1889
2178
  class DeploymentJobs
1890
2179
  include Google::Apis::Core::Hashable
@@ -2168,6 +2457,12 @@ module Google
2168
2457
  # @return [String]
2169
2458
  attr_accessor :job_id
2170
2459
 
2460
+ # Optional. Deploy policies to override. Format is `projects/`project`/locations/
2461
+ # `location`/deployPolicies/`deployPolicy``.
2462
+ # Corresponds to the JSON property `overrideDeployPolicy`
2463
+ # @return [Array<String>]
2464
+ attr_accessor :override_deploy_policy
2465
+
2171
2466
  # Required. The phase ID the Job to ignore belongs to.
2172
2467
  # Corresponds to the JSON property `phaseId`
2173
2468
  # @return [String]
@@ -2180,6 +2475,7 @@ module Google
2180
2475
  # Update properties of this object
2181
2476
  def update!(**args)
2182
2477
  @job_id = args[:job_id] if args.key?(:job_id)
2478
+ @override_deploy_policy = args[:override_deploy_policy] if args.key?(:override_deploy_policy)
2183
2479
  @phase_id = args[:phase_id] if args.key?(:phase_id)
2184
2480
  end
2185
2481
  end
@@ -2603,6 +2899,38 @@ module Google
2603
2899
  end
2604
2900
  end
2605
2901
 
2902
+ # The response object from `ListDeployPolicies`.
2903
+ class ListDeployPoliciesResponse
2904
+ include Google::Apis::Core::Hashable
2905
+
2906
+ # The `DeployPolicy` objects.
2907
+ # Corresponds to the JSON property `deployPolicies`
2908
+ # @return [Array<Google::Apis::ClouddeployV1::DeployPolicy>]
2909
+ attr_accessor :deploy_policies
2910
+
2911
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
2912
+ # field is omitted, there are no subsequent pages.
2913
+ # Corresponds to the JSON property `nextPageToken`
2914
+ # @return [String]
2915
+ attr_accessor :next_page_token
2916
+
2917
+ # Locations that could not be reached.
2918
+ # Corresponds to the JSON property `unreachable`
2919
+ # @return [Array<String>]
2920
+ attr_accessor :unreachable
2921
+
2922
+ def initialize(**args)
2923
+ update!(**args)
2924
+ end
2925
+
2926
+ # Update properties of this object
2927
+ def update!(**args)
2928
+ @deploy_policies = args[:deploy_policies] if args.key?(:deploy_policies)
2929
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2930
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
2931
+ end
2932
+ end
2933
+
2606
2934
  # ListJobRunsResponse is the response object returned by `ListJobRuns`.
2607
2935
  class ListJobRunsResponse
2608
2936
  include Google::Apis::Core::Hashable
@@ -2879,6 +3207,62 @@ module Google
2879
3207
  end
2880
3208
  end
2881
3209
 
3210
+ # One-time window within which actions are restricted. For example, blocking
3211
+ # actions over New Year's Eve from December 31st at 5pm to January 1st at 9am.
3212
+ class OneTimeWindow
3213
+ include Google::Apis::Core::Hashable
3214
+
3215
+ # Represents a whole or partial calendar date, such as a birthday. The time of
3216
+ # day and time zone are either specified elsewhere or are insignificant. The
3217
+ # date is relative to the Gregorian Calendar. This can represent one of the
3218
+ # following: * A full date, with non-zero year, month, and day values. * A month
3219
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
3220
+ # with a zero month and a zero day. * A year and month, with a zero day (for
3221
+ # example, a credit card expiration date). Related types: * google.type.
3222
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
3223
+ # Corresponds to the JSON property `endDate`
3224
+ # @return [Google::Apis::ClouddeployV1::Date]
3225
+ attr_accessor :end_date
3226
+
3227
+ # Represents a time of day. The date and time zone are either not significant or
3228
+ # are specified elsewhere. An API may choose to allow leap seconds. Related
3229
+ # types are google.type.Date and `google.protobuf.Timestamp`.
3230
+ # Corresponds to the JSON property `endTime`
3231
+ # @return [Google::Apis::ClouddeployV1::TimeOfDay]
3232
+ attr_accessor :end_time
3233
+
3234
+ # Represents a whole or partial calendar date, such as a birthday. The time of
3235
+ # day and time zone are either specified elsewhere or are insignificant. The
3236
+ # date is relative to the Gregorian Calendar. This can represent one of the
3237
+ # following: * A full date, with non-zero year, month, and day values. * A month
3238
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
3239
+ # with a zero month and a zero day. * A year and month, with a zero day (for
3240
+ # example, a credit card expiration date). Related types: * google.type.
3241
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
3242
+ # Corresponds to the JSON property `startDate`
3243
+ # @return [Google::Apis::ClouddeployV1::Date]
3244
+ attr_accessor :start_date
3245
+
3246
+ # Represents a time of day. The date and time zone are either not significant or
3247
+ # are specified elsewhere. An API may choose to allow leap seconds. Related
3248
+ # types are google.type.Date and `google.protobuf.Timestamp`.
3249
+ # Corresponds to the JSON property `startTime`
3250
+ # @return [Google::Apis::ClouddeployV1::TimeOfDay]
3251
+ attr_accessor :start_time
3252
+
3253
+ def initialize(**args)
3254
+ update!(**args)
3255
+ end
3256
+
3257
+ # Update properties of this object
3258
+ def update!(**args)
3259
+ @end_date = args[:end_date] if args.key?(:end_date)
3260
+ @end_time = args[:end_time] if args.key?(:end_time)
3261
+ @start_date = args[:start_date] if args.key?(:start_date)
3262
+ @start_time = args[:start_time] if args.key?(:start_time)
3263
+ end
3264
+ end
3265
+
2882
3266
  # This resource represents a long-running operation that is the result of a
2883
3267
  # network API call.
2884
3268
  class Operation
@@ -3289,6 +3673,79 @@ module Google
3289
3673
  end
3290
3674
  end
3291
3675
 
3676
+ # Deploy Policy rule.
3677
+ class PolicyRule
3678
+ include Google::Apis::Core::Hashable
3679
+
3680
+ # Rollout restrictions.
3681
+ # Corresponds to the JSON property `rolloutRestriction`
3682
+ # @return [Google::Apis::ClouddeployV1::RolloutRestriction]
3683
+ attr_accessor :rollout_restriction
3684
+
3685
+ def initialize(**args)
3686
+ update!(**args)
3687
+ end
3688
+
3689
+ # Update properties of this object
3690
+ def update!(**args)
3691
+ @rollout_restriction = args[:rollout_restriction] if args.key?(:rollout_restriction)
3692
+ end
3693
+ end
3694
+
3695
+ # Returned from an action if one or more policies were violated, and therefore
3696
+ # the action was prevented. Contains information about what policies were
3697
+ # violated and why.
3698
+ class PolicyViolation
3699
+ include Google::Apis::Core::Hashable
3700
+
3701
+ # Policy violation details.
3702
+ # Corresponds to the JSON property `policyViolationDetails`
3703
+ # @return [Array<Google::Apis::ClouddeployV1::PolicyViolationDetails>]
3704
+ attr_accessor :policy_violation_details
3705
+
3706
+ def initialize(**args)
3707
+ update!(**args)
3708
+ end
3709
+
3710
+ # Update properties of this object
3711
+ def update!(**args)
3712
+ @policy_violation_details = args[:policy_violation_details] if args.key?(:policy_violation_details)
3713
+ end
3714
+ end
3715
+
3716
+ # Policy violation details.
3717
+ class PolicyViolationDetails
3718
+ include Google::Apis::Core::Hashable
3719
+
3720
+ # User readable message about why the request violated a policy. This is not
3721
+ # intended for machine parsing.
3722
+ # Corresponds to the JSON property `failureMessage`
3723
+ # @return [String]
3724
+ attr_accessor :failure_message
3725
+
3726
+ # Name of the policy that was violated. Policy resource will be in the format of
3727
+ # `projects/`project`/locations/`location`/policies/`policy``.
3728
+ # Corresponds to the JSON property `policy`
3729
+ # @return [String]
3730
+ attr_accessor :policy
3731
+
3732
+ # Id of the rule that triggered the policy violation.
3733
+ # Corresponds to the JSON property `ruleId`
3734
+ # @return [String]
3735
+ attr_accessor :rule_id
3736
+
3737
+ def initialize(**args)
3738
+ update!(**args)
3739
+ end
3740
+
3741
+ # Update properties of this object
3742
+ def update!(**args)
3743
+ @failure_message = args[:failure_message] if args.key?(:failure_message)
3744
+ @policy = args[:policy] if args.key?(:policy)
3745
+ @rule_id = args[:rule_id] if args.key?(:rule_id)
3746
+ end
3747
+ end
3748
+
3292
3749
  # Postdeploy contains the postdeploy job configuration information.
3293
3750
  class Postdeploy
3294
3751
  include Google::Apis::Core::Hashable
@@ -4044,6 +4501,12 @@ module Google
4044
4501
  # @return [String]
4045
4502
  attr_accessor :job_id
4046
4503
 
4504
+ # Optional. Deploy policies to override. Format is `projects/`project`/locations/
4505
+ # `location`/deployPolicies/`deployPolicy``.
4506
+ # Corresponds to the JSON property `overrideDeployPolicy`
4507
+ # @return [Array<String>]
4508
+ attr_accessor :override_deploy_policy
4509
+
4047
4510
  # Required. The phase ID the Job to retry belongs to.
4048
4511
  # Corresponds to the JSON property `phaseId`
4049
4512
  # @return [String]
@@ -4056,6 +4519,7 @@ module Google
4056
4519
  # Update properties of this object
4057
4520
  def update!(**args)
4058
4521
  @job_id = args[:job_id] if args.key?(:job_id)
4522
+ @override_deploy_policy = args[:override_deploy_policy] if args.key?(:override_deploy_policy)
4059
4523
  @phase_id = args[:phase_id] if args.key?(:phase_id)
4060
4524
  end
4061
4525
  end
@@ -4174,6 +4638,12 @@ module Google
4174
4638
  class RollbackTargetRequest
4175
4639
  include Google::Apis::Core::Hashable
4176
4640
 
4641
+ # Optional. Deploy policies to override. Format is `projects/`project`/locations/
4642
+ # `location`/deployPolicies/`deploy_policy``.
4643
+ # Corresponds to the JSON property `overrideDeployPolicy`
4644
+ # @return [Array<String>]
4645
+ attr_accessor :override_deploy_policy
4646
+
4177
4647
  # Optional. ID of the `Release` to roll back to. If this isn't specified, the
4178
4648
  # previous successful `Rollout` to the specified target will be used to
4179
4649
  # determine the `Release`.
@@ -4215,6 +4685,7 @@ module Google
4215
4685
 
4216
4686
  # Update properties of this object
4217
4687
  def update!(**args)
4688
+ @override_deploy_policy = args[:override_deploy_policy] if args.key?(:override_deploy_policy)
4218
4689
  @release_id = args[:release_id] if args.key?(:release_id)
4219
4690
  @rollback_config = args[:rollback_config] if args.key?(:rollback_config)
4220
4691
  @rollout_id = args[:rollout_id] if args.key?(:rollout_id)
@@ -4470,6 +4941,46 @@ module Google
4470
4941
  end
4471
4942
  end
4472
4943
 
4944
+ # Rollout restrictions.
4945
+ class RolloutRestriction
4946
+ include Google::Apis::Core::Hashable
4947
+
4948
+ # Optional. Rollout actions to be restricted as part of the policy. If left
4949
+ # empty, all actions will be restricted.
4950
+ # Corresponds to the JSON property `actions`
4951
+ # @return [Array<String>]
4952
+ attr_accessor :actions
4953
+
4954
+ # Required. Restriction rule ID. Required and must be unique within a
4955
+ # DeployPolicy. The format is `[a-z]([a-z0-9-]`0,61`[a-z0-9])?`.
4956
+ # Corresponds to the JSON property `id`
4957
+ # @return [String]
4958
+ attr_accessor :id
4959
+
4960
+ # Optional. What invoked the action. If left empty, all invoker types will be
4961
+ # restricted.
4962
+ # Corresponds to the JSON property `invokers`
4963
+ # @return [Array<String>]
4964
+ attr_accessor :invokers
4965
+
4966
+ # Time windows within which actions are restricted.
4967
+ # Corresponds to the JSON property `timeWindows`
4968
+ # @return [Google::Apis::ClouddeployV1::TimeWindows]
4969
+ attr_accessor :time_windows
4970
+
4971
+ def initialize(**args)
4972
+ update!(**args)
4973
+ end
4974
+
4975
+ # Update properties of this object
4976
+ def update!(**args)
4977
+ @actions = args[:actions] if args.key?(:actions)
4978
+ @id = args[:id] if args.key?(:id)
4979
+ @invokers = args[:invokers] if args.key?(:invokers)
4980
+ @time_windows = args[:time_windows] if args.key?(:time_windows)
4981
+ end
4982
+ end
4983
+
4473
4984
  # Payload proto for "clouddeploy.googleapis.com/rollout_update" Platform Log
4474
4985
  # event that describes the rollout update event.
4475
4986
  class RolloutUpdateEvent
@@ -5370,12 +5881,19 @@ module Google
5370
5881
  class TerminateJobRunRequest
5371
5882
  include Google::Apis::Core::Hashable
5372
5883
 
5884
+ # Optional. Deploy policies to override. Format is `projects/`project`/locations/
5885
+ # `location`/deployPolicies/`deployPolicy``.
5886
+ # Corresponds to the JSON property `overrideDeployPolicy`
5887
+ # @return [Array<String>]
5888
+ attr_accessor :override_deploy_policy
5889
+
5373
5890
  def initialize(**args)
5374
5891
  update!(**args)
5375
5892
  end
5376
5893
 
5377
5894
  # Update properties of this object
5378
5895
  def update!(**args)
5896
+ @override_deploy_policy = args[:override_deploy_policy] if args.key?(:override_deploy_policy)
5379
5897
  end
5380
5898
  end
5381
5899
 
@@ -5432,6 +5950,79 @@ module Google
5432
5950
  end
5433
5951
  end
5434
5952
 
5953
+ # Represents a time of day. The date and time zone are either not significant or
5954
+ # are specified elsewhere. An API may choose to allow leap seconds. Related
5955
+ # types are google.type.Date and `google.protobuf.Timestamp`.
5956
+ class TimeOfDay
5957
+ include Google::Apis::Core::Hashable
5958
+
5959
+ # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to
5960
+ # allow the value "24:00:00" for scenarios like business closing time.
5961
+ # Corresponds to the JSON property `hours`
5962
+ # @return [Fixnum]
5963
+ attr_accessor :hours
5964
+
5965
+ # Minutes of hour of day. Must be from 0 to 59.
5966
+ # Corresponds to the JSON property `minutes`
5967
+ # @return [Fixnum]
5968
+ attr_accessor :minutes
5969
+
5970
+ # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
5971
+ # Corresponds to the JSON property `nanos`
5972
+ # @return [Fixnum]
5973
+ attr_accessor :nanos
5974
+
5975
+ # Seconds of minutes of the time. Must normally be from 0 to 59. An API may
5976
+ # allow the value 60 if it allows leap-seconds.
5977
+ # Corresponds to the JSON property `seconds`
5978
+ # @return [Fixnum]
5979
+ attr_accessor :seconds
5980
+
5981
+ def initialize(**args)
5982
+ update!(**args)
5983
+ end
5984
+
5985
+ # Update properties of this object
5986
+ def update!(**args)
5987
+ @hours = args[:hours] if args.key?(:hours)
5988
+ @minutes = args[:minutes] if args.key?(:minutes)
5989
+ @nanos = args[:nanos] if args.key?(:nanos)
5990
+ @seconds = args[:seconds] if args.key?(:seconds)
5991
+ end
5992
+ end
5993
+
5994
+ # Time windows within which actions are restricted.
5995
+ class TimeWindows
5996
+ include Google::Apis::Core::Hashable
5997
+
5998
+ # Optional. One-time windows within which actions are restricted.
5999
+ # Corresponds to the JSON property `oneTimeWindows`
6000
+ # @return [Array<Google::Apis::ClouddeployV1::OneTimeWindow>]
6001
+ attr_accessor :one_time_windows
6002
+
6003
+ # Required. The time zone in IANA format [IANA Time Zone Database](https://www.
6004
+ # iana.org/time-zones) (e.g. America/New_York).
6005
+ # Corresponds to the JSON property `timeZone`
6006
+ # @return [String]
6007
+ attr_accessor :time_zone
6008
+
6009
+ # Optional. Recurring weekly windows within which actions are restricted.
6010
+ # Corresponds to the JSON property `weeklyWindows`
6011
+ # @return [Array<Google::Apis::ClouddeployV1::WeeklyWindow>]
6012
+ attr_accessor :weekly_windows
6013
+
6014
+ def initialize(**args)
6015
+ update!(**args)
6016
+ end
6017
+
6018
+ # Update properties of this object
6019
+ def update!(**args)
6020
+ @one_time_windows = args[:one_time_windows] if args.key?(:one_time_windows)
6021
+ @time_zone = args[:time_zone] if args.key?(:time_zone)
6022
+ @weekly_windows = args[:weekly_windows] if args.key?(:weekly_windows)
6023
+ end
6024
+ end
6025
+
5435
6026
  # A verify Job.
5436
6027
  class VerifyJob
5437
6028
  include Google::Apis::Core::Hashable
@@ -5490,6 +6081,42 @@ module Google
5490
6081
  @failure_message = args[:failure_message] if args.key?(:failure_message)
5491
6082
  end
5492
6083
  end
6084
+
6085
+ # Weekly windows. For example, blocking actions every Saturday and Sunday.
6086
+ # Another example would be blocking actions every weekday from 5pm to midnight.
6087
+ class WeeklyWindow
6088
+ include Google::Apis::Core::Hashable
6089
+
6090
+ # Optional. Days of week. If left empty, all days of the week will be included.
6091
+ # Corresponds to the JSON property `daysOfWeek`
6092
+ # @return [Array<String>]
6093
+ attr_accessor :days_of_week
6094
+
6095
+ # Represents a time of day. The date and time zone are either not significant or
6096
+ # are specified elsewhere. An API may choose to allow leap seconds. Related
6097
+ # types are google.type.Date and `google.protobuf.Timestamp`.
6098
+ # Corresponds to the JSON property `endTime`
6099
+ # @return [Google::Apis::ClouddeployV1::TimeOfDay]
6100
+ attr_accessor :end_time
6101
+
6102
+ # Represents a time of day. The date and time zone are either not significant or
6103
+ # are specified elsewhere. An API may choose to allow leap seconds. Related
6104
+ # types are google.type.Date and `google.protobuf.Timestamp`.
6105
+ # Corresponds to the JSON property `startTime`
6106
+ # @return [Google::Apis::ClouddeployV1::TimeOfDay]
6107
+ attr_accessor :start_time
6108
+
6109
+ def initialize(**args)
6110
+ update!(**args)
6111
+ end
6112
+
6113
+ # Update properties of this object
6114
+ def update!(**args)
6115
+ @days_of_week = args[:days_of_week] if args.key?(:days_of_week)
6116
+ @end_time = args[:end_time] if args.key?(:end_time)
6117
+ @start_time = args[:start_time] if args.key?(:start_time)
6118
+ end
6119
+ end
5493
6120
  end
5494
6121
  end
5495
6122
  end