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 CreateConnectionDetails(object):
12    """
13    Properties used in connection create operations.
14    """
15
16    def __init__(self, **kwargs):
17        """
18        Initializes a new CreateConnectionDetails object with values from keyword arguments.
19        The following keyword arguments are supported (corresponding to the getters/setters of this class):
20
21        :param description:
22            The value to assign to the description property of this CreateConnectionDetails.
23        :type description: str
24
25        :param display_name:
26            The value to assign to the display_name property of this CreateConnectionDetails.
27        :type display_name: str
28
29        :param type_key:
30            The value to assign to the type_key property of this CreateConnectionDetails.
31        :type type_key: str
32
33        :param custom_property_members:
34            The value to assign to the custom_property_members property of this CreateConnectionDetails.
35        :type custom_property_members: list[oci.data_catalog.models.CustomPropertySetUsage]
36
37        :param properties:
38            The value to assign to the properties property of this CreateConnectionDetails.
39        :type properties: dict(str, dict(str, str))
40
41        :param enc_properties:
42            The value to assign to the enc_properties property of this CreateConnectionDetails.
43        :type enc_properties: dict(str, dict(str, str))
44
45        :param is_default:
46            The value to assign to the is_default property of this CreateConnectionDetails.
47        :type is_default: bool
48
49        """
50        self.swagger_types = {
51            'description': 'str',
52            'display_name': 'str',
53            'type_key': 'str',
54            'custom_property_members': 'list[CustomPropertySetUsage]',
55            'properties': 'dict(str, dict(str, str))',
56            'enc_properties': 'dict(str, dict(str, str))',
57            'is_default': 'bool'
58        }
59
60        self.attribute_map = {
61            'description': 'description',
62            'display_name': 'displayName',
63            'type_key': 'typeKey',
64            'custom_property_members': 'customPropertyMembers',
65            'properties': 'properties',
66            'enc_properties': 'encProperties',
67            'is_default': 'isDefault'
68        }
69
70        self._description = None
71        self._display_name = None
72        self._type_key = None
73        self._custom_property_members = None
74        self._properties = None
75        self._enc_properties = None
76        self._is_default = None
77
78    @property
79    def description(self):
80        """
81        Gets the description of this CreateConnectionDetails.
82        A description of the connection.
83
84
85        :return: The description of this CreateConnectionDetails.
86        :rtype: str
87        """
88        return self._description
89
90    @description.setter
91    def description(self, description):
92        """
93        Sets the description of this CreateConnectionDetails.
94        A description of the connection.
95
96
97        :param description: The description of this CreateConnectionDetails.
98        :type: str
99        """
100        self._description = description
101
102    @property
103    def display_name(self):
104        """
105        **[Required]** Gets the display_name of this CreateConnectionDetails.
106        A user-friendly display name. Does not have to be unique, and it's changeable.
107        Avoid entering confidential information.
108
109
110        :return: The display_name of this CreateConnectionDetails.
111        :rtype: str
112        """
113        return self._display_name
114
115    @display_name.setter
116    def display_name(self, display_name):
117        """
118        Sets the display_name of this CreateConnectionDetails.
119        A user-friendly display name. Does not have to be unique, and it's changeable.
120        Avoid entering confidential information.
121
122
123        :param display_name: The display_name of this CreateConnectionDetails.
124        :type: str
125        """
126        self._display_name = display_name
127
128    @property
129    def type_key(self):
130        """
131        **[Required]** Gets the type_key of this CreateConnectionDetails.
132        The key of the object type. Type key's can be found via the '/types' endpoint.
133
134
135        :return: The type_key of this CreateConnectionDetails.
136        :rtype: str
137        """
138        return self._type_key
139
140    @type_key.setter
141    def type_key(self, type_key):
142        """
143        Sets the type_key of this CreateConnectionDetails.
144        The key of the object type. Type key's can be found via the '/types' endpoint.
145
146
147        :param type_key: The type_key of this CreateConnectionDetails.
148        :type: str
149        """
150        self._type_key = type_key
151
152    @property
153    def custom_property_members(self):
154        """
155        Gets the custom_property_members of this CreateConnectionDetails.
156        The list of customized properties along with the values for this object
157
158
159        :return: The custom_property_members of this CreateConnectionDetails.
160        :rtype: list[oci.data_catalog.models.CustomPropertySetUsage]
161        """
162        return self._custom_property_members
163
164    @custom_property_members.setter
165    def custom_property_members(self, custom_property_members):
166        """
167        Sets the custom_property_members of this CreateConnectionDetails.
168        The list of customized properties along with the values for this object
169
170
171        :param custom_property_members: The custom_property_members of this CreateConnectionDetails.
172        :type: list[oci.data_catalog.models.CustomPropertySetUsage]
173        """
174        self._custom_property_members = custom_property_members
175
176    @property
177    def properties(self):
178        """
179        **[Required]** Gets the properties of this CreateConnectionDetails.
180        A map of maps that contains the properties which are specific to the connection type. Each connection type
181        definition defines it's set of required and optional properties. The map keys are category names and the
182        values are maps of property name to property value. Every property is contained inside of a category. Most
183        connections have required properties within the \"default\" category. To determine the set of optional and
184        required properties for a connection type, a query can be done on '/types?type=connection' that returns a
185        collection of all connection types. The appropriate connection type, which will include definitions of all
186        of it's properties, can be identified from this collection.
187        Example: `{\"properties\": { \"default\": { \"username\": \"user1\"}}}`
188
189
190        :return: The properties of this CreateConnectionDetails.
191        :rtype: dict(str, dict(str, str))
192        """
193        return self._properties
194
195    @properties.setter
196    def properties(self, properties):
197        """
198        Sets the properties of this CreateConnectionDetails.
199        A map of maps that contains the properties which are specific to the connection type. Each connection type
200        definition defines it's set of required and optional properties. The map keys are category names and the
201        values are maps of property name to property value. Every property is contained inside of a category. Most
202        connections have required properties within the \"default\" category. To determine the set of optional and
203        required properties for a connection type, a query can be done on '/types?type=connection' that returns a
204        collection of all connection types. The appropriate connection type, which will include definitions of all
205        of it's properties, can be identified from this collection.
206        Example: `{\"properties\": { \"default\": { \"username\": \"user1\"}}}`
207
208
209        :param properties: The properties of this CreateConnectionDetails.
210        :type: dict(str, dict(str, str))
211        """
212        self._properties = properties
213
214    @property
215    def enc_properties(self):
216        """
217        Gets the enc_properties of this CreateConnectionDetails.
218        A map of maps that contains the encrypted values for sensitive properties which are specific to the
219        connection type. Each connection type definition defines it's set of required and optional properties.
220        The map keys are category names and the values are maps of property name to property value. Every property is
221        contained inside of a category. Most connections have required properties within the \"default\" category.
222        To determine the set of optional and required properties for a connection type, a query can be done
223        on '/types?type=connection' that returns a collection of all connection types. The appropriate connection
224        type, which will include definitions of all of it's properties, can be identified from this collection.
225        Example: `{\"encProperties\": { \"default\": { \"password\": \"example-password\"}}}`
226
227
228        :return: The enc_properties of this CreateConnectionDetails.
229        :rtype: dict(str, dict(str, str))
230        """
231        return self._enc_properties
232
233    @enc_properties.setter
234    def enc_properties(self, enc_properties):
235        """
236        Sets the enc_properties of this CreateConnectionDetails.
237        A map of maps that contains the encrypted values for sensitive properties which are specific to the
238        connection type. Each connection type definition defines it's set of required and optional properties.
239        The map keys are category names and the values are maps of property name to property value. Every property is
240        contained inside of a category. Most connections have required properties within the \"default\" category.
241        To determine the set of optional and required properties for a connection type, a query can be done
242        on '/types?type=connection' that returns a collection of all connection types. The appropriate connection
243        type, which will include definitions of all of it's properties, can be identified from this collection.
244        Example: `{\"encProperties\": { \"default\": { \"password\": \"example-password\"}}}`
245
246
247        :param enc_properties: The enc_properties of this CreateConnectionDetails.
248        :type: dict(str, dict(str, str))
249        """
250        self._enc_properties = enc_properties
251
252    @property
253    def is_default(self):
254        """
255        Gets the is_default of this CreateConnectionDetails.
256        Indicates whether this connection is the default connection. The first connection of a data asset defaults
257        to being the default, subsequent connections default to not being the default. If a default connection already
258        exists, then trying to create a connection as the default will fail. In this case the default connection would
259        need to be updated not to be the default and then the new connection can then be created as the default.
260
261
262        :return: The is_default of this CreateConnectionDetails.
263        :rtype: bool
264        """
265        return self._is_default
266
267    @is_default.setter
268    def is_default(self, is_default):
269        """
270        Sets the is_default of this CreateConnectionDetails.
271        Indicates whether this connection is the default connection. The first connection of a data asset defaults
272        to being the default, subsequent connections default to not being the default. If a default connection already
273        exists, then trying to create a connection as the default will fail. In this case the default connection would
274        need to be updated not to be the default and then the new connection can then be created as the default.
275
276
277        :param is_default: The is_default of this CreateConnectionDetails.
278        :type: bool
279        """
280        self._is_default = is_default
281
282    def __repr__(self):
283        return formatted_flat_dict(self)
284
285    def __eq__(self, other):
286        if other is None:
287            return False
288
289        return self.__dict__ == other.__dict__
290
291    def __ne__(self, other):
292        return not self == other
293