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 LogAnalyticsWarning(object): 12 """ 13 LogAnalyticsWarning 14 """ 15 16 def __init__(self, **kwargs): 17 """ 18 Initializes a new LogAnalyticsWarning object with values from keyword arguments. 19 The following keyword arguments are supported (corresponding to the getters/setters of this class): 20 21 :param agent_id: 22 The value to assign to the agent_id property of this LogAnalyticsWarning. 23 :type agent_id: str 24 25 :param host_name: 26 The value to assign to the host_name property of this LogAnalyticsWarning. 27 :type host_name: str 28 29 :param rule_display_name: 30 The value to assign to the rule_display_name property of this LogAnalyticsWarning. 31 :type rule_display_name: str 32 33 :param source_name: 34 The value to assign to the source_name property of this LogAnalyticsWarning. 35 :type source_name: str 36 37 :param compartment_id: 38 The value to assign to the compartment_id property of this LogAnalyticsWarning. 39 :type compartment_id: str 40 41 :param source_display_name: 42 The value to assign to the source_display_name property of this LogAnalyticsWarning. 43 :type source_display_name: str 44 45 :param entity_name: 46 The value to assign to the entity_name property of this LogAnalyticsWarning. 47 :type entity_name: str 48 49 :param time_collected: 50 The value to assign to the time_collected property of this LogAnalyticsWarning. 51 :type time_collected: datetime 52 53 :param warning_id: 54 The value to assign to the warning_id property of this LogAnalyticsWarning. 55 :type warning_id: str 56 57 :param time_of_initial_warning: 58 The value to assign to the time_of_initial_warning property of this LogAnalyticsWarning. 59 :type time_of_initial_warning: datetime 60 61 :param is_active: 62 The value to assign to the is_active property of this LogAnalyticsWarning. 63 :type is_active: bool 64 65 :param is_suppressed: 66 The value to assign to the is_suppressed property of this LogAnalyticsWarning. 67 :type is_suppressed: bool 68 69 :param time_of_latest_warning: 70 The value to assign to the time_of_latest_warning property of this LogAnalyticsWarning. 71 :type time_of_latest_warning: datetime 72 73 :param warning_level: 74 The value to assign to the warning_level property of this LogAnalyticsWarning. 75 :type warning_level: str 76 77 :param warning_message: 78 The value to assign to the warning_message property of this LogAnalyticsWarning. 79 :type warning_message: str 80 81 :param pattern_id: 82 The value to assign to the pattern_id property of this LogAnalyticsWarning. 83 :type pattern_id: str 84 85 :param pattern_text: 86 The value to assign to the pattern_text property of this LogAnalyticsWarning. 87 :type pattern_text: str 88 89 :param rule_id: 90 The value to assign to the rule_id property of this LogAnalyticsWarning. 91 :type rule_id: str 92 93 :param source_id: 94 The value to assign to the source_id property of this LogAnalyticsWarning. 95 :type source_id: str 96 97 :param suppressed_by: 98 The value to assign to the suppressed_by property of this LogAnalyticsWarning. 99 :type suppressed_by: str 100 101 :param entity_id: 102 The value to assign to the entity_id property of this LogAnalyticsWarning. 103 :type entity_id: str 104 105 :param entity_type: 106 The value to assign to the entity_type property of this LogAnalyticsWarning. 107 :type entity_type: str 108 109 :param entity_type_display_name: 110 The value to assign to the entity_type_display_name property of this LogAnalyticsWarning. 111 :type entity_type_display_name: str 112 113 :param type_display_name: 114 The value to assign to the type_display_name property of this LogAnalyticsWarning. 115 :type type_display_name: str 116 117 :param type_name: 118 The value to assign to the type_name property of this LogAnalyticsWarning. 119 :type type_name: str 120 121 :param severity: 122 The value to assign to the severity property of this LogAnalyticsWarning. 123 :type severity: int 124 125 """ 126 self.swagger_types = { 127 'agent_id': 'str', 128 'host_name': 'str', 129 'rule_display_name': 'str', 130 'source_name': 'str', 131 'compartment_id': 'str', 132 'source_display_name': 'str', 133 'entity_name': 'str', 134 'time_collected': 'datetime', 135 'warning_id': 'str', 136 'time_of_initial_warning': 'datetime', 137 'is_active': 'bool', 138 'is_suppressed': 'bool', 139 'time_of_latest_warning': 'datetime', 140 'warning_level': 'str', 141 'warning_message': 'str', 142 'pattern_id': 'str', 143 'pattern_text': 'str', 144 'rule_id': 'str', 145 'source_id': 'str', 146 'suppressed_by': 'str', 147 'entity_id': 'str', 148 'entity_type': 'str', 149 'entity_type_display_name': 'str', 150 'type_display_name': 'str', 151 'type_name': 'str', 152 'severity': 'int' 153 } 154 155 self.attribute_map = { 156 'agent_id': 'agentId', 157 'host_name': 'hostName', 158 'rule_display_name': 'ruleDisplayName', 159 'source_name': 'sourceName', 160 'compartment_id': 'compartmentId', 161 'source_display_name': 'sourceDisplayName', 162 'entity_name': 'entityName', 163 'time_collected': 'timeCollected', 164 'warning_id': 'warningId', 165 'time_of_initial_warning': 'timeOfInitialWarning', 166 'is_active': 'isActive', 167 'is_suppressed': 'isSuppressed', 168 'time_of_latest_warning': 'timeOfLatestWarning', 169 'warning_level': 'warningLevel', 170 'warning_message': 'warningMessage', 171 'pattern_id': 'patternId', 172 'pattern_text': 'patternText', 173 'rule_id': 'ruleId', 174 'source_id': 'sourceId', 175 'suppressed_by': 'suppressedBy', 176 'entity_id': 'entityId', 177 'entity_type': 'entityType', 178 'entity_type_display_name': 'entityTypeDisplayName', 179 'type_display_name': 'typeDisplayName', 180 'type_name': 'typeName', 181 'severity': 'severity' 182 } 183 184 self._agent_id = None 185 self._host_name = None 186 self._rule_display_name = None 187 self._source_name = None 188 self._compartment_id = None 189 self._source_display_name = None 190 self._entity_name = None 191 self._time_collected = None 192 self._warning_id = None 193 self._time_of_initial_warning = None 194 self._is_active = None 195 self._is_suppressed = None 196 self._time_of_latest_warning = None 197 self._warning_level = None 198 self._warning_message = None 199 self._pattern_id = None 200 self._pattern_text = None 201 self._rule_id = None 202 self._source_id = None 203 self._suppressed_by = None 204 self._entity_id = None 205 self._entity_type = None 206 self._entity_type_display_name = None 207 self._type_display_name = None 208 self._type_name = None 209 self._severity = None 210 211 @property 212 def agent_id(self): 213 """ 214 Gets the agent_id of this LogAnalyticsWarning. 215 The unique identifier of the agent associated with the warning 216 217 218 :return: The agent_id of this LogAnalyticsWarning. 219 :rtype: str 220 """ 221 return self._agent_id 222 223 @agent_id.setter 224 def agent_id(self, agent_id): 225 """ 226 Sets the agent_id of this LogAnalyticsWarning. 227 The unique identifier of the agent associated with the warning 228 229 230 :param agent_id: The agent_id of this LogAnalyticsWarning. 231 :type: str 232 """ 233 self._agent_id = agent_id 234 235 @property 236 def host_name(self): 237 """ 238 Gets the host_name of this LogAnalyticsWarning. 239 The host containing the agent associated with the warning 240 241 242 :return: The host_name of this LogAnalyticsWarning. 243 :rtype: str 244 """ 245 return self._host_name 246 247 @host_name.setter 248 def host_name(self, host_name): 249 """ 250 Sets the host_name of this LogAnalyticsWarning. 251 The host containing the agent associated with the warning 252 253 254 :param host_name: The host_name of this LogAnalyticsWarning. 255 :type: str 256 """ 257 self._host_name = host_name 258 259 @property 260 def rule_display_name(self): 261 """ 262 Gets the rule_display_name of this LogAnalyticsWarning. 263 The display name of the rule which triggered the warning 264 265 266 :return: The rule_display_name of this LogAnalyticsWarning. 267 :rtype: str 268 """ 269 return self._rule_display_name 270 271 @rule_display_name.setter 272 def rule_display_name(self, rule_display_name): 273 """ 274 Sets the rule_display_name of this LogAnalyticsWarning. 275 The display name of the rule which triggered the warning 276 277 278 :param rule_display_name: The rule_display_name of this LogAnalyticsWarning. 279 :type: str 280 """ 281 self._rule_display_name = rule_display_name 282 283 @property 284 def source_name(self): 285 """ 286 Gets the source_name of this LogAnalyticsWarning. 287 The name of the source associated with the warning 288 289 290 :return: The source_name of this LogAnalyticsWarning. 291 :rtype: str 292 """ 293 return self._source_name 294 295 @source_name.setter 296 def source_name(self, source_name): 297 """ 298 Sets the source_name of this LogAnalyticsWarning. 299 The name of the source associated with the warning 300 301 302 :param source_name: The source_name of this LogAnalyticsWarning. 303 :type: str 304 """ 305 self._source_name = source_name 306 307 @property 308 def compartment_id(self): 309 """ 310 Gets the compartment_id of this LogAnalyticsWarning. 311 The entity compartment ID. 312 313 314 :return: The compartment_id of this LogAnalyticsWarning. 315 :rtype: str 316 """ 317 return self._compartment_id 318 319 @compartment_id.setter 320 def compartment_id(self, compartment_id): 321 """ 322 Sets the compartment_id of this LogAnalyticsWarning. 323 The entity compartment ID. 324 325 326 :param compartment_id: The compartment_id of this LogAnalyticsWarning. 327 :type: str 328 """ 329 self._compartment_id = compartment_id 330 331 @property 332 def source_display_name(self): 333 """ 334 Gets the source_display_name of this LogAnalyticsWarning. 335 The display name of the source associated with the warning 336 337 338 :return: The source_display_name of this LogAnalyticsWarning. 339 :rtype: str 340 """ 341 return self._source_display_name 342 343 @source_display_name.setter 344 def source_display_name(self, source_display_name): 345 """ 346 Sets the source_display_name of this LogAnalyticsWarning. 347 The display name of the source associated with the warning 348 349 350 :param source_display_name: The source_display_name of this LogAnalyticsWarning. 351 :type: str 352 """ 353 self._source_display_name = source_display_name 354 355 @property 356 def entity_name(self): 357 """ 358 Gets the entity_name of this LogAnalyticsWarning. 359 The name of the entity associated with the warning 360 361 362 :return: The entity_name of this LogAnalyticsWarning. 363 :rtype: str 364 """ 365 return self._entity_name 366 367 @entity_name.setter 368 def entity_name(self, entity_name): 369 """ 370 Sets the entity_name of this LogAnalyticsWarning. 371 The name of the entity associated with the warning 372 373 374 :param entity_name: The entity_name of this LogAnalyticsWarning. 375 :type: str 376 """ 377 self._entity_name = entity_name 378 379 @property 380 def time_collected(self): 381 """ 382 Gets the time_collected of this LogAnalyticsWarning. 383 The time at which the warning was most recently collected 384 385 386 :return: The time_collected of this LogAnalyticsWarning. 387 :rtype: datetime 388 """ 389 return self._time_collected 390 391 @time_collected.setter 392 def time_collected(self, time_collected): 393 """ 394 Sets the time_collected of this LogAnalyticsWarning. 395 The time at which the warning was most recently collected 396 397 398 :param time_collected: The time_collected of this LogAnalyticsWarning. 399 :type: datetime 400 """ 401 self._time_collected = time_collected 402 403 @property 404 def warning_id(self): 405 """ 406 Gets the warning_id of this LogAnalyticsWarning. 407 The unique identifier of the warning 408 409 410 :return: The warning_id of this LogAnalyticsWarning. 411 :rtype: str 412 """ 413 return self._warning_id 414 415 @warning_id.setter 416 def warning_id(self, warning_id): 417 """ 418 Sets the warning_id of this LogAnalyticsWarning. 419 The unique identifier of the warning 420 421 422 :param warning_id: The warning_id of this LogAnalyticsWarning. 423 :type: str 424 """ 425 self._warning_id = warning_id 426 427 @property 428 def time_of_initial_warning(self): 429 """ 430 Gets the time_of_initial_warning of this LogAnalyticsWarning. 431 The date at which the warning was initially triggered 432 433 434 :return: The time_of_initial_warning of this LogAnalyticsWarning. 435 :rtype: datetime 436 """ 437 return self._time_of_initial_warning 438 439 @time_of_initial_warning.setter 440 def time_of_initial_warning(self, time_of_initial_warning): 441 """ 442 Sets the time_of_initial_warning of this LogAnalyticsWarning. 443 The date at which the warning was initially triggered 444 445 446 :param time_of_initial_warning: The time_of_initial_warning of this LogAnalyticsWarning. 447 :type: datetime 448 """ 449 self._time_of_initial_warning = time_of_initial_warning 450 451 @property 452 def is_active(self): 453 """ 454 Gets the is_active of this LogAnalyticsWarning. 455 A flag indicating if the warning is currently active 456 457 458 :return: The is_active of this LogAnalyticsWarning. 459 :rtype: bool 460 """ 461 return self._is_active 462 463 @is_active.setter 464 def is_active(self, is_active): 465 """ 466 Sets the is_active of this LogAnalyticsWarning. 467 A flag indicating if the warning is currently active 468 469 470 :param is_active: The is_active of this LogAnalyticsWarning. 471 :type: bool 472 """ 473 self._is_active = is_active 474 475 @property 476 def is_suppressed(self): 477 """ 478 Gets the is_suppressed of this LogAnalyticsWarning. 479 A flag indicating if the warning is currently suppressed 480 481 482 :return: The is_suppressed of this LogAnalyticsWarning. 483 :rtype: bool 484 """ 485 return self._is_suppressed 486 487 @is_suppressed.setter 488 def is_suppressed(self, is_suppressed): 489 """ 490 Sets the is_suppressed of this LogAnalyticsWarning. 491 A flag indicating if the warning is currently suppressed 492 493 494 :param is_suppressed: The is_suppressed of this LogAnalyticsWarning. 495 :type: bool 496 """ 497 self._is_suppressed = is_suppressed 498 499 @property 500 def time_of_latest_warning(self): 501 """ 502 Gets the time_of_latest_warning of this LogAnalyticsWarning. 503 The most recent date on which the warning was triggered 504 505 506 :return: The time_of_latest_warning of this LogAnalyticsWarning. 507 :rtype: datetime 508 """ 509 return self._time_of_latest_warning 510 511 @time_of_latest_warning.setter 512 def time_of_latest_warning(self, time_of_latest_warning): 513 """ 514 Sets the time_of_latest_warning of this LogAnalyticsWarning. 515 The most recent date on which the warning was triggered 516 517 518 :param time_of_latest_warning: The time_of_latest_warning of this LogAnalyticsWarning. 519 :type: datetime 520 """ 521 self._time_of_latest_warning = time_of_latest_warning 522 523 @property 524 def warning_level(self): 525 """ 526 Gets the warning_level of this LogAnalyticsWarning. 527 The warning level - either pattern, rule, or source. 528 529 530 :return: The warning_level of this LogAnalyticsWarning. 531 :rtype: str 532 """ 533 return self._warning_level 534 535 @warning_level.setter 536 def warning_level(self, warning_level): 537 """ 538 Sets the warning_level of this LogAnalyticsWarning. 539 The warning level - either pattern, rule, or source. 540 541 542 :param warning_level: The warning_level of this LogAnalyticsWarning. 543 :type: str 544 """ 545 self._warning_level = warning_level 546 547 @property 548 def warning_message(self): 549 """ 550 Gets the warning_message of this LogAnalyticsWarning. 551 A description of the warning intended for the consumer of the warning. It will 552 usually detail the cause of the warning, may suggest a remedy, and can contain any 553 other relevant information the consumer might find useful 554 555 556 :return: The warning_message of this LogAnalyticsWarning. 557 :rtype: str 558 """ 559 return self._warning_message 560 561 @warning_message.setter 562 def warning_message(self, warning_message): 563 """ 564 Sets the warning_message of this LogAnalyticsWarning. 565 A description of the warning intended for the consumer of the warning. It will 566 usually detail the cause of the warning, may suggest a remedy, and can contain any 567 other relevant information the consumer might find useful 568 569 570 :param warning_message: The warning_message of this LogAnalyticsWarning. 571 :type: str 572 """ 573 self._warning_message = warning_message 574 575 @property 576 def pattern_id(self): 577 """ 578 Gets the pattern_id of this LogAnalyticsWarning. 579 The unique identifier of the warning pattern 580 581 582 :return: The pattern_id of this LogAnalyticsWarning. 583 :rtype: str 584 """ 585 return self._pattern_id 586 587 @pattern_id.setter 588 def pattern_id(self, pattern_id): 589 """ 590 Sets the pattern_id of this LogAnalyticsWarning. 591 The unique identifier of the warning pattern 592 593 594 :param pattern_id: The pattern_id of this LogAnalyticsWarning. 595 :type: str 596 """ 597 self._pattern_id = pattern_id 598 599 @property 600 def pattern_text(self): 601 """ 602 Gets the pattern_text of this LogAnalyticsWarning. 603 The text of the pattern used by the warning 604 605 606 :return: The pattern_text of this LogAnalyticsWarning. 607 :rtype: str 608 """ 609 return self._pattern_text 610 611 @pattern_text.setter 612 def pattern_text(self, pattern_text): 613 """ 614 Sets the pattern_text of this LogAnalyticsWarning. 615 The text of the pattern used by the warning 616 617 618 :param pattern_text: The pattern_text of this LogAnalyticsWarning. 619 :type: str 620 """ 621 self._pattern_text = pattern_text 622 623 @property 624 def rule_id(self): 625 """ 626 Gets the rule_id of this LogAnalyticsWarning. 627 The unique identifier of the rule associated with the warning 628 629 630 :return: The rule_id of this LogAnalyticsWarning. 631 :rtype: str 632 """ 633 return self._rule_id 634 635 @rule_id.setter 636 def rule_id(self, rule_id): 637 """ 638 Sets the rule_id of this LogAnalyticsWarning. 639 The unique identifier of the rule associated with the warning 640 641 642 :param rule_id: The rule_id of this LogAnalyticsWarning. 643 :type: str 644 """ 645 self._rule_id = rule_id 646 647 @property 648 def source_id(self): 649 """ 650 Gets the source_id of this LogAnalyticsWarning. 651 The unique identifier of the source associated with the warning 652 653 654 :return: The source_id of this LogAnalyticsWarning. 655 :rtype: str 656 """ 657 return self._source_id 658 659 @source_id.setter 660 def source_id(self, source_id): 661 """ 662 Sets the source_id of this LogAnalyticsWarning. 663 The unique identifier of the source associated with the warning 664 665 666 :param source_id: The source_id of this LogAnalyticsWarning. 667 :type: str 668 """ 669 self._source_id = source_id 670 671 @property 672 def suppressed_by(self): 673 """ 674 Gets the suppressed_by of this LogAnalyticsWarning. 675 The user who suppressed the warning, or empty if the warning is not suppressed 676 677 678 :return: The suppressed_by of this LogAnalyticsWarning. 679 :rtype: str 680 """ 681 return self._suppressed_by 682 683 @suppressed_by.setter 684 def suppressed_by(self, suppressed_by): 685 """ 686 Sets the suppressed_by of this LogAnalyticsWarning. 687 The user who suppressed the warning, or empty if the warning is not suppressed 688 689 690 :param suppressed_by: The suppressed_by of this LogAnalyticsWarning. 691 :type: str 692 """ 693 self._suppressed_by = suppressed_by 694 695 @property 696 def entity_id(self): 697 """ 698 Gets the entity_id of this LogAnalyticsWarning. 699 The unique identifier of the entity associated with the warning 700 701 702 :return: The entity_id of this LogAnalyticsWarning. 703 :rtype: str 704 """ 705 return self._entity_id 706 707 @entity_id.setter 708 def entity_id(self, entity_id): 709 """ 710 Sets the entity_id of this LogAnalyticsWarning. 711 The unique identifier of the entity associated with the warning 712 713 714 :param entity_id: The entity_id of this LogAnalyticsWarning. 715 :type: str 716 """ 717 self._entity_id = entity_id 718 719 @property 720 def entity_type(self): 721 """ 722 Gets the entity_type of this LogAnalyticsWarning. 723 The type of the entity associated with the warning 724 725 726 :return: The entity_type of this LogAnalyticsWarning. 727 :rtype: str 728 """ 729 return self._entity_type 730 731 @entity_type.setter 732 def entity_type(self, entity_type): 733 """ 734 Sets the entity_type of this LogAnalyticsWarning. 735 The type of the entity associated with the warning 736 737 738 :param entity_type: The entity_type of this LogAnalyticsWarning. 739 :type: str 740 """ 741 self._entity_type = entity_type 742 743 @property 744 def entity_type_display_name(self): 745 """ 746 Gets the entity_type_display_name of this LogAnalyticsWarning. 747 The display name of the entity type associated with the warning 748 749 750 :return: The entity_type_display_name of this LogAnalyticsWarning. 751 :rtype: str 752 """ 753 return self._entity_type_display_name 754 755 @entity_type_display_name.setter 756 def entity_type_display_name(self, entity_type_display_name): 757 """ 758 Sets the entity_type_display_name of this LogAnalyticsWarning. 759 The display name of the entity type associated with the warning 760 761 762 :param entity_type_display_name: The entity_type_display_name of this LogAnalyticsWarning. 763 :type: str 764 """ 765 self._entity_type_display_name = entity_type_display_name 766 767 @property 768 def type_display_name(self): 769 """ 770 Gets the type_display_name of this LogAnalyticsWarning. 771 The display name of the warning type 772 773 774 :return: The type_display_name of this LogAnalyticsWarning. 775 :rtype: str 776 """ 777 return self._type_display_name 778 779 @type_display_name.setter 780 def type_display_name(self, type_display_name): 781 """ 782 Sets the type_display_name of this LogAnalyticsWarning. 783 The display name of the warning type 784 785 786 :param type_display_name: The type_display_name of this LogAnalyticsWarning. 787 :type: str 788 """ 789 self._type_display_name = type_display_name 790 791 @property 792 def type_name(self): 793 """ 794 Gets the type_name of this LogAnalyticsWarning. 795 The internal name of the warning 796 797 798 :return: The type_name of this LogAnalyticsWarning. 799 :rtype: str 800 """ 801 return self._type_name 802 803 @type_name.setter 804 def type_name(self, type_name): 805 """ 806 Sets the type_name of this LogAnalyticsWarning. 807 The internal name of the warning 808 809 810 :param type_name: The type_name of this LogAnalyticsWarning. 811 :type: str 812 """ 813 self._type_name = type_name 814 815 @property 816 def severity(self): 817 """ 818 Gets the severity of this LogAnalyticsWarning. 819 The warning severity 820 821 822 :return: The severity of this LogAnalyticsWarning. 823 :rtype: int 824 """ 825 return self._severity 826 827 @severity.setter 828 def severity(self, severity): 829 """ 830 Sets the severity of this LogAnalyticsWarning. 831 The warning severity 832 833 834 :param severity: The severity of this LogAnalyticsWarning. 835 :type: int 836 """ 837 self._severity = severity 838 839 def __repr__(self): 840 return formatted_flat_dict(self) 841 842 def __eq__(self, other): 843 if other is None: 844 return False 845 846 return self.__dict__ == other.__dict__ 847 848 def __ne__(self, other): 849 return not self == other 850