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 StreamPoolSummary(object): 12 """ 13 The summary representation of a stream pool. 14 """ 15 16 #: A constant which can be used with the lifecycle_state property of a StreamPoolSummary. 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 StreamPoolSummary. 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 StreamPoolSummary. 25 #: This constant has a value of "DELETING" 26 LIFECYCLE_STATE_DELETING = "DELETING" 27 28 #: A constant which can be used with the lifecycle_state property of a StreamPoolSummary. 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 StreamPoolSummary. 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 StreamPoolSummary. 37 #: This constant has a value of "UPDATING" 38 LIFECYCLE_STATE_UPDATING = "UPDATING" 39 40 def __init__(self, **kwargs): 41 """ 42 Initializes a new StreamPoolSummary 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 StreamPoolSummary. 47 :type id: str 48 49 :param compartment_id: 50 The value to assign to the compartment_id property of this StreamPoolSummary. 51 :type compartment_id: str 52 53 :param name: 54 The value to assign to the name property of this StreamPoolSummary. 55 :type name: str 56 57 :param lifecycle_state: 58 The value to assign to the lifecycle_state property of this StreamPoolSummary. 59 Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", '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 :param time_created: 64 The value to assign to the time_created property of this StreamPoolSummary. 65 :type time_created: datetime 66 67 :param is_private: 68 The value to assign to the is_private property of this StreamPoolSummary. 69 :type is_private: bool 70 71 :param freeform_tags: 72 The value to assign to the freeform_tags property of this StreamPoolSummary. 73 :type freeform_tags: dict(str, str) 74 75 :param defined_tags: 76 The value to assign to the defined_tags property of this StreamPoolSummary. 77 :type defined_tags: dict(str, dict(str, object)) 78 79 """ 80 self.swagger_types = { 81 'id': 'str', 82 'compartment_id': 'str', 83 'name': 'str', 84 'lifecycle_state': 'str', 85 'time_created': 'datetime', 86 'is_private': 'bool', 87 'freeform_tags': 'dict(str, str)', 88 'defined_tags': 'dict(str, dict(str, object))' 89 } 90 91 self.attribute_map = { 92 'id': 'id', 93 'compartment_id': 'compartmentId', 94 'name': 'name', 95 'lifecycle_state': 'lifecycleState', 96 'time_created': 'timeCreated', 97 'is_private': 'isPrivate', 98 'freeform_tags': 'freeformTags', 99 'defined_tags': 'definedTags' 100 } 101 102 self._id = None 103 self._compartment_id = None 104 self._name = None 105 self._lifecycle_state = None 106 self._time_created = None 107 self._is_private = None 108 self._freeform_tags = None 109 self._defined_tags = None 110 111 @property 112 def id(self): 113 """ 114 **[Required]** Gets the id of this StreamPoolSummary. 115 The OCID of the stream pool. 116 117 118 :return: The id of this StreamPoolSummary. 119 :rtype: str 120 """ 121 return self._id 122 123 @id.setter 124 def id(self, id): 125 """ 126 Sets the id of this StreamPoolSummary. 127 The OCID of the stream pool. 128 129 130 :param id: The id of this StreamPoolSummary. 131 :type: str 132 """ 133 self._id = id 134 135 @property 136 def compartment_id(self): 137 """ 138 **[Required]** Gets the compartment_id of this StreamPoolSummary. 139 Compartment OCID that the pool belongs to. 140 141 142 :return: The compartment_id of this StreamPoolSummary. 143 :rtype: str 144 """ 145 return self._compartment_id 146 147 @compartment_id.setter 148 def compartment_id(self, compartment_id): 149 """ 150 Sets the compartment_id of this StreamPoolSummary. 151 Compartment OCID that the pool belongs to. 152 153 154 :param compartment_id: The compartment_id of this StreamPoolSummary. 155 :type: str 156 """ 157 self._compartment_id = compartment_id 158 159 @property 160 def name(self): 161 """ 162 **[Required]** Gets the name of this StreamPoolSummary. 163 The name of the stream pool. 164 165 166 :return: The name of this StreamPoolSummary. 167 :rtype: str 168 """ 169 return self._name 170 171 @name.setter 172 def name(self, name): 173 """ 174 Sets the name of this StreamPoolSummary. 175 The name of the stream pool. 176 177 178 :param name: The name of this StreamPoolSummary. 179 :type: str 180 """ 181 self._name = name 182 183 @property 184 def lifecycle_state(self): 185 """ 186 **[Required]** Gets the lifecycle_state of this StreamPoolSummary. 187 The current state of the stream pool. 188 189 Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", 'UNKNOWN_ENUM_VALUE'. 190 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 191 192 193 :return: The lifecycle_state of this StreamPoolSummary. 194 :rtype: str 195 """ 196 return self._lifecycle_state 197 198 @lifecycle_state.setter 199 def lifecycle_state(self, lifecycle_state): 200 """ 201 Sets the lifecycle_state of this StreamPoolSummary. 202 The current state of the stream pool. 203 204 205 :param lifecycle_state: The lifecycle_state of this StreamPoolSummary. 206 :type: str 207 """ 208 allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING"] 209 if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): 210 lifecycle_state = 'UNKNOWN_ENUM_VALUE' 211 self._lifecycle_state = lifecycle_state 212 213 @property 214 def time_created(self): 215 """ 216 **[Required]** Gets the time_created of this StreamPoolSummary. 217 The date and time the stream pool was created, expressed in in `RFC 3339`__ timestamp format. 218 219 Example: `2018-04-20T00:00:07.405Z` 220 221 __ https://tools.ietf.org/rfc/rfc3339 222 223 224 :return: The time_created of this StreamPoolSummary. 225 :rtype: datetime 226 """ 227 return self._time_created 228 229 @time_created.setter 230 def time_created(self, time_created): 231 """ 232 Sets the time_created of this StreamPoolSummary. 233 The date and time the stream pool was created, expressed in in `RFC 3339`__ timestamp format. 234 235 Example: `2018-04-20T00:00:07.405Z` 236 237 __ https://tools.ietf.org/rfc/rfc3339 238 239 240 :param time_created: The time_created of this StreamPoolSummary. 241 :type: datetime 242 """ 243 self._time_created = time_created 244 245 @property 246 def is_private(self): 247 """ 248 Gets the is_private of this StreamPoolSummary. 249 True if the stream pool is private, false otherwise. 250 The associated endpoint and subnetId of a private stream pool can be retrieved through the :func:`get_stream_pool` API. 251 252 253 :return: The is_private of this StreamPoolSummary. 254 :rtype: bool 255 """ 256 return self._is_private 257 258 @is_private.setter 259 def is_private(self, is_private): 260 """ 261 Sets the is_private of this StreamPoolSummary. 262 True if the stream pool is private, false otherwise. 263 The associated endpoint and subnetId of a private stream pool can be retrieved through the :func:`get_stream_pool` API. 264 265 266 :param is_private: The is_private of this StreamPoolSummary. 267 :type: bool 268 """ 269 self._is_private = is_private 270 271 @property 272 def freeform_tags(self): 273 """ 274 Gets the freeform_tags of this StreamPoolSummary. 275 Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. 276 For more information, see `Resource Tags`__. 277 278 Example: `{\"Department\": \"Finance\"}` 279 280 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 281 282 283 :return: The freeform_tags of this StreamPoolSummary. 284 :rtype: dict(str, str) 285 """ 286 return self._freeform_tags 287 288 @freeform_tags.setter 289 def freeform_tags(self, freeform_tags): 290 """ 291 Sets the freeform_tags of this StreamPoolSummary. 292 Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. 293 For more information, see `Resource Tags`__. 294 295 Example: `{\"Department\": \"Finance\"}` 296 297 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 298 299 300 :param freeform_tags: The freeform_tags of this StreamPoolSummary. 301 :type: dict(str, str) 302 """ 303 self._freeform_tags = freeform_tags 304 305 @property 306 def defined_tags(self): 307 """ 308 Gets the defined_tags of this StreamPoolSummary. 309 Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__. 310 311 Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` 312 313 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 314 315 316 :return: The defined_tags of this StreamPoolSummary. 317 :rtype: dict(str, dict(str, object)) 318 """ 319 return self._defined_tags 320 321 @defined_tags.setter 322 def defined_tags(self, defined_tags): 323 """ 324 Sets the defined_tags of this StreamPoolSummary. 325 Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__. 326 327 Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` 328 329 __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm 330 331 332 :param defined_tags: The defined_tags of this StreamPoolSummary. 333 :type: dict(str, dict(str, object)) 334 """ 335 self._defined_tags = defined_tags 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