1# coding: utf-8 2# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. 3# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. 4 5 6from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 7from oci.decorators import init_model_state_from_kwargs 8 9 10@init_model_state_from_kwargs 11class TargetDetectorRecipe(object): 12 """ 13 Target Detector recipe 14 """ 15 16 #: A constant which can be used with the owner property of a TargetDetectorRecipe. 17 #: This constant has a value of "CUSTOMER" 18 OWNER_CUSTOMER = "CUSTOMER" 19 20 #: A constant which can be used with the owner property of a TargetDetectorRecipe. 21 #: This constant has a value of "ORACLE" 22 OWNER_ORACLE = "ORACLE" 23 24 #: A constant which can be used with the detector property of a TargetDetectorRecipe. 25 #: This constant has a value of "IAAS_ACTIVITY_DETECTOR" 26 DETECTOR_IAAS_ACTIVITY_DETECTOR = "IAAS_ACTIVITY_DETECTOR" 27 28 #: A constant which can be used with the detector property of a TargetDetectorRecipe. 29 #: This constant has a value of "IAAS_CONFIGURATION_DETECTOR" 30 DETECTOR_IAAS_CONFIGURATION_DETECTOR = "IAAS_CONFIGURATION_DETECTOR" 31 32 #: A constant which can be used with the lifecycle_state property of a TargetDetectorRecipe. 33 #: This constant has a value of "CREATING" 34 LIFECYCLE_STATE_CREATING = "CREATING" 35 36 #: A constant which can be used with the lifecycle_state property of a TargetDetectorRecipe. 37 #: This constant has a value of "UPDATING" 38 LIFECYCLE_STATE_UPDATING = "UPDATING" 39 40 #: A constant which can be used with the lifecycle_state property of a TargetDetectorRecipe. 41 #: This constant has a value of "ACTIVE" 42 LIFECYCLE_STATE_ACTIVE = "ACTIVE" 43 44 #: A constant which can be used with the lifecycle_state property of a TargetDetectorRecipe. 45 #: This constant has a value of "INACTIVE" 46 LIFECYCLE_STATE_INACTIVE = "INACTIVE" 47 48 #: A constant which can be used with the lifecycle_state property of a TargetDetectorRecipe. 49 #: This constant has a value of "DELETING" 50 LIFECYCLE_STATE_DELETING = "DELETING" 51 52 #: A constant which can be used with the lifecycle_state property of a TargetDetectorRecipe. 53 #: This constant has a value of "DELETED" 54 LIFECYCLE_STATE_DELETED = "DELETED" 55 56 #: A constant which can be used with the lifecycle_state property of a TargetDetectorRecipe. 57 #: This constant has a value of "FAILED" 58 LIFECYCLE_STATE_FAILED = "FAILED" 59 60 def __init__(self, **kwargs): 61 """ 62 Initializes a new TargetDetectorRecipe object with values from keyword arguments. 63 The following keyword arguments are supported (corresponding to the getters/setters of this class): 64 65 :param id: 66 The value to assign to the id property of this TargetDetectorRecipe. 67 :type id: str 68 69 :param display_name: 70 The value to assign to the display_name property of this TargetDetectorRecipe. 71 :type display_name: str 72 73 :param description: 74 The value to assign to the description property of this TargetDetectorRecipe. 75 :type description: str 76 77 :param compartment_id: 78 The value to assign to the compartment_id property of this TargetDetectorRecipe. 79 :type compartment_id: str 80 81 :param detector_recipe_id: 82 The value to assign to the detector_recipe_id property of this TargetDetectorRecipe. 83 :type detector_recipe_id: str 84 85 :param owner: 86 The value to assign to the owner property of this TargetDetectorRecipe. 87 Allowed values for this property are: "CUSTOMER", "ORACLE", 'UNKNOWN_ENUM_VALUE'. 88 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 89 :type owner: str 90 91 :param detector: 92 The value to assign to the detector property of this TargetDetectorRecipe. 93 Allowed values for this property are: "IAAS_ACTIVITY_DETECTOR", "IAAS_CONFIGURATION_DETECTOR", 'UNKNOWN_ENUM_VALUE'. 94 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 95 :type detector: str 96 97 :param detector_rules: 98 The value to assign to the detector_rules property of this TargetDetectorRecipe. 99 :type detector_rules: list[oci.cloud_guard.models.TargetDetectorRecipeDetectorRule] 100 101 :param effective_detector_rules: 102 The value to assign to the effective_detector_rules property of this TargetDetectorRecipe. 103 :type effective_detector_rules: list[oci.cloud_guard.models.TargetDetectorRecipeDetectorRule] 104 105 :param time_created: 106 The value to assign to the time_created property of this TargetDetectorRecipe. 107 :type time_created: datetime 108 109 :param time_updated: 110 The value to assign to the time_updated property of this TargetDetectorRecipe. 111 :type time_updated: datetime 112 113 :param lifecycle_state: 114 The value to assign to the lifecycle_state property of this TargetDetectorRecipe. 115 Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. 116 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 117 :type lifecycle_state: str 118 119 """ 120 self.swagger_types = { 121 'id': 'str', 122 'display_name': 'str', 123 'description': 'str', 124 'compartment_id': 'str', 125 'detector_recipe_id': 'str', 126 'owner': 'str', 127 'detector': 'str', 128 'detector_rules': 'list[TargetDetectorRecipeDetectorRule]', 129 'effective_detector_rules': 'list[TargetDetectorRecipeDetectorRule]', 130 'time_created': 'datetime', 131 'time_updated': 'datetime', 132 'lifecycle_state': 'str' 133 } 134 135 self.attribute_map = { 136 'id': 'id', 137 'display_name': 'displayName', 138 'description': 'description', 139 'compartment_id': 'compartmentId', 140 'detector_recipe_id': 'detectorRecipeId', 141 'owner': 'owner', 142 'detector': 'detector', 143 'detector_rules': 'detectorRules', 144 'effective_detector_rules': 'effectiveDetectorRules', 145 'time_created': 'timeCreated', 146 'time_updated': 'timeUpdated', 147 'lifecycle_state': 'lifecycleState' 148 } 149 150 self._id = None 151 self._display_name = None 152 self._description = None 153 self._compartment_id = None 154 self._detector_recipe_id = None 155 self._owner = None 156 self._detector = None 157 self._detector_rules = None 158 self._effective_detector_rules = None 159 self._time_created = None 160 self._time_updated = None 161 self._lifecycle_state = None 162 163 @property 164 def id(self): 165 """ 166 **[Required]** Gets the id of this TargetDetectorRecipe. 167 Ocid for detector recipe 168 169 170 :return: The id of this TargetDetectorRecipe. 171 :rtype: str 172 """ 173 return self._id 174 175 @id.setter 176 def id(self, id): 177 """ 178 Sets the id of this TargetDetectorRecipe. 179 Ocid for detector recipe 180 181 182 :param id: The id of this TargetDetectorRecipe. 183 :type: str 184 """ 185 self._id = id 186 187 @property 188 def display_name(self): 189 """ 190 **[Required]** Gets the display_name of this TargetDetectorRecipe. 191 DisplayName of detector recipe 192 193 194 :return: The display_name of this TargetDetectorRecipe. 195 :rtype: str 196 """ 197 return self._display_name 198 199 @display_name.setter 200 def display_name(self, display_name): 201 """ 202 Sets the display_name of this TargetDetectorRecipe. 203 DisplayName of detector recipe 204 205 206 :param display_name: The display_name of this TargetDetectorRecipe. 207 :type: str 208 """ 209 self._display_name = display_name 210 211 @property 212 def description(self): 213 """ 214 Gets the description of this TargetDetectorRecipe. 215 Detector recipe description 216 217 218 :return: The description of this TargetDetectorRecipe. 219 :rtype: str 220 """ 221 return self._description 222 223 @description.setter 224 def description(self, description): 225 """ 226 Sets the description of this TargetDetectorRecipe. 227 Detector recipe description 228 229 230 :param description: The description of this TargetDetectorRecipe. 231 :type: str 232 """ 233 self._description = description 234 235 @property 236 def compartment_id(self): 237 """ 238 **[Required]** Gets the compartment_id of this TargetDetectorRecipe. 239 compartmentId of detector recipe 240 241 242 :return: The compartment_id of this TargetDetectorRecipe. 243 :rtype: str 244 """ 245 return self._compartment_id 246 247 @compartment_id.setter 248 def compartment_id(self, compartment_id): 249 """ 250 Sets the compartment_id of this TargetDetectorRecipe. 251 compartmentId of detector recipe 252 253 254 :param compartment_id: The compartment_id of this TargetDetectorRecipe. 255 :type: str 256 """ 257 self._compartment_id = compartment_id 258 259 @property 260 def detector_recipe_id(self): 261 """ 262 **[Required]** Gets the detector_recipe_id of this TargetDetectorRecipe. 263 Unique identifier for Detector Recipe of which this is an extension 264 265 266 :return: The detector_recipe_id of this TargetDetectorRecipe. 267 :rtype: str 268 """ 269 return self._detector_recipe_id 270 271 @detector_recipe_id.setter 272 def detector_recipe_id(self, detector_recipe_id): 273 """ 274 Sets the detector_recipe_id of this TargetDetectorRecipe. 275 Unique identifier for Detector Recipe of which this is an extension 276 277 278 :param detector_recipe_id: The detector_recipe_id of this TargetDetectorRecipe. 279 :type: str 280 """ 281 self._detector_recipe_id = detector_recipe_id 282 283 @property 284 def owner(self): 285 """ 286 **[Required]** Gets the owner of this TargetDetectorRecipe. 287 Owner of detector recipe 288 289 Allowed values for this property are: "CUSTOMER", "ORACLE", 'UNKNOWN_ENUM_VALUE'. 290 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 291 292 293 :return: The owner of this TargetDetectorRecipe. 294 :rtype: str 295 """ 296 return self._owner 297 298 @owner.setter 299 def owner(self, owner): 300 """ 301 Sets the owner of this TargetDetectorRecipe. 302 Owner of detector recipe 303 304 305 :param owner: The owner of this TargetDetectorRecipe. 306 :type: str 307 """ 308 allowed_values = ["CUSTOMER", "ORACLE"] 309 if not value_allowed_none_or_none_sentinel(owner, allowed_values): 310 owner = 'UNKNOWN_ENUM_VALUE' 311 self._owner = owner 312 313 @property 314 def detector(self): 315 """ 316 **[Required]** Gets the detector of this TargetDetectorRecipe. 317 Type of detector 318 319 Allowed values for this property are: "IAAS_ACTIVITY_DETECTOR", "IAAS_CONFIGURATION_DETECTOR", 'UNKNOWN_ENUM_VALUE'. 320 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 321 322 323 :return: The detector of this TargetDetectorRecipe. 324 :rtype: str 325 """ 326 return self._detector 327 328 @detector.setter 329 def detector(self, detector): 330 """ 331 Sets the detector of this TargetDetectorRecipe. 332 Type of detector 333 334 335 :param detector: The detector of this TargetDetectorRecipe. 336 :type: str 337 """ 338 allowed_values = ["IAAS_ACTIVITY_DETECTOR", "IAAS_CONFIGURATION_DETECTOR"] 339 if not value_allowed_none_or_none_sentinel(detector, allowed_values): 340 detector = 'UNKNOWN_ENUM_VALUE' 341 self._detector = detector 342 343 @property 344 def detector_rules(self): 345 """ 346 Gets the detector_rules of this TargetDetectorRecipe. 347 List of detector rules for the detector type for recipe - user input 348 349 350 :return: The detector_rules of this TargetDetectorRecipe. 351 :rtype: list[oci.cloud_guard.models.TargetDetectorRecipeDetectorRule] 352 """ 353 return self._detector_rules 354 355 @detector_rules.setter 356 def detector_rules(self, detector_rules): 357 """ 358 Sets the detector_rules of this TargetDetectorRecipe. 359 List of detector rules for the detector type for recipe - user input 360 361 362 :param detector_rules: The detector_rules of this TargetDetectorRecipe. 363 :type: list[oci.cloud_guard.models.TargetDetectorRecipeDetectorRule] 364 """ 365 self._detector_rules = detector_rules 366 367 @property 368 def effective_detector_rules(self): 369 """ 370 Gets the effective_detector_rules of this TargetDetectorRecipe. 371 List of effective detector rules for the detector type for recipe after applying defaults 372 373 374 :return: The effective_detector_rules of this TargetDetectorRecipe. 375 :rtype: list[oci.cloud_guard.models.TargetDetectorRecipeDetectorRule] 376 """ 377 return self._effective_detector_rules 378 379 @effective_detector_rules.setter 380 def effective_detector_rules(self, effective_detector_rules): 381 """ 382 Sets the effective_detector_rules of this TargetDetectorRecipe. 383 List of effective detector rules for the detector type for recipe after applying defaults 384 385 386 :param effective_detector_rules: The effective_detector_rules of this TargetDetectorRecipe. 387 :type: list[oci.cloud_guard.models.TargetDetectorRecipeDetectorRule] 388 """ 389 self._effective_detector_rules = effective_detector_rules 390 391 @property 392 def time_created(self): 393 """ 394 Gets the time_created of this TargetDetectorRecipe. 395 The date and time the target detector recipe was created. Format defined by RFC3339. 396 397 398 :return: The time_created of this TargetDetectorRecipe. 399 :rtype: datetime 400 """ 401 return self._time_created 402 403 @time_created.setter 404 def time_created(self, time_created): 405 """ 406 Sets the time_created of this TargetDetectorRecipe. 407 The date and time the target detector recipe was created. Format defined by RFC3339. 408 409 410 :param time_created: The time_created of this TargetDetectorRecipe. 411 :type: datetime 412 """ 413 self._time_created = time_created 414 415 @property 416 def time_updated(self): 417 """ 418 Gets the time_updated of this TargetDetectorRecipe. 419 The date and time the target detector recipe was updated. Format defined by RFC3339. 420 421 422 :return: The time_updated of this TargetDetectorRecipe. 423 :rtype: datetime 424 """ 425 return self._time_updated 426 427 @time_updated.setter 428 def time_updated(self, time_updated): 429 """ 430 Sets the time_updated of this TargetDetectorRecipe. 431 The date and time the target detector recipe was updated. Format defined by RFC3339. 432 433 434 :param time_updated: The time_updated of this TargetDetectorRecipe. 435 :type: datetime 436 """ 437 self._time_updated = time_updated 438 439 @property 440 def lifecycle_state(self): 441 """ 442 Gets the lifecycle_state of this TargetDetectorRecipe. 443 The current state of the resource. 444 445 Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. 446 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 447 448 449 :return: The lifecycle_state of this TargetDetectorRecipe. 450 :rtype: str 451 """ 452 return self._lifecycle_state 453 454 @lifecycle_state.setter 455 def lifecycle_state(self, lifecycle_state): 456 """ 457 Sets the lifecycle_state of this TargetDetectorRecipe. 458 The current state of the resource. 459 460 461 :param lifecycle_state: The lifecycle_state of this TargetDetectorRecipe. 462 :type: str 463 """ 464 allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] 465 if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): 466 lifecycle_state = 'UNKNOWN_ENUM_VALUE' 467 self._lifecycle_state = lifecycle_state 468 469 def __repr__(self): 470 return formatted_flat_dict(self) 471 472 def __eq__(self, other): 473 if other is None: 474 return False 475 476 return self.__dict__ == other.__dict__ 477 478 def __ne__(self, other): 479 return not self == other 480