@@ -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
0 commit comments