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 ConnectionSummary(object):
12    """
13    Summary representation of a connection to a data asset.
14    """
15
16    #: A constant which can be used with the lifecycle_state property of a ConnectionSummary.
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 ConnectionSummary.
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 ConnectionSummary.
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 ConnectionSummary.
29    #: This constant has a value of "UPDATING"
30    LIFECYCLE_STATE_UPDATING = "UPDATING"
31
32    #: A constant which can be used with the lifecycle_state property of a ConnectionSummary.
33    #: This constant has a value of "DELETING"
34    LIFECYCLE_STATE_DELETING = "DELETING"
35
36    #: A constant which can be used with the lifecycle_state property of a ConnectionSummary.
37    #: This constant has a value of "DELETED"
38    LIFECYCLE_STATE_DELETED = "DELETED"
39
40    #: A constant which can be used with the lifecycle_state property of a ConnectionSummary.
41    #: This constant has a value of "FAILED"
42    LIFECYCLE_STATE_FAILED = "FAILED"
43
44    #: A constant which can be used with the lifecycle_state property of a ConnectionSummary.
45    #: This constant has a value of "MOVING"
46    LIFECYCLE_STATE_MOVING = "MOVING"
47
48    def __init__(self, **kwargs):
49        """
50        Initializes a new ConnectionSummary object with values from keyword arguments.
51        The following keyword arguments are supported (corresponding to the getters/setters of this class):
52
53        :param key:
54            The value to assign to the key property of this ConnectionSummary.
55        :type key: str
56
57        :param description:
58            The value to assign to the description property of this ConnectionSummary.
59        :type description: str
60
61        :param display_name:
62            The value to assign to the display_name property of this ConnectionSummary.
63        :type display_name: str
64
65        :param data_asset_key:
66            The value to assign to the data_asset_key property of this ConnectionSummary.
67        :type data_asset_key: str
68
69        :param type_key:
70            The value to assign to the type_key property of this ConnectionSummary.
71        :type type_key: str
72
73        :param uri:
74            The value to assign to the uri property of this ConnectionSummary.
75        :type uri: str
76
77        :param external_key:
78            The value to assign to the external_key property of this ConnectionSummary.
79        :type external_key: str
80
81        :param lifecycle_state:
82            The value to assign to the lifecycle_state property of this ConnectionSummary.
83            Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING", 'UNKNOWN_ENUM_VALUE'.
84            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
85        :type lifecycle_state: str
86
87        :param is_default:
88            The value to assign to the is_default property of this ConnectionSummary.
89        :type is_default: bool
90
91        :param time_created:
92            The value to assign to the time_created property of this ConnectionSummary.
93        :type time_created: datetime
94
95        """
96        self.swagger_types = {
97            'key': 'str',
98            'description': 'str',
99            'display_name': 'str',
100            'data_asset_key': 'str',
101            'type_key': 'str',
102            'uri': 'str',
103            'external_key': 'str',
104            'lifecycle_state': 'str',
105            'is_default': 'bool',
106            'time_created': 'datetime'
107        }
108
109        self.attribute_map = {
110            'key': 'key',
111            'description': 'description',
112            'display_name': 'displayName',
113            'data_asset_key': 'dataAssetKey',
114            'type_key': 'typeKey',
115            'uri': 'uri',
116            'external_key': 'externalKey',
117            'lifecycle_state': 'lifecycleState',
118            'is_default': 'isDefault',
119            'time_created': 'timeCreated'
120        }
121
122        self._key = None
123        self._description = None
124        self._display_name = None
125        self._data_asset_key = None
126        self._type_key = None
127        self._uri = None
128        self._external_key = None
129        self._lifecycle_state = None
130        self._is_default = None
131        self._time_created = None
132
133    @property
134    def key(self):
135        """
136        **[Required]** Gets the key of this ConnectionSummary.
137        Unique connection key that is immutable.
138
139
140        :return: The key of this ConnectionSummary.
141        :rtype: str
142        """
143        return self._key
144
145    @key.setter
146    def key(self, key):
147        """
148        Sets the key of this ConnectionSummary.
149        Unique connection key that is immutable.
150
151
152        :param key: The key of this ConnectionSummary.
153        :type: str
154        """
155        self._key = key
156
157    @property
158    def description(self):
159        """
160        Gets the description of this ConnectionSummary.
161        A description of the connection.
162
163
164        :return: The description of this ConnectionSummary.
165        :rtype: str
166        """
167        return self._description
168
169    @description.setter
170    def description(self, description):
171        """
172        Sets the description of this ConnectionSummary.
173        A description of the connection.
174
175
176        :param description: The description of this ConnectionSummary.
177        :type: str
178        """
179        self._description = description
180
181    @property
182    def display_name(self):
183        """
184        Gets the display_name of this ConnectionSummary.
185        A user-friendly display name. Does not have to be unique, and it's changeable.
186        Avoid entering confidential information.
187
188
189        :return: The display_name of this ConnectionSummary.
190        :rtype: str
191        """
192        return self._display_name
193
194    @display_name.setter
195    def display_name(self, display_name):
196        """
197        Sets the display_name of this ConnectionSummary.
198        A user-friendly display name. Does not have to be unique, and it's changeable.
199        Avoid entering confidential information.
200
201
202        :param display_name: The display_name of this ConnectionSummary.
203        :type: str
204        """
205        self._display_name = display_name
206
207    @property
208    def data_asset_key(self):
209        """
210        Gets the data_asset_key of this ConnectionSummary.
211        The unique key of the parent data asset.
212
213
214        :return: The data_asset_key of this ConnectionSummary.
215        :rtype: str
216        """
217        return self._data_asset_key
218
219    @data_asset_key.setter
220    def data_asset_key(self, data_asset_key):
221        """
222        Sets the data_asset_key of this ConnectionSummary.
223        The unique key of the parent data asset.
224
225
226        :param data_asset_key: The data_asset_key of this ConnectionSummary.
227        :type: str
228        """
229        self._data_asset_key = data_asset_key
230
231    @property
232    def type_key(self):
233        """
234        Gets the type_key of this ConnectionSummary.
235        The key of the object type. Type key's can be found via the '/types' endpoint.
236
237
238        :return: The type_key of this ConnectionSummary.
239        :rtype: str
240        """
241        return self._type_key
242
243    @type_key.setter
244    def type_key(self, type_key):
245        """
246        Sets the type_key of this ConnectionSummary.
247        The key of the object type. Type key's can be found via the '/types' endpoint.
248
249
250        :param type_key: The type_key of this ConnectionSummary.
251        :type: str
252        """
253        self._type_key = type_key
254
255    @property
256    def uri(self):
257        """
258        Gets the uri of this ConnectionSummary.
259        URI to the connection instance in the API.
260
261
262        :return: The uri of this ConnectionSummary.
263        :rtype: str
264        """
265        return self._uri
266
267    @uri.setter
268    def uri(self, uri):
269        """
270        Sets the uri of this ConnectionSummary.
271        URI to the connection instance in the API.
272
273
274        :param uri: The uri of this ConnectionSummary.
275        :type: str
276        """
277        self._uri = uri
278
279    @property
280    def external_key(self):
281        """
282        Gets the external_key of this ConnectionSummary.
283        Unique external key for this object as defined in the source systems.
284
285
286        :return: The external_key of this ConnectionSummary.
287        :rtype: str
288        """
289        return self._external_key
290
291    @external_key.setter
292    def external_key(self, external_key):
293        """
294        Sets the external_key of this ConnectionSummary.
295        Unique external key for this object as defined in the source systems.
296
297
298        :param external_key: The external_key of this ConnectionSummary.
299        :type: str
300        """
301        self._external_key = external_key
302
303    @property
304    def lifecycle_state(self):
305        """
306        Gets the lifecycle_state of this ConnectionSummary.
307        The current state of the connection.
308
309        Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING", 'UNKNOWN_ENUM_VALUE'.
310        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
311
312
313        :return: The lifecycle_state of this ConnectionSummary.
314        :rtype: str
315        """
316        return self._lifecycle_state
317
318    @lifecycle_state.setter
319    def lifecycle_state(self, lifecycle_state):
320        """
321        Sets the lifecycle_state of this ConnectionSummary.
322        The current state of the connection.
323
324
325        :param lifecycle_state: The lifecycle_state of this ConnectionSummary.
326        :type: str
327        """
328        allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "MOVING"]
329        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
330            lifecycle_state = 'UNKNOWN_ENUM_VALUE'
331        self._lifecycle_state = lifecycle_state
332
333    @property
334    def is_default(self):
335        """
336        Gets the is_default of this ConnectionSummary.
337        Indicates whether this connection is the default connection.
338
339
340        :return: The is_default of this ConnectionSummary.
341        :rtype: bool
342        """
343        return self._is_default
344
345    @is_default.setter
346    def is_default(self, is_default):
347        """
348        Sets the is_default of this ConnectionSummary.
349        Indicates whether this connection is the default connection.
350
351
352        :param is_default: The is_default of this ConnectionSummary.
353        :type: bool
354        """
355        self._is_default = is_default
356
357    @property
358    def time_created(self):
359        """
360        Gets the time_created of this ConnectionSummary.
361        The date and time the connection was created, in the format defined by `RFC3339`__.
362        Example: `2019-03-25T21:10:29.600Z`
363
364        __ https://tools.ietf.org/html/rfc3339
365
366
367        :return: The time_created of this ConnectionSummary.
368        :rtype: datetime
369        """
370        return self._time_created
371
372    @time_created.setter
373    def time_created(self, time_created):
374        """
375        Sets the time_created of this ConnectionSummary.
376        The date and time the connection was created, in the format defined by `RFC3339`__.
377        Example: `2019-03-25T21:10:29.600Z`
378
379        __ https://tools.ietf.org/html/rfc3339
380
381
382        :param time_created: The time_created of this ConnectionSummary.
383        :type: datetime
384        """
385        self._time_created = time_created
386
387    def __repr__(self):
388        return formatted_flat_dict(self)
389
390    def __eq__(self, other):
391        if other is None:
392            return False
393
394        return self.__dict__ == other.__dict__
395
396    def __ne__(self, other):
397        return not self == other
398