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 AutonomousDataWarehouse(object):
12    """
13    **Deprecated.** See :class:`AutonomousDatabase` for reference information about Autonomous Databases with the warehouse workload type.
14    """
15
16    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
17    #: This constant has a value of "PROVISIONING"
18    LIFECYCLE_STATE_PROVISIONING = "PROVISIONING"
19
20    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
21    #: This constant has a value of "AVAILABLE"
22    LIFECYCLE_STATE_AVAILABLE = "AVAILABLE"
23
24    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
25    #: This constant has a value of "STOPPING"
26    LIFECYCLE_STATE_STOPPING = "STOPPING"
27
28    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
29    #: This constant has a value of "STOPPED"
30    LIFECYCLE_STATE_STOPPED = "STOPPED"
31
32    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
33    #: This constant has a value of "STARTING"
34    LIFECYCLE_STATE_STARTING = "STARTING"
35
36    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
37    #: This constant has a value of "TERMINATING"
38    LIFECYCLE_STATE_TERMINATING = "TERMINATING"
39
40    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
41    #: This constant has a value of "TERMINATED"
42    LIFECYCLE_STATE_TERMINATED = "TERMINATED"
43
44    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
45    #: This constant has a value of "UNAVAILABLE"
46    LIFECYCLE_STATE_UNAVAILABLE = "UNAVAILABLE"
47
48    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
49    #: This constant has a value of "RESTORE_IN_PROGRESS"
50    LIFECYCLE_STATE_RESTORE_IN_PROGRESS = "RESTORE_IN_PROGRESS"
51
52    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
53    #: This constant has a value of "BACKUP_IN_PROGRESS"
54    LIFECYCLE_STATE_BACKUP_IN_PROGRESS = "BACKUP_IN_PROGRESS"
55
56    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
57    #: This constant has a value of "SCALE_IN_PROGRESS"
58    LIFECYCLE_STATE_SCALE_IN_PROGRESS = "SCALE_IN_PROGRESS"
59
60    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
61    #: This constant has a value of "AVAILABLE_NEEDS_ATTENTION"
62    LIFECYCLE_STATE_AVAILABLE_NEEDS_ATTENTION = "AVAILABLE_NEEDS_ATTENTION"
63
64    #: A constant which can be used with the lifecycle_state property of a AutonomousDataWarehouse.
65    #: This constant has a value of "UPDATING"
66    LIFECYCLE_STATE_UPDATING = "UPDATING"
67
68    #: A constant which can be used with the license_model property of a AutonomousDataWarehouse.
69    #: This constant has a value of "LICENSE_INCLUDED"
70    LICENSE_MODEL_LICENSE_INCLUDED = "LICENSE_INCLUDED"
71
72    #: A constant which can be used with the license_model property of a AutonomousDataWarehouse.
73    #: This constant has a value of "BRING_YOUR_OWN_LICENSE"
74    LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = "BRING_YOUR_OWN_LICENSE"
75
76    def __init__(self, **kwargs):
77        """
78        Initializes a new AutonomousDataWarehouse object with values from keyword arguments.
79        The following keyword arguments are supported (corresponding to the getters/setters of this class):
80
81        :param id:
82            The value to assign to the id property of this AutonomousDataWarehouse.
83        :type id: str
84
85        :param compartment_id:
86            The value to assign to the compartment_id property of this AutonomousDataWarehouse.
87        :type compartment_id: str
88
89        :param lifecycle_state:
90            The value to assign to the lifecycle_state property of this AutonomousDataWarehouse.
91            Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING"
92        :type lifecycle_state: str
93
94        :param lifecycle_details:
95            The value to assign to the lifecycle_details property of this AutonomousDataWarehouse.
96        :type lifecycle_details: str
97
98        :param db_name:
99            The value to assign to the db_name property of this AutonomousDataWarehouse.
100        :type db_name: str
101
102        :param cpu_core_count:
103            The value to assign to the cpu_core_count property of this AutonomousDataWarehouse.
104        :type cpu_core_count: int
105
106        :param data_storage_size_in_tbs:
107            The value to assign to the data_storage_size_in_tbs property of this AutonomousDataWarehouse.
108        :type data_storage_size_in_tbs: int
109
110        :param time_created:
111            The value to assign to the time_created property of this AutonomousDataWarehouse.
112        :type time_created: datetime
113
114        :param display_name:
115            The value to assign to the display_name property of this AutonomousDataWarehouse.
116        :type display_name: str
117
118        :param service_console_url:
119            The value to assign to the service_console_url property of this AutonomousDataWarehouse.
120        :type service_console_url: str
121
122        :param connection_strings:
123            The value to assign to the connection_strings property of this AutonomousDataWarehouse.
124        :type connection_strings: oci.database.models.AutonomousDataWarehouseConnectionStrings
125
126        :param license_model:
127            The value to assign to the license_model property of this AutonomousDataWarehouse.
128            Allowed values for this property are: "LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"
129        :type license_model: str
130
131        :param freeform_tags:
132            The value to assign to the freeform_tags property of this AutonomousDataWarehouse.
133        :type freeform_tags: dict(str, str)
134
135        :param defined_tags:
136            The value to assign to the defined_tags property of this AutonomousDataWarehouse.
137        :type defined_tags: dict(str, dict(str, object))
138
139        :param db_version:
140            The value to assign to the db_version property of this AutonomousDataWarehouse.
141        :type db_version: str
142
143        """
144        self.swagger_types = {
145            'id': 'str',
146            'compartment_id': 'str',
147            'lifecycle_state': 'str',
148            'lifecycle_details': 'str',
149            'db_name': 'str',
150            'cpu_core_count': 'int',
151            'data_storage_size_in_tbs': 'int',
152            'time_created': 'datetime',
153            'display_name': 'str',
154            'service_console_url': 'str',
155            'connection_strings': 'AutonomousDataWarehouseConnectionStrings',
156            'license_model': 'str',
157            'freeform_tags': 'dict(str, str)',
158            'defined_tags': 'dict(str, dict(str, object))',
159            'db_version': 'str'
160        }
161
162        self.attribute_map = {
163            'id': 'id',
164            'compartment_id': 'compartmentId',
165            'lifecycle_state': 'lifecycleState',
166            'lifecycle_details': 'lifecycleDetails',
167            'db_name': 'dbName',
168            'cpu_core_count': 'cpuCoreCount',
169            'data_storage_size_in_tbs': 'dataStorageSizeInTBs',
170            'time_created': 'timeCreated',
171            'display_name': 'displayName',
172            'service_console_url': 'serviceConsoleUrl',
173            'connection_strings': 'connectionStrings',
174            'license_model': 'licenseModel',
175            'freeform_tags': 'freeformTags',
176            'defined_tags': 'definedTags',
177            'db_version': 'dbVersion'
178        }
179
180        self._id = None
181        self._compartment_id = None
182        self._lifecycle_state = None
183        self._lifecycle_details = None
184        self._db_name = None
185        self._cpu_core_count = None
186        self._data_storage_size_in_tbs = None
187        self._time_created = None
188        self._display_name = None
189        self._service_console_url = None
190        self._connection_strings = None
191        self._license_model = None
192        self._freeform_tags = None
193        self._defined_tags = None
194        self._db_version = None
195
196    @property
197    def id(self):
198        """
199        **[Required]** Gets the id of this AutonomousDataWarehouse.
200        The `OCID`__ of the Autonomous Data Warehouse.
201
202        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
203
204
205        :return: The id of this AutonomousDataWarehouse.
206        :rtype: str
207        """
208        return self._id
209
210    @id.setter
211    def id(self, id):
212        """
213        Sets the id of this AutonomousDataWarehouse.
214        The `OCID`__ of the Autonomous Data Warehouse.
215
216        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
217
218
219        :param id: The id of this AutonomousDataWarehouse.
220        :type: str
221        """
222        self._id = id
223
224    @property
225    def compartment_id(self):
226        """
227        **[Required]** Gets the compartment_id of this AutonomousDataWarehouse.
228        The `OCID`__ of the compartment.
229
230        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
231
232
233        :return: The compartment_id of this AutonomousDataWarehouse.
234        :rtype: str
235        """
236        return self._compartment_id
237
238    @compartment_id.setter
239    def compartment_id(self, compartment_id):
240        """
241        Sets the compartment_id of this AutonomousDataWarehouse.
242        The `OCID`__ of the compartment.
243
244        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
245
246
247        :param compartment_id: The compartment_id of this AutonomousDataWarehouse.
248        :type: str
249        """
250        self._compartment_id = compartment_id
251
252    @property
253    def lifecycle_state(self):
254        """
255        **[Required]** Gets the lifecycle_state of this AutonomousDataWarehouse.
256        The current state of the database.
257
258        Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING"
259
260
261        :return: The lifecycle_state of this AutonomousDataWarehouse.
262        :rtype: str
263        """
264        return self._lifecycle_state
265
266    @lifecycle_state.setter
267    def lifecycle_state(self, lifecycle_state):
268        """
269        Sets the lifecycle_state of this AutonomousDataWarehouse.
270        The current state of the database.
271
272
273        :param lifecycle_state: The lifecycle_state of this AutonomousDataWarehouse.
274        :type: str
275        """
276        allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING"]
277        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
278            raise ValueError(
279                "Invalid value for `lifecycle_state`, must be None or one of {0}"
280                .format(allowed_values)
281            )
282        self._lifecycle_state = lifecycle_state
283
284    @property
285    def lifecycle_details(self):
286        """
287        Gets the lifecycle_details of this AutonomousDataWarehouse.
288        Information about the current lifecycle state.
289
290
291        :return: The lifecycle_details of this AutonomousDataWarehouse.
292        :rtype: str
293        """
294        return self._lifecycle_details
295
296    @lifecycle_details.setter
297    def lifecycle_details(self, lifecycle_details):
298        """
299        Sets the lifecycle_details of this AutonomousDataWarehouse.
300        Information about the current lifecycle state.
301
302
303        :param lifecycle_details: The lifecycle_details of this AutonomousDataWarehouse.
304        :type: str
305        """
306        self._lifecycle_details = lifecycle_details
307
308    @property
309    def db_name(self):
310        """
311        **[Required]** Gets the db_name of this AutonomousDataWarehouse.
312        The database name.
313
314
315        :return: The db_name of this AutonomousDataWarehouse.
316        :rtype: str
317        """
318        return self._db_name
319
320    @db_name.setter
321    def db_name(self, db_name):
322        """
323        Sets the db_name of this AutonomousDataWarehouse.
324        The database name.
325
326
327        :param db_name: The db_name of this AutonomousDataWarehouse.
328        :type: str
329        """
330        self._db_name = db_name
331
332    @property
333    def cpu_core_count(self):
334        """
335        **[Required]** Gets the cpu_core_count of this AutonomousDataWarehouse.
336        The number of CPU cores to be made available to the database.
337
338
339        :return: The cpu_core_count of this AutonomousDataWarehouse.
340        :rtype: int
341        """
342        return self._cpu_core_count
343
344    @cpu_core_count.setter
345    def cpu_core_count(self, cpu_core_count):
346        """
347        Sets the cpu_core_count of this AutonomousDataWarehouse.
348        The number of CPU cores to be made available to the database.
349
350
351        :param cpu_core_count: The cpu_core_count of this AutonomousDataWarehouse.
352        :type: int
353        """
354        self._cpu_core_count = cpu_core_count
355
356    @property
357    def data_storage_size_in_tbs(self):
358        """
359        **[Required]** Gets the data_storage_size_in_tbs of this AutonomousDataWarehouse.
360        The quantity of data in the database, in terabytes.
361
362
363        :return: The data_storage_size_in_tbs of this AutonomousDataWarehouse.
364        :rtype: int
365        """
366        return self._data_storage_size_in_tbs
367
368    @data_storage_size_in_tbs.setter
369    def data_storage_size_in_tbs(self, data_storage_size_in_tbs):
370        """
371        Sets the data_storage_size_in_tbs of this AutonomousDataWarehouse.
372        The quantity of data in the database, in terabytes.
373
374
375        :param data_storage_size_in_tbs: The data_storage_size_in_tbs of this AutonomousDataWarehouse.
376        :type: int
377        """
378        self._data_storage_size_in_tbs = data_storage_size_in_tbs
379
380    @property
381    def time_created(self):
382        """
383        Gets the time_created of this AutonomousDataWarehouse.
384        The date and time the database was created.
385
386
387        :return: The time_created of this AutonomousDataWarehouse.
388        :rtype: datetime
389        """
390        return self._time_created
391
392    @time_created.setter
393    def time_created(self, time_created):
394        """
395        Sets the time_created of this AutonomousDataWarehouse.
396        The date and time the database was created.
397
398
399        :param time_created: The time_created of this AutonomousDataWarehouse.
400        :type: datetime
401        """
402        self._time_created = time_created
403
404    @property
405    def display_name(self):
406        """
407        Gets the display_name of this AutonomousDataWarehouse.
408        The user-friendly name for the Autonomous Data Warehouse. The name does not have to be unique.
409
410
411        :return: The display_name of this AutonomousDataWarehouse.
412        :rtype: str
413        """
414        return self._display_name
415
416    @display_name.setter
417    def display_name(self, display_name):
418        """
419        Sets the display_name of this AutonomousDataWarehouse.
420        The user-friendly name for the Autonomous Data Warehouse. The name does not have to be unique.
421
422
423        :param display_name: The display_name of this AutonomousDataWarehouse.
424        :type: str
425        """
426        self._display_name = display_name
427
428    @property
429    def service_console_url(self):
430        """
431        Gets the service_console_url of this AutonomousDataWarehouse.
432        The URL of the Service Console for the Data Warehouse.
433
434
435        :return: The service_console_url of this AutonomousDataWarehouse.
436        :rtype: str
437        """
438        return self._service_console_url
439
440    @service_console_url.setter
441    def service_console_url(self, service_console_url):
442        """
443        Sets the service_console_url of this AutonomousDataWarehouse.
444        The URL of the Service Console for the Data Warehouse.
445
446
447        :param service_console_url: The service_console_url of this AutonomousDataWarehouse.
448        :type: str
449        """
450        self._service_console_url = service_console_url
451
452    @property
453    def connection_strings(self):
454        """
455        Gets the connection_strings of this AutonomousDataWarehouse.
456        The connection string used to connect to the Data Warehouse. The username for the Service Console is ADMIN. Use the password you entered when creating the Autonomous Data Warehouse for the password value.
457
458
459        :return: The connection_strings of this AutonomousDataWarehouse.
460        :rtype: oci.database.models.AutonomousDataWarehouseConnectionStrings
461        """
462        return self._connection_strings
463
464    @connection_strings.setter
465    def connection_strings(self, connection_strings):
466        """
467        Sets the connection_strings of this AutonomousDataWarehouse.
468        The connection string used to connect to the Data Warehouse. The username for the Service Console is ADMIN. Use the password you entered when creating the Autonomous Data Warehouse for the password value.
469
470
471        :param connection_strings: The connection_strings of this AutonomousDataWarehouse.
472        :type: oci.database.models.AutonomousDataWarehouseConnectionStrings
473        """
474        self._connection_strings = connection_strings
475
476    @property
477    def license_model(self):
478        """
479        Gets the license_model of this AutonomousDataWarehouse.
480        The Oracle license model that applies to the Oracle Autonomous Data Warehouse. The default is BRING_YOUR_OWN_LICENSE.
481
482        Allowed values for this property are: "LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"
483
484
485        :return: The license_model of this AutonomousDataWarehouse.
486        :rtype: str
487        """
488        return self._license_model
489
490    @license_model.setter
491    def license_model(self, license_model):
492        """
493        Sets the license_model of this AutonomousDataWarehouse.
494        The Oracle license model that applies to the Oracle Autonomous Data Warehouse. The default is BRING_YOUR_OWN_LICENSE.
495
496
497        :param license_model: The license_model of this AutonomousDataWarehouse.
498        :type: str
499        """
500        allowed_values = ["LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"]
501        if not value_allowed_none_or_none_sentinel(license_model, allowed_values):
502            raise ValueError(
503                "Invalid value for `license_model`, must be None or one of {0}"
504                .format(allowed_values)
505            )
506        self._license_model = license_model
507
508    @property
509    def freeform_tags(self):
510        """
511        Gets the freeform_tags of this AutonomousDataWarehouse.
512        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
513        For more information, see `Resource Tags`__.
514
515        Example: `{\"Department\": \"Finance\"}`
516
517        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
518
519
520        :return: The freeform_tags of this AutonomousDataWarehouse.
521        :rtype: dict(str, str)
522        """
523        return self._freeform_tags
524
525    @freeform_tags.setter
526    def freeform_tags(self, freeform_tags):
527        """
528        Sets the freeform_tags of this AutonomousDataWarehouse.
529        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
530        For more information, see `Resource Tags`__.
531
532        Example: `{\"Department\": \"Finance\"}`
533
534        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
535
536
537        :param freeform_tags: The freeform_tags of this AutonomousDataWarehouse.
538        :type: dict(str, str)
539        """
540        self._freeform_tags = freeform_tags
541
542    @property
543    def defined_tags(self):
544        """
545        Gets the defined_tags of this AutonomousDataWarehouse.
546        Defined tags for this resource. Each key is predefined and scoped to a namespace.
547        For more information, see `Resource Tags`__.
548
549        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
550
551
552        :return: The defined_tags of this AutonomousDataWarehouse.
553        :rtype: dict(str, dict(str, object))
554        """
555        return self._defined_tags
556
557    @defined_tags.setter
558    def defined_tags(self, defined_tags):
559        """
560        Sets the defined_tags of this AutonomousDataWarehouse.
561        Defined tags for this resource. Each key is predefined and scoped to a namespace.
562        For more information, see `Resource Tags`__.
563
564        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
565
566
567        :param defined_tags: The defined_tags of this AutonomousDataWarehouse.
568        :type: dict(str, dict(str, object))
569        """
570        self._defined_tags = defined_tags
571
572    @property
573    def db_version(self):
574        """
575        Gets the db_version of this AutonomousDataWarehouse.
576        A valid Oracle Database version for Autonomous Data Warehouse.
577
578
579        :return: The db_version of this AutonomousDataWarehouse.
580        :rtype: str
581        """
582        return self._db_version
583
584    @db_version.setter
585    def db_version(self, db_version):
586        """
587        Sets the db_version of this AutonomousDataWarehouse.
588        A valid Oracle Database version for Autonomous Data Warehouse.
589
590
591        :param db_version: The db_version of this AutonomousDataWarehouse.
592        :type: str
593        """
594        self._db_version = db_version
595
596    def __repr__(self):
597        return formatted_flat_dict(self)
598
599    def __eq__(self, other):
600        if other is None:
601            return False
602
603        return self.__dict__ == other.__dict__
604
605    def __ne__(self, other):
606        return not self == other
607