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 OrganizationTenancySummary(object): 12 """ 13 An organization tenancy summary entity. 14 """ 15 16 #: A constant which can be used with the lifecycle_state property of a OrganizationTenancySummary. 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 OrganizationTenancySummary. 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 OrganizationTenancySummary. 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 OrganizationTenancySummary. 29 #: This constant has a value of "DELETED" 30 LIFECYCLE_STATE_DELETED = "DELETED" 31 32 #: A constant which can be used with the lifecycle_state property of a OrganizationTenancySummary. 33 #: This constant has a value of "FAILED" 34 LIFECYCLE_STATE_FAILED = "FAILED" 35 36 #: A constant which can be used with the lifecycle_state property of a OrganizationTenancySummary. 37 #: This constant has a value of "DELETING" 38 LIFECYCLE_STATE_DELETING = "DELETING" 39 40 #: A constant which can be used with the role property of a OrganizationTenancySummary. 41 #: This constant has a value of "PARENT" 42 ROLE_PARENT = "PARENT" 43 44 #: A constant which can be used with the role property of a OrganizationTenancySummary. 45 #: This constant has a value of "CHILD" 46 ROLE_CHILD = "CHILD" 47 48 #: A constant which can be used with the role property of a OrganizationTenancySummary. 49 #: This constant has a value of "NONE" 50 ROLE_NONE = "NONE" 51 52 def __init__(self, **kwargs): 53 """ 54 Initializes a new OrganizationTenancySummary object with values from keyword arguments. 55 The following keyword arguments are supported (corresponding to the getters/setters of this class): 56 57 :param tenancy_id: 58 The value to assign to the tenancy_id property of this OrganizationTenancySummary. 59 :type tenancy_id: str 60 61 :param name: 62 The value to assign to the name property of this OrganizationTenancySummary. 63 :type name: str 64 65 :param lifecycle_state: 66 The value to assign to the lifecycle_state property of this OrganizationTenancySummary. 67 Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETED", "FAILED", "DELETING", 'UNKNOWN_ENUM_VALUE'. 68 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 69 :type lifecycle_state: str 70 71 :param role: 72 The value to assign to the role property of this OrganizationTenancySummary. 73 Allowed values for this property are: "PARENT", "CHILD", "NONE", 'UNKNOWN_ENUM_VALUE'. 74 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 75 :type role: str 76 77 :param time_joined: 78 The value to assign to the time_joined property of this OrganizationTenancySummary. 79 :type time_joined: datetime 80 81 :param time_left: 82 The value to assign to the time_left property of this OrganizationTenancySummary. 83 :type time_left: datetime 84 85 :param is_approved_for_transfer: 86 The value to assign to the is_approved_for_transfer property of this OrganizationTenancySummary. 87 :type is_approved_for_transfer: bool 88 89 """ 90 self.swagger_types = { 91 'tenancy_id': 'str', 92 'name': 'str', 93 'lifecycle_state': 'str', 94 'role': 'str', 95 'time_joined': 'datetime', 96 'time_left': 'datetime', 97 'is_approved_for_transfer': 'bool' 98 } 99 100 self.attribute_map = { 101 'tenancy_id': 'tenancyId', 102 'name': 'name', 103 'lifecycle_state': 'lifecycleState', 104 'role': 'role', 105 'time_joined': 'timeJoined', 106 'time_left': 'timeLeft', 107 'is_approved_for_transfer': 'isApprovedForTransfer' 108 } 109 110 self._tenancy_id = None 111 self._name = None 112 self._lifecycle_state = None 113 self._role = None 114 self._time_joined = None 115 self._time_left = None 116 self._is_approved_for_transfer = None 117 118 @property 119 def tenancy_id(self): 120 """ 121 **[Required]** Gets the tenancy_id of this OrganizationTenancySummary. 122 OCID of the tenancy. 123 124 125 :return: The tenancy_id of this OrganizationTenancySummary. 126 :rtype: str 127 """ 128 return self._tenancy_id 129 130 @tenancy_id.setter 131 def tenancy_id(self, tenancy_id): 132 """ 133 Sets the tenancy_id of this OrganizationTenancySummary. 134 OCID of the tenancy. 135 136 137 :param tenancy_id: The tenancy_id of this OrganizationTenancySummary. 138 :type: str 139 """ 140 self._tenancy_id = tenancy_id 141 142 @property 143 def name(self): 144 """ 145 Gets the name of this OrganizationTenancySummary. 146 Name of the tenancy. 147 148 149 :return: The name of this OrganizationTenancySummary. 150 :rtype: str 151 """ 152 return self._name 153 154 @name.setter 155 def name(self, name): 156 """ 157 Sets the name of this OrganizationTenancySummary. 158 Name of the tenancy. 159 160 161 :param name: The name of this OrganizationTenancySummary. 162 :type: str 163 """ 164 self._name = name 165 166 @property 167 def lifecycle_state(self): 168 """ 169 Gets the lifecycle_state of this OrganizationTenancySummary. 170 Lifecycle state of the OrganizationTenancy. 171 172 Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETED", "FAILED", "DELETING", 'UNKNOWN_ENUM_VALUE'. 173 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 174 175 176 :return: The lifecycle_state of this OrganizationTenancySummary. 177 :rtype: str 178 """ 179 return self._lifecycle_state 180 181 @lifecycle_state.setter 182 def lifecycle_state(self, lifecycle_state): 183 """ 184 Sets the lifecycle_state of this OrganizationTenancySummary. 185 Lifecycle state of the OrganizationTenancy. 186 187 188 :param lifecycle_state: The lifecycle_state of this OrganizationTenancySummary. 189 :type: str 190 """ 191 allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "DELETED", "FAILED", "DELETING"] 192 if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): 193 lifecycle_state = 'UNKNOWN_ENUM_VALUE' 194 self._lifecycle_state = lifecycle_state 195 196 @property 197 def role(self): 198 """ 199 Gets the role of this OrganizationTenancySummary. 200 Role of the OrganizationTenancy. 201 202 Allowed values for this property are: "PARENT", "CHILD", "NONE", 'UNKNOWN_ENUM_VALUE'. 203 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 204 205 206 :return: The role of this OrganizationTenancySummary. 207 :rtype: str 208 """ 209 return self._role 210 211 @role.setter 212 def role(self, role): 213 """ 214 Sets the role of this OrganizationTenancySummary. 215 Role of the OrganizationTenancy. 216 217 218 :param role: The role of this OrganizationTenancySummary. 219 :type: str 220 """ 221 allowed_values = ["PARENT", "CHILD", "NONE"] 222 if not value_allowed_none_or_none_sentinel(role, allowed_values): 223 role = 'UNKNOWN_ENUM_VALUE' 224 self._role = role 225 226 @property 227 def time_joined(self): 228 """ 229 Gets the time_joined of this OrganizationTenancySummary. 230 Date-time when this tenancy joined the organization. 231 232 233 :return: The time_joined of this OrganizationTenancySummary. 234 :rtype: datetime 235 """ 236 return self._time_joined 237 238 @time_joined.setter 239 def time_joined(self, time_joined): 240 """ 241 Sets the time_joined of this OrganizationTenancySummary. 242 Date-time when this tenancy joined the organization. 243 244 245 :param time_joined: The time_joined of this OrganizationTenancySummary. 246 :type: datetime 247 """ 248 self._time_joined = time_joined 249 250 @property 251 def time_left(self): 252 """ 253 Gets the time_left of this OrganizationTenancySummary. 254 Date-time when this tenancy left the organization. 255 256 257 :return: The time_left of this OrganizationTenancySummary. 258 :rtype: datetime 259 """ 260 return self._time_left 261 262 @time_left.setter 263 def time_left(self, time_left): 264 """ 265 Sets the time_left of this OrganizationTenancySummary. 266 Date-time when this tenancy left the organization. 267 268 269 :param time_left: The time_left of this OrganizationTenancySummary. 270 :type: datetime 271 """ 272 self._time_left = time_left 273 274 @property 275 def is_approved_for_transfer(self): 276 """ 277 Gets the is_approved_for_transfer of this OrganizationTenancySummary. 278 Flag to indicate the tenancy is approved for transfer to another organization. 279 280 281 :return: The is_approved_for_transfer of this OrganizationTenancySummary. 282 :rtype: bool 283 """ 284 return self._is_approved_for_transfer 285 286 @is_approved_for_transfer.setter 287 def is_approved_for_transfer(self, is_approved_for_transfer): 288 """ 289 Sets the is_approved_for_transfer of this OrganizationTenancySummary. 290 Flag to indicate the tenancy is approved for transfer to another organization. 291 292 293 :param is_approved_for_transfer: The is_approved_for_transfer of this OrganizationTenancySummary. 294 :type: bool 295 """ 296 self._is_approved_for_transfer = is_approved_for_transfer 297 298 def __repr__(self): 299 return formatted_flat_dict(self) 300 301 def __eq__(self, other): 302 if other is None: 303 return False 304 305 return self.__dict__ == other.__dict__ 306 307 def __ne__(self, other): 308 return not self == other 309