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 ResponderExecution(object): 12 """ 13 Responder Execution Object. 14 """ 15 16 #: A constant which can be used with the responder_rule_type property of a ResponderExecution. 17 #: This constant has a value of "REMEDIATION" 18 RESPONDER_RULE_TYPE_REMEDIATION = "REMEDIATION" 19 20 #: A constant which can be used with the responder_rule_type property of a ResponderExecution. 21 #: This constant has a value of "NOTIFICATION" 22 RESPONDER_RULE_TYPE_NOTIFICATION = "NOTIFICATION" 23 24 #: A constant which can be used with the responder_execution_status property of a ResponderExecution. 25 #: This constant has a value of "STARTED" 26 RESPONDER_EXECUTION_STATUS_STARTED = "STARTED" 27 28 #: A constant which can be used with the responder_execution_status property of a ResponderExecution. 29 #: This constant has a value of "AWAITING_CONFIRMATION" 30 RESPONDER_EXECUTION_STATUS_AWAITING_CONFIRMATION = "AWAITING_CONFIRMATION" 31 32 #: A constant which can be used with the responder_execution_status property of a ResponderExecution. 33 #: This constant has a value of "AWAITING_INPUT" 34 RESPONDER_EXECUTION_STATUS_AWAITING_INPUT = "AWAITING_INPUT" 35 36 #: A constant which can be used with the responder_execution_status property of a ResponderExecution. 37 #: This constant has a value of "SUCCEEDED" 38 RESPONDER_EXECUTION_STATUS_SUCCEEDED = "SUCCEEDED" 39 40 #: A constant which can be used with the responder_execution_status property of a ResponderExecution. 41 #: This constant has a value of "FAILED" 42 RESPONDER_EXECUTION_STATUS_FAILED = "FAILED" 43 44 #: A constant which can be used with the responder_execution_status property of a ResponderExecution. 45 #: This constant has a value of "SKIPPED" 46 RESPONDER_EXECUTION_STATUS_SKIPPED = "SKIPPED" 47 48 #: A constant which can be used with the responder_execution_status property of a ResponderExecution. 49 #: This constant has a value of "ALL" 50 RESPONDER_EXECUTION_STATUS_ALL = "ALL" 51 52 #: A constant which can be used with the responder_execution_mode property of a ResponderExecution. 53 #: This constant has a value of "MANUAL" 54 RESPONDER_EXECUTION_MODE_MANUAL = "MANUAL" 55 56 #: A constant which can be used with the responder_execution_mode property of a ResponderExecution. 57 #: This constant has a value of "AUTOMATED" 58 RESPONDER_EXECUTION_MODE_AUTOMATED = "AUTOMATED" 59 60 #: A constant which can be used with the responder_execution_mode property of a ResponderExecution. 61 #: This constant has a value of "ALL" 62 RESPONDER_EXECUTION_MODE_ALL = "ALL" 63 64 def __init__(self, **kwargs): 65 """ 66 Initializes a new ResponderExecution object with values from keyword arguments. 67 The following keyword arguments are supported (corresponding to the getters/setters of this class): 68 69 :param id: 70 The value to assign to the id property of this ResponderExecution. 71 :type id: str 72 73 :param responder_rule_id: 74 The value to assign to the responder_rule_id property of this ResponderExecution. 75 :type responder_rule_id: str 76 77 :param responder_rule_type: 78 The value to assign to the responder_rule_type property of this ResponderExecution. 79 Allowed values for this property are: "REMEDIATION", "NOTIFICATION", 'UNKNOWN_ENUM_VALUE'. 80 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 81 :type responder_rule_type: str 82 83 :param responder_rule_name: 84 The value to assign to the responder_rule_name property of this ResponderExecution. 85 :type responder_rule_name: str 86 87 :param problem_id: 88 The value to assign to the problem_id property of this ResponderExecution. 89 :type problem_id: str 90 91 :param region: 92 The value to assign to the region property of this ResponderExecution. 93 :type region: str 94 95 :param target_id: 96 The value to assign to the target_id property of this ResponderExecution. 97 :type target_id: str 98 99 :param compartment_id: 100 The value to assign to the compartment_id property of this ResponderExecution. 101 :type compartment_id: str 102 103 :param resource_type: 104 The value to assign to the resource_type property of this ResponderExecution. 105 :type resource_type: str 106 107 :param resource_name: 108 The value to assign to the resource_name property of this ResponderExecution. 109 :type resource_name: str 110 111 :param time_created: 112 The value to assign to the time_created property of this ResponderExecution. 113 :type time_created: datetime 114 115 :param time_completed: 116 The value to assign to the time_completed property of this ResponderExecution. 117 :type time_completed: datetime 118 119 :param responder_execution_status: 120 The value to assign to the responder_execution_status property of this ResponderExecution. 121 Allowed values for this property are: "STARTED", "AWAITING_CONFIRMATION", "AWAITING_INPUT", "SUCCEEDED", "FAILED", "SKIPPED", "ALL", 'UNKNOWN_ENUM_VALUE'. 122 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 123 :type responder_execution_status: str 124 125 :param responder_execution_mode: 126 The value to assign to the responder_execution_mode property of this ResponderExecution. 127 Allowed values for this property are: "MANUAL", "AUTOMATED", "ALL", 'UNKNOWN_ENUM_VALUE'. 128 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 129 :type responder_execution_mode: str 130 131 :param message: 132 The value to assign to the message property of this ResponderExecution. 133 :type message: str 134 135 :param responder_rule_execution_details: 136 The value to assign to the responder_rule_execution_details property of this ResponderExecution. 137 :type responder_rule_execution_details: oci.cloud_guard.models.ResponderRuleExecutionDetails 138 139 """ 140 self.swagger_types = { 141 'id': 'str', 142 'responder_rule_id': 'str', 143 'responder_rule_type': 'str', 144 'responder_rule_name': 'str', 145 'problem_id': 'str', 146 'region': 'str', 147 'target_id': 'str', 148 'compartment_id': 'str', 149 'resource_type': 'str', 150 'resource_name': 'str', 151 'time_created': 'datetime', 152 'time_completed': 'datetime', 153 'responder_execution_status': 'str', 154 'responder_execution_mode': 'str', 155 'message': 'str', 156 'responder_rule_execution_details': 'ResponderRuleExecutionDetails' 157 } 158 159 self.attribute_map = { 160 'id': 'id', 161 'responder_rule_id': 'responderRuleId', 162 'responder_rule_type': 'responderRuleType', 163 'responder_rule_name': 'responderRuleName', 164 'problem_id': 'problemId', 165 'region': 'region', 166 'target_id': 'targetId', 167 'compartment_id': 'compartmentId', 168 'resource_type': 'resourceType', 169 'resource_name': 'resourceName', 170 'time_created': 'timeCreated', 171 'time_completed': 'timeCompleted', 172 'responder_execution_status': 'responderExecutionStatus', 173 'responder_execution_mode': 'responderExecutionMode', 174 'message': 'message', 175 'responder_rule_execution_details': 'responderRuleExecutionDetails' 176 } 177 178 self._id = None 179 self._responder_rule_id = None 180 self._responder_rule_type = None 181 self._responder_rule_name = None 182 self._problem_id = None 183 self._region = None 184 self._target_id = None 185 self._compartment_id = None 186 self._resource_type = None 187 self._resource_name = None 188 self._time_created = None 189 self._time_completed = None 190 self._responder_execution_status = None 191 self._responder_execution_mode = None 192 self._message = None 193 self._responder_rule_execution_details = None 194 195 @property 196 def id(self): 197 """ 198 **[Required]** Gets the id of this ResponderExecution. 199 The unique identifier of the responder execution 200 201 202 :return: The id of this ResponderExecution. 203 :rtype: str 204 """ 205 return self._id 206 207 @id.setter 208 def id(self, id): 209 """ 210 Sets the id of this ResponderExecution. 211 The unique identifier of the responder execution 212 213 214 :param id: The id of this ResponderExecution. 215 :type: str 216 """ 217 self._id = id 218 219 @property 220 def responder_rule_id(self): 221 """ 222 **[Required]** Gets the responder_rule_id of this ResponderExecution. 223 Responder Rule id for the responder execution 224 225 226 :return: The responder_rule_id of this ResponderExecution. 227 :rtype: str 228 """ 229 return self._responder_rule_id 230 231 @responder_rule_id.setter 232 def responder_rule_id(self, responder_rule_id): 233 """ 234 Sets the responder_rule_id of this ResponderExecution. 235 Responder Rule id for the responder execution 236 237 238 :param responder_rule_id: The responder_rule_id of this ResponderExecution. 239 :type: str 240 """ 241 self._responder_rule_id = responder_rule_id 242 243 @property 244 def responder_rule_type(self): 245 """ 246 **[Required]** Gets the responder_rule_type of this ResponderExecution. 247 Rule Type for the responder execution 248 249 Allowed values for this property are: "REMEDIATION", "NOTIFICATION", 'UNKNOWN_ENUM_VALUE'. 250 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 251 252 253 :return: The responder_rule_type of this ResponderExecution. 254 :rtype: str 255 """ 256 return self._responder_rule_type 257 258 @responder_rule_type.setter 259 def responder_rule_type(self, responder_rule_type): 260 """ 261 Sets the responder_rule_type of this ResponderExecution. 262 Rule Type for the responder execution 263 264 265 :param responder_rule_type: The responder_rule_type of this ResponderExecution. 266 :type: str 267 """ 268 allowed_values = ["REMEDIATION", "NOTIFICATION"] 269 if not value_allowed_none_or_none_sentinel(responder_rule_type, allowed_values): 270 responder_rule_type = 'UNKNOWN_ENUM_VALUE' 271 self._responder_rule_type = responder_rule_type 272 273 @property 274 def responder_rule_name(self): 275 """ 276 **[Required]** Gets the responder_rule_name of this ResponderExecution. 277 Rule name for the responder execution 278 279 280 :return: The responder_rule_name of this ResponderExecution. 281 :rtype: str 282 """ 283 return self._responder_rule_name 284 285 @responder_rule_name.setter 286 def responder_rule_name(self, responder_rule_name): 287 """ 288 Sets the responder_rule_name of this ResponderExecution. 289 Rule name for the responder execution 290 291 292 :param responder_rule_name: The responder_rule_name of this ResponderExecution. 293 :type: str 294 """ 295 self._responder_rule_name = responder_rule_name 296 297 @property 298 def problem_id(self): 299 """ 300 **[Required]** Gets the problem_id of this ResponderExecution. 301 Problem id associated with the responder execution 302 303 304 :return: The problem_id of this ResponderExecution. 305 :rtype: str 306 """ 307 return self._problem_id 308 309 @problem_id.setter 310 def problem_id(self, problem_id): 311 """ 312 Sets the problem_id of this ResponderExecution. 313 Problem id associated with the responder execution 314 315 316 :param problem_id: The problem_id of this ResponderExecution. 317 :type: str 318 """ 319 self._problem_id = problem_id 320 321 @property 322 def region(self): 323 """ 324 **[Required]** Gets the region of this ResponderExecution. 325 region where the problem is found 326 327 328 :return: The region of this ResponderExecution. 329 :rtype: str 330 """ 331 return self._region 332 333 @region.setter 334 def region(self, region): 335 """ 336 Sets the region of this ResponderExecution. 337 region where the problem is found 338 339 340 :param region: The region of this ResponderExecution. 341 :type: str 342 """ 343 self._region = region 344 345 @property 346 def target_id(self): 347 """ 348 **[Required]** Gets the target_id of this ResponderExecution. 349 targetId of the problem for the responder execution 350 351 352 :return: The target_id of this ResponderExecution. 353 :rtype: str 354 """ 355 return self._target_id 356 357 @target_id.setter 358 def target_id(self, target_id): 359 """ 360 Sets the target_id of this ResponderExecution. 361 targetId of the problem for the responder execution 362 363 364 :param target_id: The target_id of this ResponderExecution. 365 :type: str 366 """ 367 self._target_id = target_id 368 369 @property 370 def compartment_id(self): 371 """ 372 **[Required]** Gets the compartment_id of this ResponderExecution. 373 compartment id of the responder execution for the problem 374 375 376 :return: The compartment_id of this ResponderExecution. 377 :rtype: str 378 """ 379 return self._compartment_id 380 381 @compartment_id.setter 382 def compartment_id(self, compartment_id): 383 """ 384 Sets the compartment_id of this ResponderExecution. 385 compartment id of the responder execution for the problem 386 387 388 :param compartment_id: The compartment_id of this ResponderExecution. 389 :type: str 390 """ 391 self._compartment_id = compartment_id 392 393 @property 394 def resource_type(self): 395 """ 396 **[Required]** Gets the resource_type of this ResponderExecution. 397 resource type of the problem for the responder execution 398 399 400 :return: The resource_type of this ResponderExecution. 401 :rtype: str 402 """ 403 return self._resource_type 404 405 @resource_type.setter 406 def resource_type(self, resource_type): 407 """ 408 Sets the resource_type of this ResponderExecution. 409 resource type of the problem for the responder execution 410 411 412 :param resource_type: The resource_type of this ResponderExecution. 413 :type: str 414 """ 415 self._resource_type = resource_type 416 417 @property 418 def resource_name(self): 419 """ 420 **[Required]** Gets the resource_name of this ResponderExecution. 421 resource name of the problem for the responder execution. TODO-DOC link to resource definition doc 422 423 424 :return: The resource_name of this ResponderExecution. 425 :rtype: str 426 """ 427 return self._resource_name 428 429 @resource_name.setter 430 def resource_name(self, resource_name): 431 """ 432 Sets the resource_name of this ResponderExecution. 433 resource name of the problem for the responder execution. TODO-DOC link to resource definition doc 434 435 436 :param resource_name: The resource_name of this ResponderExecution. 437 :type: str 438 """ 439 self._resource_name = resource_name 440 441 @property 442 def time_created(self): 443 """ 444 **[Required]** Gets the time_created of this ResponderExecution. 445 The date and time the responder execution was created. Format defined by RFC3339. 446 447 448 :return: The time_created of this ResponderExecution. 449 :rtype: datetime 450 """ 451 return self._time_created 452 453 @time_created.setter 454 def time_created(self, time_created): 455 """ 456 Sets the time_created of this ResponderExecution. 457 The date and time the responder execution was created. Format defined by RFC3339. 458 459 460 :param time_created: The time_created of this ResponderExecution. 461 :type: datetime 462 """ 463 self._time_created = time_created 464 465 @property 466 def time_completed(self): 467 """ 468 Gets the time_completed of this ResponderExecution. 469 The date and time the responder execution was updated. Format defined by RFC3339. 470 471 472 :return: The time_completed of this ResponderExecution. 473 :rtype: datetime 474 """ 475 return self._time_completed 476 477 @time_completed.setter 478 def time_completed(self, time_completed): 479 """ 480 Sets the time_completed of this ResponderExecution. 481 The date and time the responder execution was updated. Format defined by RFC3339. 482 483 484 :param time_completed: The time_completed of this ResponderExecution. 485 :type: datetime 486 """ 487 self._time_completed = time_completed 488 489 @property 490 def responder_execution_status(self): 491 """ 492 **[Required]** Gets the responder_execution_status of this ResponderExecution. 493 current execution status of the responder 494 495 Allowed values for this property are: "STARTED", "AWAITING_CONFIRMATION", "AWAITING_INPUT", "SUCCEEDED", "FAILED", "SKIPPED", "ALL", 'UNKNOWN_ENUM_VALUE'. 496 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 497 498 499 :return: The responder_execution_status of this ResponderExecution. 500 :rtype: str 501 """ 502 return self._responder_execution_status 503 504 @responder_execution_status.setter 505 def responder_execution_status(self, responder_execution_status): 506 """ 507 Sets the responder_execution_status of this ResponderExecution. 508 current execution status of the responder 509 510 511 :param responder_execution_status: The responder_execution_status of this ResponderExecution. 512 :type: str 513 """ 514 allowed_values = ["STARTED", "AWAITING_CONFIRMATION", "AWAITING_INPUT", "SUCCEEDED", "FAILED", "SKIPPED", "ALL"] 515 if not value_allowed_none_or_none_sentinel(responder_execution_status, allowed_values): 516 responder_execution_status = 'UNKNOWN_ENUM_VALUE' 517 self._responder_execution_status = responder_execution_status 518 519 @property 520 def responder_execution_mode(self): 521 """ 522 **[Required]** Gets the responder_execution_mode of this ResponderExecution. 523 execution mode of the responder 524 525 Allowed values for this property are: "MANUAL", "AUTOMATED", "ALL", 'UNKNOWN_ENUM_VALUE'. 526 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 527 528 529 :return: The responder_execution_mode of this ResponderExecution. 530 :rtype: str 531 """ 532 return self._responder_execution_mode 533 534 @responder_execution_mode.setter 535 def responder_execution_mode(self, responder_execution_mode): 536 """ 537 Sets the responder_execution_mode of this ResponderExecution. 538 execution mode of the responder 539 540 541 :param responder_execution_mode: The responder_execution_mode of this ResponderExecution. 542 :type: str 543 """ 544 allowed_values = ["MANUAL", "AUTOMATED", "ALL"] 545 if not value_allowed_none_or_none_sentinel(responder_execution_mode, allowed_values): 546 responder_execution_mode = 'UNKNOWN_ENUM_VALUE' 547 self._responder_execution_mode = responder_execution_mode 548 549 @property 550 def message(self): 551 """ 552 Gets the message of this ResponderExecution. 553 Message about the responder execution. 554 555 556 :return: The message of this ResponderExecution. 557 :rtype: str 558 """ 559 return self._message 560 561 @message.setter 562 def message(self, message): 563 """ 564 Sets the message of this ResponderExecution. 565 Message about the responder execution. 566 567 568 :param message: The message of this ResponderExecution. 569 :type: str 570 """ 571 self._message = message 572 573 @property 574 def responder_rule_execution_details(self): 575 """ 576 Gets the responder_rule_execution_details of this ResponderExecution. 577 578 :return: The responder_rule_execution_details of this ResponderExecution. 579 :rtype: oci.cloud_guard.models.ResponderRuleExecutionDetails 580 """ 581 return self._responder_rule_execution_details 582 583 @responder_rule_execution_details.setter 584 def responder_rule_execution_details(self, responder_rule_execution_details): 585 """ 586 Sets the responder_rule_execution_details of this ResponderExecution. 587 588 :param responder_rule_execution_details: The responder_rule_execution_details of this ResponderExecution. 589 :type: oci.cloud_guard.models.ResponderRuleExecutionDetails 590 """ 591 self._responder_rule_execution_details = responder_rule_execution_details 592 593 def __repr__(self): 594 return formatted_flat_dict(self) 595 596 def __eq__(self, other): 597 if other is None: 598 return False 599 600 return self.__dict__ == other.__dict__ 601 602 def __ne__(self, other): 603 return not self == other 604