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