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 EnrollmentStatusSummary(object): 12 """ 13 The metadata associated with the enrollment status summary. 14 """ 15 16 #: A constant which can be used with the lifecycle_state property of a EnrollmentStatusSummary. 17 #: This constant has a value of "ACTIVE" 18 LIFECYCLE_STATE_ACTIVE = "ACTIVE" 19 20 #: A constant which can be used with the lifecycle_state property of a EnrollmentStatusSummary. 21 #: This constant has a value of "FAILED" 22 LIFECYCLE_STATE_FAILED = "FAILED" 23 24 #: A constant which can be used with the lifecycle_state property of a EnrollmentStatusSummary. 25 #: This constant has a value of "INACTIVE" 26 LIFECYCLE_STATE_INACTIVE = "INACTIVE" 27 28 #: A constant which can be used with the lifecycle_state property of a EnrollmentStatusSummary. 29 #: This constant has a value of "ATTACHING" 30 LIFECYCLE_STATE_ATTACHING = "ATTACHING" 31 32 #: A constant which can be used with the lifecycle_state property of a EnrollmentStatusSummary. 33 #: This constant has a value of "DETACHING" 34 LIFECYCLE_STATE_DETACHING = "DETACHING" 35 36 #: A constant which can be used with the lifecycle_state property of a EnrollmentStatusSummary. 37 #: This constant has a value of "DELETING" 38 LIFECYCLE_STATE_DELETING = "DELETING" 39 40 #: A constant which can be used with the lifecycle_state property of a EnrollmentStatusSummary. 41 #: This constant has a value of "DELETED" 42 LIFECYCLE_STATE_DELETED = "DELETED" 43 44 #: A constant which can be used with the lifecycle_state property of a EnrollmentStatusSummary. 45 #: This constant has a value of "UPDATING" 46 LIFECYCLE_STATE_UPDATING = "UPDATING" 47 48 #: A constant which can be used with the lifecycle_state property of a EnrollmentStatusSummary. 49 #: This constant has a value of "CREATING" 50 LIFECYCLE_STATE_CREATING = "CREATING" 51 52 #: A constant which can be used with the status property of a EnrollmentStatusSummary. 53 #: This constant has a value of "ACTIVE" 54 STATUS_ACTIVE = "ACTIVE" 55 56 #: A constant which can be used with the status property of a EnrollmentStatusSummary. 57 #: This constant has a value of "INACTIVE" 58 STATUS_INACTIVE = "INACTIVE" 59 60 def __init__(self, **kwargs): 61 """ 62 Initializes a new EnrollmentStatusSummary 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 EnrollmentStatusSummary. 67 :type id: str 68 69 :param compartment_id: 70 The value to assign to the compartment_id property of this EnrollmentStatusSummary. 71 :type compartment_id: str 72 73 :param lifecycle_state: 74 The value to assign to the lifecycle_state property of this EnrollmentStatusSummary. 75 Allowed values for this property are: "ACTIVE", "FAILED", "INACTIVE", "ATTACHING", "DETACHING", "DELETING", "DELETED", "UPDATING", "CREATING", 'UNKNOWN_ENUM_VALUE'. 76 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 77 :type lifecycle_state: str 78 79 :param status: 80 The value to assign to the status property of this EnrollmentStatusSummary. 81 Allowed values for this property are: "ACTIVE", "INACTIVE", 'UNKNOWN_ENUM_VALUE'. 82 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 83 :type status: str 84 85 :param status_reason: 86 The value to assign to the status_reason property of this EnrollmentStatusSummary. 87 :type status_reason: str 88 89 :param time_created: 90 The value to assign to the time_created property of this EnrollmentStatusSummary. 91 :type time_created: datetime 92 93 :param time_updated: 94 The value to assign to the time_updated property of this EnrollmentStatusSummary. 95 :type time_updated: datetime 96 97 """ 98 self.swagger_types = { 99 'id': 'str', 100 'compartment_id': 'str', 101 'lifecycle_state': 'str', 102 'status': 'str', 103 'status_reason': 'str', 104 'time_created': 'datetime', 105 'time_updated': 'datetime' 106 } 107 108 self.attribute_map = { 109 'id': 'id', 110 'compartment_id': 'compartmentId', 111 'lifecycle_state': 'lifecycleState', 112 'status': 'status', 113 'status_reason': 'statusReason', 114 'time_created': 'timeCreated', 115 'time_updated': 'timeUpdated' 116 } 117 118 self._id = None 119 self._compartment_id = None 120 self._lifecycle_state = None 121 self._status = None 122 self._status_reason = None 123 self._time_created = None 124 self._time_updated = None 125 126 @property 127 def id(self): 128 """ 129 **[Required]** Gets the id of this EnrollmentStatusSummary. 130 The OCID of the enrollment status. 131 132 133 :return: The id of this EnrollmentStatusSummary. 134 :rtype: str 135 """ 136 return self._id 137 138 @id.setter 139 def id(self, id): 140 """ 141 Sets the id of this EnrollmentStatusSummary. 142 The OCID of the enrollment status. 143 144 145 :param id: The id of this EnrollmentStatusSummary. 146 :type: str 147 """ 148 self._id = id 149 150 @property 151 def compartment_id(self): 152 """ 153 **[Required]** Gets the compartment_id of this EnrollmentStatusSummary. 154 The OCID of the compartment. 155 156 157 :return: The compartment_id of this EnrollmentStatusSummary. 158 :rtype: str 159 """ 160 return self._compartment_id 161 162 @compartment_id.setter 163 def compartment_id(self, compartment_id): 164 """ 165 Sets the compartment_id of this EnrollmentStatusSummary. 166 The OCID of the compartment. 167 168 169 :param compartment_id: The compartment_id of this EnrollmentStatusSummary. 170 :type: str 171 """ 172 self._compartment_id = compartment_id 173 174 @property 175 def lifecycle_state(self): 176 """ 177 **[Required]** Gets the lifecycle_state of this EnrollmentStatusSummary. 178 The enrollment status' current state. 179 180 Allowed values for this property are: "ACTIVE", "FAILED", "INACTIVE", "ATTACHING", "DETACHING", "DELETING", "DELETED", "UPDATING", "CREATING", 'UNKNOWN_ENUM_VALUE'. 181 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 182 183 184 :return: The lifecycle_state of this EnrollmentStatusSummary. 185 :rtype: str 186 """ 187 return self._lifecycle_state 188 189 @lifecycle_state.setter 190 def lifecycle_state(self, lifecycle_state): 191 """ 192 Sets the lifecycle_state of this EnrollmentStatusSummary. 193 The enrollment status' current state. 194 195 196 :param lifecycle_state: The lifecycle_state of this EnrollmentStatusSummary. 197 :type: str 198 """ 199 allowed_values = ["ACTIVE", "FAILED", "INACTIVE", "ATTACHING", "DETACHING", "DELETING", "DELETED", "UPDATING", "CREATING"] 200 if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): 201 lifecycle_state = 'UNKNOWN_ENUM_VALUE' 202 self._lifecycle_state = lifecycle_state 203 204 @property 205 def status(self): 206 """ 207 **[Required]** Gets the status of this EnrollmentStatusSummary. 208 The current Cloud Advisor enrollment status. 209 210 Allowed values for this property are: "ACTIVE", "INACTIVE", 'UNKNOWN_ENUM_VALUE'. 211 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 212 213 214 :return: The status of this EnrollmentStatusSummary. 215 :rtype: str 216 """ 217 return self._status 218 219 @status.setter 220 def status(self, status): 221 """ 222 Sets the status of this EnrollmentStatusSummary. 223 The current Cloud Advisor enrollment status. 224 225 226 :param status: The status of this EnrollmentStatusSummary. 227 :type: str 228 """ 229 allowed_values = ["ACTIVE", "INACTIVE"] 230 if not value_allowed_none_or_none_sentinel(status, allowed_values): 231 status = 'UNKNOWN_ENUM_VALUE' 232 self._status = status 233 234 @property 235 def status_reason(self): 236 """ 237 Gets the status_reason of this EnrollmentStatusSummary. 238 The reason for the enrollment status of the tenancy. 239 240 241 :return: The status_reason of this EnrollmentStatusSummary. 242 :rtype: str 243 """ 244 return self._status_reason 245 246 @status_reason.setter 247 def status_reason(self, status_reason): 248 """ 249 Sets the status_reason of this EnrollmentStatusSummary. 250 The reason for the enrollment status of the tenancy. 251 252 253 :param status_reason: The status_reason of this EnrollmentStatusSummary. 254 :type: str 255 """ 256 self._status_reason = status_reason 257 258 @property 259 def time_created(self): 260 """ 261 Gets the time_created of this EnrollmentStatusSummary. 262 The date and time the enrollment status was created, in the format defined by RFC3339. 263 264 265 :return: The time_created of this EnrollmentStatusSummary. 266 :rtype: datetime 267 """ 268 return self._time_created 269 270 @time_created.setter 271 def time_created(self, time_created): 272 """ 273 Sets the time_created of this EnrollmentStatusSummary. 274 The date and time the enrollment status was created, in the format defined by RFC3339. 275 276 277 :param time_created: The time_created of this EnrollmentStatusSummary. 278 :type: datetime 279 """ 280 self._time_created = time_created 281 282 @property 283 def time_updated(self): 284 """ 285 Gets the time_updated of this EnrollmentStatusSummary. 286 The date and time the enrollment status was last updated, in the format defined by RFC3339. 287 288 289 :return: The time_updated of this EnrollmentStatusSummary. 290 :rtype: datetime 291 """ 292 return self._time_updated 293 294 @time_updated.setter 295 def time_updated(self, time_updated): 296 """ 297 Sets the time_updated of this EnrollmentStatusSummary. 298 The date and time the enrollment status was last updated, in the format defined by RFC3339. 299 300 301 :param time_updated: The time_updated of this EnrollmentStatusSummary. 302 :type: datetime 303 """ 304 self._time_updated = time_updated 305 306 def __repr__(self): 307 return formatted_flat_dict(self) 308 309 def __eq__(self, other): 310 if other is None: 311 return False 312 313 return self.__dict__ == other.__dict__ 314 315 def __ne__(self, other): 316 return not self == other 317