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 AnalyticsClusterNode(object):
12    """
13    DEPRECATED -- please use HeatWave API instead.
14    An Analytics Cluster Node is a compute host that is part of an Analytics Cluster.
15    """
16
17    #: A constant which can be used with the lifecycle_state property of a AnalyticsClusterNode.
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 AnalyticsClusterNode.
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 AnalyticsClusterNode.
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 AnalyticsClusterNode.
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 AnalyticsClusterNode.
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 AnalyticsClusterNode.
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 AnalyticsClusterNode.
42    #: This constant has a value of "FAILED"
43    LIFECYCLE_STATE_FAILED = "FAILED"
44
45    def __init__(self, **kwargs):
46        """
47        Initializes a new AnalyticsClusterNode object with values from keyword arguments.
48        The following keyword arguments are supported (corresponding to the getters/setters of this class):
49
50        :param node_id:
51            The value to assign to the node_id property of this AnalyticsClusterNode.
52        :type node_id: str
53
54        :param lifecycle_state:
55            The value to assign to the lifecycle_state property of this AnalyticsClusterNode.
56            Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
57            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
58        :type lifecycle_state: str
59
60        :param time_created:
61            The value to assign to the time_created property of this AnalyticsClusterNode.
62        :type time_created: datetime
63
64        :param time_updated:
65            The value to assign to the time_updated property of this AnalyticsClusterNode.
66        :type time_updated: datetime
67
68        """
69        self.swagger_types = {
70            'node_id': 'str',
71            'lifecycle_state': 'str',
72            'time_created': 'datetime',
73            'time_updated': 'datetime'
74        }
75
76        self.attribute_map = {
77            'node_id': 'nodeId',
78            'lifecycle_state': 'lifecycleState',
79            'time_created': 'timeCreated',
80            'time_updated': 'timeUpdated'
81        }
82
83        self._node_id = None
84        self._lifecycle_state = None
85        self._time_created = None
86        self._time_updated = None
87
88    @property
89    def node_id(self):
90        """
91        **[Required]** Gets the node_id of this AnalyticsClusterNode.
92        The ID of the node within MySQL Analytics Cluster.
93
94
95        :return: The node_id of this AnalyticsClusterNode.
96        :rtype: str
97        """
98        return self._node_id
99
100    @node_id.setter
101    def node_id(self, node_id):
102        """
103        Sets the node_id of this AnalyticsClusterNode.
104        The ID of the node within MySQL Analytics Cluster.
105
106
107        :param node_id: The node_id of this AnalyticsClusterNode.
108        :type: str
109        """
110        self._node_id = node_id
111
112    @property
113    def lifecycle_state(self):
114        """
115        **[Required]** Gets the lifecycle_state of this AnalyticsClusterNode.
116        The current state of the MySQL Analytics Cluster node.
117
118        Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
119        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
120
121
122        :return: The lifecycle_state of this AnalyticsClusterNode.
123        :rtype: str
124        """
125        return self._lifecycle_state
126
127    @lifecycle_state.setter
128    def lifecycle_state(self, lifecycle_state):
129        """
130        Sets the lifecycle_state of this AnalyticsClusterNode.
131        The current state of the MySQL Analytics Cluster node.
132
133
134        :param lifecycle_state: The lifecycle_state of this AnalyticsClusterNode.
135        :type: str
136        """
137        allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
138        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
139            lifecycle_state = 'UNKNOWN_ENUM_VALUE'
140        self._lifecycle_state = lifecycle_state
141
142    @property
143    def time_created(self):
144        """
145        Gets the time_created of this AnalyticsClusterNode.
146        The date and time the MySQL Analytics Cluster node was created, as described by `RFC 3339`__.
147
148        __ https://tools.ietf.org/rfc/rfc3339
149
150
151        :return: The time_created of this AnalyticsClusterNode.
152        :rtype: datetime
153        """
154        return self._time_created
155
156    @time_created.setter
157    def time_created(self, time_created):
158        """
159        Sets the time_created of this AnalyticsClusterNode.
160        The date and time the MySQL Analytics Cluster node was created, as described by `RFC 3339`__.
161
162        __ https://tools.ietf.org/rfc/rfc3339
163
164
165        :param time_created: The time_created of this AnalyticsClusterNode.
166        :type: datetime
167        """
168        self._time_created = time_created
169
170    @property
171    def time_updated(self):
172        """
173        Gets the time_updated of this AnalyticsClusterNode.
174        The date and time the MySQL Analytics Cluster node was updated, as described by `RFC 3339`__.
175
176        __ https://tools.ietf.org/rfc/rfc3339
177
178
179        :return: The time_updated of this AnalyticsClusterNode.
180        :rtype: datetime
181        """
182        return self._time_updated
183
184    @time_updated.setter
185    def time_updated(self, time_updated):
186        """
187        Sets the time_updated of this AnalyticsClusterNode.
188        The date and time the MySQL Analytics Cluster node was updated, as described by `RFC 3339`__.
189
190        __ https://tools.ietf.org/rfc/rfc3339
191
192
193        :param time_updated: The time_updated of this AnalyticsClusterNode.
194        :type: datetime
195        """
196        self._time_updated = time_updated
197
198    def __repr__(self):
199        return formatted_flat_dict(self)
200
201    def __eq__(self, other):
202        if other is None:
203            return False
204
205        return self.__dict__ == other.__dict__
206
207    def __ne__(self, other):
208        return not self == other
209