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 HostVulnerabilityImpactedHostSummary(object):
12    """
13    Information on a host impacted by a vulnerability
14    """
15
16    #: A constant which can be used with the lifecycle_state property of a HostVulnerabilityImpactedHostSummary.
17    #: This constant has a value of "CREATING"
18    LIFECYCLE_STATE_CREATING = "CREATING"
19
20    #: A constant which can be used with the lifecycle_state property of a HostVulnerabilityImpactedHostSummary.
21    #: This constant has a value of "UPDATING"
22    LIFECYCLE_STATE_UPDATING = "UPDATING"
23
24    #: A constant which can be used with the lifecycle_state property of a HostVulnerabilityImpactedHostSummary.
25    #: This constant has a value of "ACTIVE"
26    LIFECYCLE_STATE_ACTIVE = "ACTIVE"
27
28    #: A constant which can be used with the lifecycle_state property of a HostVulnerabilityImpactedHostSummary.
29    #: This constant has a value of "DELETING"
30    LIFECYCLE_STATE_DELETING = "DELETING"
31
32    #: A constant which can be used with the lifecycle_state property of a HostVulnerabilityImpactedHostSummary.
33    #: This constant has a value of "DELETED"
34    LIFECYCLE_STATE_DELETED = "DELETED"
35
36    #: A constant which can be used with the lifecycle_state property of a HostVulnerabilityImpactedHostSummary.
37    #: This constant has a value of "FAILED"
38    LIFECYCLE_STATE_FAILED = "FAILED"
39
40    def __init__(self, **kwargs):
41        """
42        Initializes a new HostVulnerabilityImpactedHostSummary object with values from keyword arguments.
43        The following keyword arguments are supported (corresponding to the getters/setters of this class):
44
45        :param instance_id:
46            The value to assign to the instance_id property of this HostVulnerabilityImpactedHostSummary.
47        :type instance_id: str
48
49        :param compartment_id:
50            The value to assign to the compartment_id property of this HostVulnerabilityImpactedHostSummary.
51        :type compartment_id: str
52
53        :param last_agent_scan_id:
54            The value to assign to the last_agent_scan_id property of this HostVulnerabilityImpactedHostSummary.
55        :type last_agent_scan_id: str
56
57        :param lifecycle_state:
58            The value to assign to the lifecycle_state property of this HostVulnerabilityImpactedHostSummary.
59            Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
60            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
61        :type lifecycle_state: str
62
63        """
64        self.swagger_types = {
65            'instance_id': 'str',
66            'compartment_id': 'str',
67            'last_agent_scan_id': 'str',
68            'lifecycle_state': 'str'
69        }
70
71        self.attribute_map = {
72            'instance_id': 'instanceId',
73            'compartment_id': 'compartmentId',
74            'last_agent_scan_id': 'lastAgentScanId',
75            'lifecycle_state': 'lifecycleState'
76        }
77
78        self._instance_id = None
79        self._compartment_id = None
80        self._last_agent_scan_id = None
81        self._lifecycle_state = None
82
83    @property
84    def instance_id(self):
85        """
86        **[Required]** Gets the instance_id of this HostVulnerabilityImpactedHostSummary.
87        The compute instance ID of the impacted host
88
89
90        :return: The instance_id of this HostVulnerabilityImpactedHostSummary.
91        :rtype: str
92        """
93        return self._instance_id
94
95    @instance_id.setter
96    def instance_id(self, instance_id):
97        """
98        Sets the instance_id of this HostVulnerabilityImpactedHostSummary.
99        The compute instance ID of the impacted host
100
101
102        :param instance_id: The instance_id of this HostVulnerabilityImpactedHostSummary.
103        :type: str
104        """
105        self._instance_id = instance_id
106
107    @property
108    def compartment_id(self):
109        """
110        **[Required]** Gets the compartment_id of this HostVulnerabilityImpactedHostSummary.
111        The compartment ID of the impacted host
112
113
114        :return: The compartment_id of this HostVulnerabilityImpactedHostSummary.
115        :rtype: str
116        """
117        return self._compartment_id
118
119    @compartment_id.setter
120    def compartment_id(self, compartment_id):
121        """
122        Sets the compartment_id of this HostVulnerabilityImpactedHostSummary.
123        The compartment ID of the impacted host
124
125
126        :param compartment_id: The compartment_id of this HostVulnerabilityImpactedHostSummary.
127        :type: str
128        """
129        self._compartment_id = compartment_id
130
131    @property
132    def last_agent_scan_id(self):
133        """
134        **[Required]** Gets the last_agent_scan_id of this HostVulnerabilityImpactedHostSummary.
135        The ID of the last host agent scan result
136
137
138        :return: The last_agent_scan_id of this HostVulnerabilityImpactedHostSummary.
139        :rtype: str
140        """
141        return self._last_agent_scan_id
142
143    @last_agent_scan_id.setter
144    def last_agent_scan_id(self, last_agent_scan_id):
145        """
146        Sets the last_agent_scan_id of this HostVulnerabilityImpactedHostSummary.
147        The ID of the last host agent scan result
148
149
150        :param last_agent_scan_id: The last_agent_scan_id of this HostVulnerabilityImpactedHostSummary.
151        :type: str
152        """
153        self._last_agent_scan_id = last_agent_scan_id
154
155    @property
156    def lifecycle_state(self):
157        """
158        Gets the lifecycle_state of this HostVulnerabilityImpactedHostSummary.
159        The current state of the resource.
160
161        Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
162        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
163
164
165        :return: The lifecycle_state of this HostVulnerabilityImpactedHostSummary.
166        :rtype: str
167        """
168        return self._lifecycle_state
169
170    @lifecycle_state.setter
171    def lifecycle_state(self, lifecycle_state):
172        """
173        Sets the lifecycle_state of this HostVulnerabilityImpactedHostSummary.
174        The current state of the resource.
175
176
177        :param lifecycle_state: The lifecycle_state of this HostVulnerabilityImpactedHostSummary.
178        :type: str
179        """
180        allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
181        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
182            lifecycle_state = 'UNKNOWN_ENUM_VALUE'
183        self._lifecycle_state = lifecycle_state
184
185    def __repr__(self):
186        return formatted_flat_dict(self)
187
188    def __eq__(self, other):
189        if other is None:
190            return False
191
192        return self.__dict__ == other.__dict__
193
194    def __ne__(self, other):
195        return not self == other
196