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 AddressListSummary(object): 12 """ 13 A summary of the address list's information. 14 """ 15 16 #: A constant which can be used with the lifecycle_state property of a AddressListSummary. 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 AddressListSummary. 21 #: This constant has a value of "ACTIVE" 22 LIFECYCLE_STATE_ACTIVE = "ACTIVE" 23 24 #: A constant which can be used with the lifecycle_state property of a AddressListSummary. 25 #: This constant has a value of "FAILED" 26 LIFECYCLE_STATE_FAILED = "FAILED" 27 28 #: A constant which can be used with the lifecycle_state property of a AddressListSummary. 29 #: This constant has a value of "UPDATING" 30 LIFECYCLE_STATE_UPDATING = "UPDATING" 31 32 #: A constant which can be used with the lifecycle_state property of a AddressListSummary. 33 #: This constant has a value of "DELETING" 34 LIFECYCLE_STATE_DELETING = "DELETING" 35 36 #: A constant which can be used with the lifecycle_state property of a AddressListSummary. 37 #: This constant has a value of "DELETED" 38 LIFECYCLE_STATE_DELETED = "DELETED" 39 40 def __init__(self, **kwargs): 41 """ 42 Initializes a new AddressListSummary object with values from keyword arguments. 43 The following keyword arguments are supported (corresponding to the getters/setters of this class): 44 45 :param id: 46 The value to assign to the id property of this AddressListSummary. 47 :type id: str 48 49 :param compartment_id: 50 The value to assign to the compartment_id property of this AddressListSummary. 51 :type compartment_id: str 52 53 :param display_name: 54 The value to assign to the display_name property of this AddressListSummary. 55 :type display_name: str 56 57 :param address_count: 58 The value to assign to the address_count property of this AddressListSummary. 59 :type address_count: float 60 61 :param freeform_tags: 62 The value to assign to the freeform_tags property of this AddressListSummary. 63 :type freeform_tags: dict(str, str) 64 65 :param defined_tags: 66 The value to assign to the defined_tags property of this AddressListSummary. 67 :type defined_tags: dict(str, dict(str, object)) 68 69 :param lifecycle_state: 70 The value to assign to the lifecycle_state property of this AddressListSummary. 71 Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. 72 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 73 :type lifecycle_state: str 74 75 :param time_created: 76 The value to assign to the time_created property of this AddressListSummary. 77 :type time_created: datetime 78 79 """ 80 self.swagger_types = { 81 'id': 'str', 82 'compartment_id': 'str', 83 'display_name': 'str', 84 'address_count': 'float', 85 'freeform_tags': 'dict(str, str)', 86 'defined_tags': 'dict(str, dict(str, object))', 87 'lifecycle_state': 'str', 88 'time_created': 'datetime' 89 } 90 91 self.attribute_map = { 92 'id': 'id', 93 'compartment_id': 'compartmentId', 94 'display_name': 'displayName', 95 'address_count': 'addressCount', 96 'freeform_tags': 'freeformTags', 97 'defined_tags': 'definedTags', 98 'lifecycle_state': 'lifecycleState', 99 'time_created': 'timeCreated' 100 } 101 102 self._id = None 103 self._compartment_id = None 104 self._display_name = None 105 self._address_count = None 106 self._freeform_tags = None 107 self._defined_tags = None 108 self._lifecycle_state = None 109 self._time_created = None 110 111 @property 112 def id(self): 113 """ 114 Gets the id of this AddressListSummary. 115 The `OCID`__ of the address list. 116 117 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 118 119 120 :return: The id of this AddressListSummary. 121 :rtype: str 122 """ 123 return self._id 124 125 @id.setter 126 def id(self, id): 127 """ 128 Sets the id of this AddressListSummary. 129 The `OCID`__ of the address list. 130 131 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 132 133 134 :param id: The id of this AddressListSummary. 135 :type: str 136 """ 137 self._id = id 138 139 @property 140 def compartment_id(self): 141 """ 142 Gets the compartment_id of this AddressListSummary. 143 The `OCID`__ of the address list's compartment. 144 145 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 146 147 148 :return: The compartment_id of this AddressListSummary. 149 :rtype: str 150 """ 151 return self._compartment_id 152 153 @compartment_id.setter 154 def compartment_id(self, compartment_id): 155 """ 156 Sets the compartment_id of this AddressListSummary. 157 The `OCID`__ of the address list's compartment. 158 159 __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm 160 161 162 :param compartment_id: The compartment_id of this AddressListSummary. 163 :type: str 164 """ 165 self._compartment_id = compartment_id 166 167 @property 168 def display_name(self): 169 """ 170 Gets the display_name of this AddressListSummary. 171 The user-friendly name of the address list. 172 173 174 :return: The display_name of this AddressListSummary. 175 :rtype: str 176 """ 177 return self._display_name 178 179 @display_name.setter 180 def display_name(self, display_name): 181 """ 182 Sets the display_name of this AddressListSummary. 183 The user-friendly name of the address list. 184 185 186 :param display_name: The display_name of this AddressListSummary. 187 :type: str 188 """ 189 self._display_name = display_name 190 191 @property 192 def address_count(self): 193 """ 194 Gets the address_count of this AddressListSummary. 195 The total number of unique IP addresses in the address list. 196 197 198 :return: The address_count of this AddressListSummary. 199 :rtype: float 200 """ 201 return self._address_count 202 203 @address_count.setter 204 def address_count(self, address_count): 205 """ 206 Sets the address_count of this AddressListSummary. 207 The total number of unique IP addresses in the address list. 208 209 210 :param address_count: The address_count of this AddressListSummary. 211 :type: float 212 """ 213 self._address_count = address_count 214 215 @property 216 def freeform_tags(self): 217 """ 218 Gets the freeform_tags of this AddressListSummary. 219 Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. 220 For more information, see `Resource Tags`__. 221 222 Example: `{\"Department\": \"Finance\"}` 223 224 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 225 226 227 :return: The freeform_tags of this AddressListSummary. 228 :rtype: dict(str, str) 229 """ 230 return self._freeform_tags 231 232 @freeform_tags.setter 233 def freeform_tags(self, freeform_tags): 234 """ 235 Sets the freeform_tags of this AddressListSummary. 236 Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. 237 For more information, see `Resource Tags`__. 238 239 Example: `{\"Department\": \"Finance\"}` 240 241 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 242 243 244 :param freeform_tags: The freeform_tags of this AddressListSummary. 245 :type: dict(str, str) 246 """ 247 self._freeform_tags = freeform_tags 248 249 @property 250 def defined_tags(self): 251 """ 252 Gets the defined_tags of this AddressListSummary. 253 Defined tags for this resource. Each key is predefined and scoped to a namespace. 254 For more information, see `Resource Tags`__. 255 256 Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` 257 258 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 259 260 261 :return: The defined_tags of this AddressListSummary. 262 :rtype: dict(str, dict(str, object)) 263 """ 264 return self._defined_tags 265 266 @defined_tags.setter 267 def defined_tags(self, defined_tags): 268 """ 269 Sets the defined_tags of this AddressListSummary. 270 Defined tags for this resource. Each key is predefined and scoped to a namespace. 271 For more information, see `Resource Tags`__. 272 273 Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` 274 275 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 276 277 278 :param defined_tags: The defined_tags of this AddressListSummary. 279 :type: dict(str, dict(str, object)) 280 """ 281 self._defined_tags = defined_tags 282 283 @property 284 def lifecycle_state(self): 285 """ 286 Gets the lifecycle_state of this AddressListSummary. 287 The current lifecycle state of the address list. 288 289 Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. 290 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 291 292 293 :return: The lifecycle_state of this AddressListSummary. 294 :rtype: str 295 """ 296 return self._lifecycle_state 297 298 @lifecycle_state.setter 299 def lifecycle_state(self, lifecycle_state): 300 """ 301 Sets the lifecycle_state of this AddressListSummary. 302 The current lifecycle state of the address list. 303 304 305 :param lifecycle_state: The lifecycle_state of this AddressListSummary. 306 :type: str 307 """ 308 allowed_values = ["CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"] 309 if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): 310 lifecycle_state = 'UNKNOWN_ENUM_VALUE' 311 self._lifecycle_state = lifecycle_state 312 313 @property 314 def time_created(self): 315 """ 316 Gets the time_created of this AddressListSummary. 317 The date and time the address list was created, in the format defined by RFC3339. 318 319 320 :return: The time_created of this AddressListSummary. 321 :rtype: datetime 322 """ 323 return self._time_created 324 325 @time_created.setter 326 def time_created(self, time_created): 327 """ 328 Sets the time_created of this AddressListSummary. 329 The date and time the address list was created, in the format defined by RFC3339. 330 331 332 :param time_created: The time_created of this AddressListSummary. 333 :type: datetime 334 """ 335 self._time_created = time_created 336 337 def __repr__(self): 338 return formatted_flat_dict(self) 339 340 def __eq__(self, other): 341 if other is None: 342 return False 343 344 return self.__dict__ == other.__dict__ 345 346 def __ne__(self, other): 347 return not self == other 348