Skip to content

Commit b0ee6f6

Browse files
feat: Automated regeneration of orgpolicy v2 client (googleapis#20451)
Auto-created at 2024-10-27 09:23:50 +0000 using the toys pull request generator.
1 parent 29bbaed commit b0ee6f6

File tree

5 files changed

+197
-3
lines changed

5 files changed

+197
-3
lines changed

api_names_out.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269243,6 +269243,24 @@
269243269243
"/orgpolicy:v2/GoogleCloudOrgpolicyV2Constraint/name": name
269244269244
"/orgpolicy:v2/GoogleCloudOrgpolicyV2Constraint/supportsDryRun": supports_dry_run
269245269245
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintBooleanConstraint": google_cloud_orgpolicy_v2_constraint_boolean_constraint
269246+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintBooleanConstraint/customConstraintDefinition": custom_constraint_definition
269247+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition": google_cloud_orgpolicy_v2_constraint_custom_constraint_definition
269248+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition/actionType": action_type
269249+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition/condition": condition
269250+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition/methodTypes": method_types
269251+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition/methodTypes/method_type": method_type
269252+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition/parameters": parameters
269253+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition/parameters/parameter": parameter
269254+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition/resourceTypes": resource_types
269255+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition/resourceTypes/resource_type": resource_type
269256+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter": google_cloud_orgpolicy_v2_constraint_custom_constraint_definition_parameter
269257+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter/defaultValue": default_value
269258+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter/item": item
269259+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter/metadata": metadata
269260+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter/type": type
269261+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter/validValuesExpr": valid_values_expr
269262+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata": google_cloud_orgpolicy_v2_constraint_custom_constraint_definition_parameter_metadata
269263+
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata/description": description
269246269264
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint": google_cloud_orgpolicy_v2_constraint_google_defined_custom_constraint
269247269265
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint/actionType": action_type
269248269266
"/orgpolicy:v2/GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint/condition": condition

generated/google-apis-orgpolicy_v2/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release history for google-apis-orgpolicy_v2
22

3+
### v0.36.0 (2024-10-27)
4+
5+
* Regenerated from discovery document revision 20241021
6+
* Regenerated using generator version 0.15.1
7+
38
### v0.35.0 (2024-05-19)
49

510
* Regenerated from discovery document revision 20240513

generated/google-apis-orgpolicy_v2/lib/google/apis/orgpolicy_v2/classes.rb

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,132 @@ def update!(**args)
131131
class GoogleCloudOrgpolicyV2ConstraintBooleanConstraint
132132
include Google::Apis::Core::Hashable
133133

134+
# Currently used for Managed Constraints. This represents a subset of fields
135+
# missing from Constraint proto that are required to describe CustomConstraint
136+
# Corresponds to the JSON property `customConstraintDefinition`
137+
# @return [Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition]
138+
attr_accessor :custom_constraint_definition
139+
134140
def initialize(**args)
135141
update!(**args)
136142
end
137143

138144
# Update properties of this object
139145
def update!(**args)
146+
@custom_constraint_definition = args[:custom_constraint_definition] if args.key?(:custom_constraint_definition)
147+
end
148+
end
149+
150+
# Currently used for Managed Constraints. This represents a subset of fields
151+
# missing from Constraint proto that are required to describe CustomConstraint
152+
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition
153+
include Google::Apis::Core::Hashable
154+
155+
# Allow or deny type.
156+
# Corresponds to the JSON property `actionType`
157+
# @return [String]
158+
attr_accessor :action_type
159+
160+
# Org policy condition/expression. For example: `resource.instanceName.matches("[
161+
# production|test]_.*_(\d)+")` or, `resource.management.auto_upgrade == true`
162+
# The max length of the condition is 1000 characters.
163+
# Corresponds to the JSON property `condition`
164+
# @return [String]
165+
attr_accessor :condition
166+
167+
# All the operations being applied for this constraint.
168+
# Corresponds to the JSON property `methodTypes`
169+
# @return [Array<String>]
170+
attr_accessor :method_types
171+
172+
# Stores Structure of parameters used by Constraint condition. Key of map
173+
# represents name of the parameter.
174+
# Corresponds to the JSON property `parameters`
175+
# @return [Hash<String,Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter>]
176+
attr_accessor :parameters
177+
178+
# The resource instance type on which this policy applies. Format will be of the
179+
# form : `/` Example: * `compute.googleapis.com/Instance`.
180+
# Corresponds to the JSON property `resourceTypes`
181+
# @return [Array<String>]
182+
attr_accessor :resource_types
183+
184+
def initialize(**args)
185+
update!(**args)
186+
end
187+
188+
# Update properties of this object
189+
def update!(**args)
190+
@action_type = args[:action_type] if args.key?(:action_type)
191+
@condition = args[:condition] if args.key?(:condition)
192+
@method_types = args[:method_types] if args.key?(:method_types)
193+
@parameters = args[:parameters] if args.key?(:parameters)
194+
@resource_types = args[:resource_types] if args.key?(:resource_types)
195+
end
196+
end
197+
198+
# Defines a parameter structure.
199+
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter
200+
include Google::Apis::Core::Hashable
201+
202+
# Sets the value of the parameter in an assignment if no value is given.
203+
# Corresponds to the JSON property `defaultValue`
204+
# @return [Object]
205+
attr_accessor :default_value
206+
207+
# Determines the parameter’s value structure. For example, LIST can be specified
208+
# by defining type : LIST, and item type as : STRING.
209+
# Corresponds to the JSON property `item`
210+
# @return [String]
211+
attr_accessor :item
212+
213+
# Defines Medata structure.
214+
# Corresponds to the JSON property `metadata`
215+
# @return [Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata]
216+
attr_accessor :metadata
217+
218+
# Type of the parameter.
219+
# Corresponds to the JSON property `type`
220+
# @return [String]
221+
attr_accessor :type
222+
223+
# Provides a CEL expression to specify the acceptable parameter values during
224+
# assignment. For example, parameterName in ("parameterValue1", "parameterValue2"
225+
# )
226+
# Corresponds to the JSON property `validValuesExpr`
227+
# @return [String]
228+
attr_accessor :valid_values_expr
229+
230+
def initialize(**args)
231+
update!(**args)
232+
end
233+
234+
# Update properties of this object
235+
def update!(**args)
236+
@default_value = args[:default_value] if args.key?(:default_value)
237+
@item = args[:item] if args.key?(:item)
238+
@metadata = args[:metadata] if args.key?(:metadata)
239+
@type = args[:type] if args.key?(:type)
240+
@valid_values_expr = args[:valid_values_expr] if args.key?(:valid_values_expr)
241+
end
242+
end
243+
244+
# Defines Medata structure.
245+
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata
246+
include Google::Apis::Core::Hashable
247+
248+
# Detailed description of what this `parameter` is and use of it. Mutable.
249+
# Corresponds to the JSON property `description`
250+
# @return [String]
251+
attr_accessor :description
252+
253+
def initialize(**args)
254+
update!(**args)
255+
end
256+
257+
# Update properties of this object
258+
def update!(**args)
259+
@description = args[:description] if args.key?(:description)
140260
end
141261
end
142262

generated/google-apis-orgpolicy_v2/lib/google/apis/orgpolicy_v2/gem_version.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ module Google
1616
module Apis
1717
module OrgpolicyV2
1818
# Version of the google-apis-orgpolicy_v2 gem
19-
GEM_VERSION = "0.35.0"
19+
GEM_VERSION = "0.36.0"
2020

2121
# Version of the code generator used to generate this client
22-
GENERATOR_VERSION = "0.15.0"
22+
GENERATOR_VERSION = "0.15.1"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20240513"
25+
REVISION = "20241021"
2626
end
2727
end
2828
end

generated/google-apis-orgpolicy_v2/lib/google/apis/orgpolicy_v2/representations.rb

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,24 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
4040
include Google::Apis::Core::JsonObjectSupport
4141
end
4242

43+
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition
44+
class Representation < Google::Apis::Core::JsonRepresentation; end
45+
46+
include Google::Apis::Core::JsonObjectSupport
47+
end
48+
49+
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter
50+
class Representation < Google::Apis::Core::JsonRepresentation; end
51+
52+
include Google::Apis::Core::JsonObjectSupport
53+
end
54+
55+
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata
56+
class Representation < Google::Apis::Core::JsonRepresentation; end
57+
58+
include Google::Apis::Core::JsonObjectSupport
59+
end
60+
4361
class GoogleCloudOrgpolicyV2ConstraintListConstraint
4462
class Representation < Google::Apis::Core::JsonRepresentation; end
4563

@@ -133,6 +151,39 @@ class Representation < Google::Apis::Core::JsonRepresentation
133151
class GoogleCloudOrgpolicyV2ConstraintBooleanConstraint
134152
# @private
135153
class Representation < Google::Apis::Core::JsonRepresentation
154+
property :custom_constraint_definition, as: 'customConstraintDefinition', class: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition, decorator: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition::Representation
155+
156+
end
157+
end
158+
159+
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition
160+
# @private
161+
class Representation < Google::Apis::Core::JsonRepresentation
162+
property :action_type, as: 'actionType'
163+
property :condition, as: 'condition'
164+
collection :method_types, as: 'methodTypes'
165+
hash :parameters, as: 'parameters', class: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter, decorator: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter::Representation
166+
167+
collection :resource_types, as: 'resourceTypes'
168+
end
169+
end
170+
171+
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter
172+
# @private
173+
class Representation < Google::Apis::Core::JsonRepresentation
174+
property :default_value, as: 'defaultValue'
175+
property :item, as: 'item'
176+
property :metadata, as: 'metadata', class: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata, decorator: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata::Representation
177+
178+
property :type, as: 'type'
179+
property :valid_values_expr, as: 'validValuesExpr'
180+
end
181+
end
182+
183+
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata
184+
# @private
185+
class Representation < Google::Apis::Core::JsonRepresentation
186+
property :description, as: 'description'
136187
end
137188
end
138189

0 commit comments

Comments
 (0)