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 AnalyticsCluster(object): 12 """ 13 DEPRECATED -- please use HeatWave API instead. 14 An Analytics Cluster is a database accelerator for a DB System. 15 """ 16 17 #: A constant which can be used with the lifecycle_state property of a AnalyticsCluster. 18 #: This constant has a value of "CREATING" 19 LIFECYCLE_STATE_CREATING = "CREATING" 20 21 #: A constant which can be used with the lifecycle_state property of a AnalyticsCluster. 22 #: This constant has a value of "ACTIVE" 23 LIFECYCLE_STATE_ACTIVE = "ACTIVE" 24 25 #: A constant which can be used with the lifecycle_state property of a AnalyticsCluster. 26 #: This constant has a value of "INACTIVE" 27 LIFECYCLE_STATE_INACTIVE = "INACTIVE" 28 29 #: A constant which can be used with the lifecycle_state property of a AnalyticsCluster. 30 #: This constant has a value of "UPDATING" 31 LIFECYCLE_STATE_UPDATING = "UPDATING" 32 33 #: A constant which can be used with the lifecycle_state property of a AnalyticsCluster. 34 #: This constant has a value of "DELETING" 35 LIFECYCLE_STATE_DELETING = "DELETING" 36 37 #: A constant which can be used with the lifecycle_state property of a AnalyticsCluster. 38 #: This constant has a value of "DELETED" 39 LIFECYCLE_STATE_DELETED = "DELETED" 40 41 #: A constant which can be used with the lifecycle_state property of a AnalyticsCluster. 42 #: This constant has a value of "FAILED" 43 LIFECYCLE_STATE_FAILED = "FAILED" 44 45 def __init__(self, **kwargs): 46 """ 47 Initializes a new AnalyticsCluster object with values from keyword arguments. 48 The following keyword arguments are supported (corresponding to the getters/setters of this class): 49 50 :param db_system_id: 51 The value to assign to the db_system_id property of this AnalyticsCluster. 52 :type db_system_id: str 53 54 :param shape_name: 55 The value to assign to the shape_name property of this AnalyticsCluster. 56 :type shape_name: str 57 58 :param cluster_size: 59 The value to assign to the cluster_size property of this AnalyticsCluster. 60 :type cluster_size: int 61 62 :param cluster_nodes: 63 The value to assign to the cluster_nodes property of this AnalyticsCluster. 64 :type cluster_nodes: list[oci.mysql.models.AnalyticsClusterNode] 65 66 :param lifecycle_state: 67 The value to assign to the lifecycle_state property of this AnalyticsCluster. 68 Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. 69 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 70 :type lifecycle_state: str 71 72 :param lifecycle_details: 73 The value to assign to the lifecycle_details property of this AnalyticsCluster. 74 :type lifecycle_details: str 75 76 :param time_created: 77 The value to assign to the time_created property of this AnalyticsCluster. 78 :type time_created: datetime 79 80 :param time_updated: 81 The value to assign to the time_updated property of this AnalyticsCluster. 82 :type time_updated: datetime 83 84 """ 85 self.swagger_types = { 86 'db_system_id': 'str', 87 'shape_name': 'str', 88 'cluster_size': 'int', 89 'cluster_nodes': 'list[AnalyticsClusterNode]', 90 'lifecycle_state': 'str', 91 'lifecycle_details': 'str', 92 'time_created': 'datetime', 93 'time_updated': 'datetime' 94 } 95 96 self.attribute_map = { 97 'db_system_id': 'dbSystemId', 98 'shape_name': 'shapeName', 99 'cluster_size': 'clusterSize', 100 'cluster_nodes': 'clusterNodes', 101 'lifecycle_state': 'lifecycleState', 102 'lifecycle_details': 'lifecycleDetails', 103 'time_created': 'timeCreated', 104 'time_updated': 'timeUpdated' 105 } 106 107 self._db_system_id = None 108 self._shape_name = None 109 self._cluster_size = None 110 self._cluster_nodes = None 111 self._lifecycle_state = None 112 self._lifecycle_details = None 113 self._time_created = None 114 self._time_updated = None 115 116 @property 117 def db_system_id(self): 118 """ 119 **[Required]** Gets the db_system_id of this AnalyticsCluster. 120 The OCID of the parent DB System this Analytics Cluster is attached to. 121 122 123 :return: The db_system_id of this AnalyticsCluster. 124 :rtype: str 125 """ 126 return self._db_system_id 127 128 @db_system_id.setter 129 def db_system_id(self, db_system_id): 130 """ 131 Sets the db_system_id of this AnalyticsCluster. 132 The OCID of the parent DB System this Analytics Cluster is attached to. 133 134 135 :param db_system_id: The db_system_id of this AnalyticsCluster. 136 :type: str 137 """ 138 self._db_system_id = db_system_id 139 140 @property 141 def shape_name(self): 142 """ 143 **[Required]** Gets the shape_name of this AnalyticsCluster. 144 The shape determines resources to allocate to the Analytics 145 Cluster nodes - CPU cores, memory. 146 147 148 :return: The shape_name of this AnalyticsCluster. 149 :rtype: str 150 """ 151 return self._shape_name 152 153 @shape_name.setter 154 def shape_name(self, shape_name): 155 """ 156 Sets the shape_name of this AnalyticsCluster. 157 The shape determines resources to allocate to the Analytics 158 Cluster nodes - CPU cores, memory. 159 160 161 :param shape_name: The shape_name of this AnalyticsCluster. 162 :type: str 163 """ 164 self._shape_name = shape_name 165 166 @property 167 def cluster_size(self): 168 """ 169 **[Required]** Gets the cluster_size of this AnalyticsCluster. 170 The number of analytics-processing compute instances, of the 171 specified shape, in the Analytics Cluster. 172 173 174 :return: The cluster_size of this AnalyticsCluster. 175 :rtype: int 176 """ 177 return self._cluster_size 178 179 @cluster_size.setter 180 def cluster_size(self, cluster_size): 181 """ 182 Sets the cluster_size of this AnalyticsCluster. 183 The number of analytics-processing compute instances, of the 184 specified shape, in the Analytics Cluster. 185 186 187 :param cluster_size: The cluster_size of this AnalyticsCluster. 188 :type: int 189 """ 190 self._cluster_size = cluster_size 191 192 @property 193 def cluster_nodes(self): 194 """ 195 **[Required]** Gets the cluster_nodes of this AnalyticsCluster. 196 An Analytics Cluster Node is a compute host that is part of an Analytics Cluster. 197 198 199 :return: The cluster_nodes of this AnalyticsCluster. 200 :rtype: list[oci.mysql.models.AnalyticsClusterNode] 201 """ 202 return self._cluster_nodes 203 204 @cluster_nodes.setter 205 def cluster_nodes(self, cluster_nodes): 206 """ 207 Sets the cluster_nodes of this AnalyticsCluster. 208 An Analytics Cluster Node is a compute host that is part of an Analytics Cluster. 209 210 211 :param cluster_nodes: The cluster_nodes of this AnalyticsCluster. 212 :type: list[oci.mysql.models.AnalyticsClusterNode] 213 """ 214 self._cluster_nodes = cluster_nodes 215 216 @property 217 def lifecycle_state(self): 218 """ 219 **[Required]** Gets the lifecycle_state of this AnalyticsCluster. 220 The current state of the Analytics Cluster. 221 222 Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. 223 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 224 225 226 :return: The lifecycle_state of this AnalyticsCluster. 227 :rtype: str 228 """ 229 return self._lifecycle_state 230 231 @lifecycle_state.setter 232 def lifecycle_state(self, lifecycle_state): 233 """ 234 Sets the lifecycle_state of this AnalyticsCluster. 235 The current state of the Analytics Cluster. 236 237 238 :param lifecycle_state: The lifecycle_state of this AnalyticsCluster. 239 :type: str 240 """ 241 allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] 242 if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): 243 lifecycle_state = 'UNKNOWN_ENUM_VALUE' 244 self._lifecycle_state = lifecycle_state 245 246 @property 247 def lifecycle_details(self): 248 """ 249 Gets the lifecycle_details of this AnalyticsCluster. 250 Additional information about the current lifecycleState. 251 252 253 :return: The lifecycle_details of this AnalyticsCluster. 254 :rtype: str 255 """ 256 return self._lifecycle_details 257 258 @lifecycle_details.setter 259 def lifecycle_details(self, lifecycle_details): 260 """ 261 Sets the lifecycle_details of this AnalyticsCluster. 262 Additional information about the current lifecycleState. 263 264 265 :param lifecycle_details: The lifecycle_details of this AnalyticsCluster. 266 :type: str 267 """ 268 self._lifecycle_details = lifecycle_details 269 270 @property 271 def time_created(self): 272 """ 273 **[Required]** Gets the time_created of this AnalyticsCluster. 274 The date and time the Analytics Cluster was created, as described by `RFC 3339`__. 275 276 __ https://tools.ietf.org/rfc/rfc3339 277 278 279 :return: The time_created of this AnalyticsCluster. 280 :rtype: datetime 281 """ 282 return self._time_created 283 284 @time_created.setter 285 def time_created(self, time_created): 286 """ 287 Sets the time_created of this AnalyticsCluster. 288 The date and time the Analytics Cluster was created, as described by `RFC 3339`__. 289 290 __ https://tools.ietf.org/rfc/rfc3339 291 292 293 :param time_created: The time_created of this AnalyticsCluster. 294 :type: datetime 295 """ 296 self._time_created = time_created 297 298 @property 299 def time_updated(self): 300 """ 301 **[Required]** Gets the time_updated of this AnalyticsCluster. 302 The time the Analytics Cluster was last updated, as described by `RFC 3339`__. 303 304 __ https://tools.ietf.org/rfc/rfc3339 305 306 307 :return: The time_updated of this AnalyticsCluster. 308 :rtype: datetime 309 """ 310 return self._time_updated 311 312 @time_updated.setter 313 def time_updated(self, time_updated): 314 """ 315 Sets the time_updated of this AnalyticsCluster. 316 The time the Analytics Cluster was last updated, as described by `RFC 3339`__. 317 318 __ https://tools.ietf.org/rfc/rfc3339 319 320 321 :param time_updated: The time_updated of this AnalyticsCluster. 322 :type: datetime 323 """ 324 self._time_updated = time_updated 325 326 def __repr__(self): 327 return formatted_flat_dict(self) 328 329 def __eq__(self, other): 330 if other is None: 331 return False 332 333 return self.__dict__ == other.__dict__ 334 335 def __ne__(self, other): 336 return not self == other 337