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 CreateIPSecConnectionTunnelDetails(object):
12    """
13    CreateIPSecConnectionTunnelDetails model.
14    """
15
16    #: A constant which can be used with the routing property of a CreateIPSecConnectionTunnelDetails.
17    #: This constant has a value of "BGP"
18    ROUTING_BGP = "BGP"
19
20    #: A constant which can be used with the routing property of a CreateIPSecConnectionTunnelDetails.
21    #: This constant has a value of "STATIC"
22    ROUTING_STATIC = "STATIC"
23
24    #: A constant which can be used with the routing property of a CreateIPSecConnectionTunnelDetails.
25    #: This constant has a value of "POLICY"
26    ROUTING_POLICY = "POLICY"
27
28    #: A constant which can be used with the ike_version property of a CreateIPSecConnectionTunnelDetails.
29    #: This constant has a value of "V1"
30    IKE_VERSION_V1 = "V1"
31
32    #: A constant which can be used with the ike_version property of a CreateIPSecConnectionTunnelDetails.
33    #: This constant has a value of "V2"
34    IKE_VERSION_V2 = "V2"
35
36    #: A constant which can be used with the oracle_initiation property of a CreateIPSecConnectionTunnelDetails.
37    #: This constant has a value of "INITIATOR_OR_RESPONDER"
38    ORACLE_INITIATION_INITIATOR_OR_RESPONDER = "INITIATOR_OR_RESPONDER"
39
40    #: A constant which can be used with the oracle_initiation property of a CreateIPSecConnectionTunnelDetails.
41    #: This constant has a value of "RESPONDER_ONLY"
42    ORACLE_INITIATION_RESPONDER_ONLY = "RESPONDER_ONLY"
43
44    #: A constant which can be used with the nat_translation_enabled property of a CreateIPSecConnectionTunnelDetails.
45    #: This constant has a value of "ENABLED"
46    NAT_TRANSLATION_ENABLED_ENABLED = "ENABLED"
47
48    #: A constant which can be used with the nat_translation_enabled property of a CreateIPSecConnectionTunnelDetails.
49    #: This constant has a value of "DISABLED"
50    NAT_TRANSLATION_ENABLED_DISABLED = "DISABLED"
51
52    #: A constant which can be used with the nat_translation_enabled property of a CreateIPSecConnectionTunnelDetails.
53    #: This constant has a value of "AUTO"
54    NAT_TRANSLATION_ENABLED_AUTO = "AUTO"
55
56    def __init__(self, **kwargs):
57        """
58        Initializes a new CreateIPSecConnectionTunnelDetails object with values from keyword arguments.
59        The following keyword arguments are supported (corresponding to the getters/setters of this class):
60
61        :param display_name:
62            The value to assign to the display_name property of this CreateIPSecConnectionTunnelDetails.
63        :type display_name: str
64
65        :param routing:
66            The value to assign to the routing property of this CreateIPSecConnectionTunnelDetails.
67            Allowed values for this property are: "BGP", "STATIC", "POLICY"
68        :type routing: str
69
70        :param ike_version:
71            The value to assign to the ike_version property of this CreateIPSecConnectionTunnelDetails.
72            Allowed values for this property are: "V1", "V2"
73        :type ike_version: str
74
75        :param shared_secret:
76            The value to assign to the shared_secret property of this CreateIPSecConnectionTunnelDetails.
77        :type shared_secret: str
78
79        :param bgp_session_config:
80            The value to assign to the bgp_session_config property of this CreateIPSecConnectionTunnelDetails.
81        :type bgp_session_config: oci.core.models.CreateIPSecTunnelBgpSessionDetails
82
83        :param oracle_initiation:
84            The value to assign to the oracle_initiation property of this CreateIPSecConnectionTunnelDetails.
85            Allowed values for this property are: "INITIATOR_OR_RESPONDER", "RESPONDER_ONLY"
86        :type oracle_initiation: str
87
88        :param nat_translation_enabled:
89            The value to assign to the nat_translation_enabled property of this CreateIPSecConnectionTunnelDetails.
90            Allowed values for this property are: "ENABLED", "DISABLED", "AUTO"
91        :type nat_translation_enabled: str
92
93        :param phase_one_config:
94            The value to assign to the phase_one_config property of this CreateIPSecConnectionTunnelDetails.
95        :type phase_one_config: oci.core.models.PhaseOneConfigDetails
96
97        :param phase_two_config:
98            The value to assign to the phase_two_config property of this CreateIPSecConnectionTunnelDetails.
99        :type phase_two_config: oci.core.models.PhaseTwoConfigDetails
100
101        :param dpd_config:
102            The value to assign to the dpd_config property of this CreateIPSecConnectionTunnelDetails.
103        :type dpd_config: oci.core.models.DpdConfig
104
105        :param encryption_domain_config:
106            The value to assign to the encryption_domain_config property of this CreateIPSecConnectionTunnelDetails.
107        :type encryption_domain_config: oci.core.models.CreateIPSecTunnelEncryptionDomainDetails
108
109        """
110        self.swagger_types = {
111            'display_name': 'str',
112            'routing': 'str',
113            'ike_version': 'str',
114            'shared_secret': 'str',
115            'bgp_session_config': 'CreateIPSecTunnelBgpSessionDetails',
116            'oracle_initiation': 'str',
117            'nat_translation_enabled': 'str',
118            'phase_one_config': 'PhaseOneConfigDetails',
119            'phase_two_config': 'PhaseTwoConfigDetails',
120            'dpd_config': 'DpdConfig',
121            'encryption_domain_config': 'CreateIPSecTunnelEncryptionDomainDetails'
122        }
123
124        self.attribute_map = {
125            'display_name': 'displayName',
126            'routing': 'routing',
127            'ike_version': 'ikeVersion',
128            'shared_secret': 'sharedSecret',
129            'bgp_session_config': 'bgpSessionConfig',
130            'oracle_initiation': 'oracleInitiation',
131            'nat_translation_enabled': 'natTranslationEnabled',
132            'phase_one_config': 'phaseOneConfig',
133            'phase_two_config': 'phaseTwoConfig',
134            'dpd_config': 'dpdConfig',
135            'encryption_domain_config': 'encryptionDomainConfig'
136        }
137
138        self._display_name = None
139        self._routing = None
140        self._ike_version = None
141        self._shared_secret = None
142        self._bgp_session_config = None
143        self._oracle_initiation = None
144        self._nat_translation_enabled = None
145        self._phase_one_config = None
146        self._phase_two_config = None
147        self._dpd_config = None
148        self._encryption_domain_config = None
149
150    @property
151    def display_name(self):
152        """
153        Gets the display_name of this CreateIPSecConnectionTunnelDetails.
154        A user-friendly name. Does not have to be unique, and it's changeable.
155        Avoid entering confidential information.
156
157
158        :return: The display_name of this CreateIPSecConnectionTunnelDetails.
159        :rtype: str
160        """
161        return self._display_name
162
163    @display_name.setter
164    def display_name(self, display_name):
165        """
166        Sets the display_name of this CreateIPSecConnectionTunnelDetails.
167        A user-friendly name. Does not have to be unique, and it's changeable.
168        Avoid entering confidential information.
169
170
171        :param display_name: The display_name of this CreateIPSecConnectionTunnelDetails.
172        :type: str
173        """
174        self._display_name = display_name
175
176    @property
177    def routing(self):
178        """
179        Gets the routing of this CreateIPSecConnectionTunnelDetails.
180        The type of routing to use for this tunnel (either BGP dynamic routing or static routing).
181
182        Allowed values for this property are: "BGP", "STATIC", "POLICY"
183
184
185        :return: The routing of this CreateIPSecConnectionTunnelDetails.
186        :rtype: str
187        """
188        return self._routing
189
190    @routing.setter
191    def routing(self, routing):
192        """
193        Sets the routing of this CreateIPSecConnectionTunnelDetails.
194        The type of routing to use for this tunnel (either BGP dynamic routing or static routing).
195
196
197        :param routing: The routing of this CreateIPSecConnectionTunnelDetails.
198        :type: str
199        """
200        allowed_values = ["BGP", "STATIC", "POLICY"]
201        if not value_allowed_none_or_none_sentinel(routing, allowed_values):
202            raise ValueError(
203                "Invalid value for `routing`, must be None or one of {0}"
204                .format(allowed_values)
205            )
206        self._routing = routing
207
208    @property
209    def ike_version(self):
210        """
211        Gets the ike_version of this CreateIPSecConnectionTunnelDetails.
212        Internet Key Exchange protocol version.
213
214        Allowed values for this property are: "V1", "V2"
215
216
217        :return: The ike_version of this CreateIPSecConnectionTunnelDetails.
218        :rtype: str
219        """
220        return self._ike_version
221
222    @ike_version.setter
223    def ike_version(self, ike_version):
224        """
225        Sets the ike_version of this CreateIPSecConnectionTunnelDetails.
226        Internet Key Exchange protocol version.
227
228
229        :param ike_version: The ike_version of this CreateIPSecConnectionTunnelDetails.
230        :type: str
231        """
232        allowed_values = ["V1", "V2"]
233        if not value_allowed_none_or_none_sentinel(ike_version, allowed_values):
234            raise ValueError(
235                "Invalid value for `ike_version`, must be None or one of {0}"
236                .format(allowed_values)
237            )
238        self._ike_version = ike_version
239
240    @property
241    def shared_secret(self):
242        """
243        Gets the shared_secret of this CreateIPSecConnectionTunnelDetails.
244        The shared secret (pre-shared key) to use for the IPSec tunnel. Only numbers, letters, and
245        spaces are allowed. If you don't provide a value,
246        Oracle generates a value for you. You can specify your own shared secret later if
247        you like with :func:`update_ip_sec_connection_tunnel_shared_secret`.
248
249
250        :return: The shared_secret of this CreateIPSecConnectionTunnelDetails.
251        :rtype: str
252        """
253        return self._shared_secret
254
255    @shared_secret.setter
256    def shared_secret(self, shared_secret):
257        """
258        Sets the shared_secret of this CreateIPSecConnectionTunnelDetails.
259        The shared secret (pre-shared key) to use for the IPSec tunnel. Only numbers, letters, and
260        spaces are allowed. If you don't provide a value,
261        Oracle generates a value for you. You can specify your own shared secret later if
262        you like with :func:`update_ip_sec_connection_tunnel_shared_secret`.
263
264
265        :param shared_secret: The shared_secret of this CreateIPSecConnectionTunnelDetails.
266        :type: str
267        """
268        self._shared_secret = shared_secret
269
270    @property
271    def bgp_session_config(self):
272        """
273        Gets the bgp_session_config of this CreateIPSecConnectionTunnelDetails.
274
275        :return: The bgp_session_config of this CreateIPSecConnectionTunnelDetails.
276        :rtype: oci.core.models.CreateIPSecTunnelBgpSessionDetails
277        """
278        return self._bgp_session_config
279
280    @bgp_session_config.setter
281    def bgp_session_config(self, bgp_session_config):
282        """
283        Sets the bgp_session_config of this CreateIPSecConnectionTunnelDetails.
284
285        :param bgp_session_config: The bgp_session_config of this CreateIPSecConnectionTunnelDetails.
286        :type: oci.core.models.CreateIPSecTunnelBgpSessionDetails
287        """
288        self._bgp_session_config = bgp_session_config
289
290    @property
291    def oracle_initiation(self):
292        """
293        Gets the oracle_initiation of this CreateIPSecConnectionTunnelDetails.
294        Whether Oracle side is the initiator for negotiation.
295
296        Allowed values for this property are: "INITIATOR_OR_RESPONDER", "RESPONDER_ONLY"
297
298
299        :return: The oracle_initiation of this CreateIPSecConnectionTunnelDetails.
300        :rtype: str
301        """
302        return self._oracle_initiation
303
304    @oracle_initiation.setter
305    def oracle_initiation(self, oracle_initiation):
306        """
307        Sets the oracle_initiation of this CreateIPSecConnectionTunnelDetails.
308        Whether Oracle side is the initiator for negotiation.
309
310
311        :param oracle_initiation: The oracle_initiation of this CreateIPSecConnectionTunnelDetails.
312        :type: str
313        """
314        allowed_values = ["INITIATOR_OR_RESPONDER", "RESPONDER_ONLY"]
315        if not value_allowed_none_or_none_sentinel(oracle_initiation, allowed_values):
316            raise ValueError(
317                "Invalid value for `oracle_initiation`, must be None or one of {0}"
318                .format(allowed_values)
319            )
320        self._oracle_initiation = oracle_initiation
321
322    @property
323    def nat_translation_enabled(self):
324        """
325        Gets the nat_translation_enabled of this CreateIPSecConnectionTunnelDetails.
326        Whether NAT-T Enabled on the tunnel
327
328        Allowed values for this property are: "ENABLED", "DISABLED", "AUTO"
329
330
331        :return: The nat_translation_enabled of this CreateIPSecConnectionTunnelDetails.
332        :rtype: str
333        """
334        return self._nat_translation_enabled
335
336    @nat_translation_enabled.setter
337    def nat_translation_enabled(self, nat_translation_enabled):
338        """
339        Sets the nat_translation_enabled of this CreateIPSecConnectionTunnelDetails.
340        Whether NAT-T Enabled on the tunnel
341
342
343        :param nat_translation_enabled: The nat_translation_enabled of this CreateIPSecConnectionTunnelDetails.
344        :type: str
345        """
346        allowed_values = ["ENABLED", "DISABLED", "AUTO"]
347        if not value_allowed_none_or_none_sentinel(nat_translation_enabled, allowed_values):
348            raise ValueError(
349                "Invalid value for `nat_translation_enabled`, must be None or one of {0}"
350                .format(allowed_values)
351            )
352        self._nat_translation_enabled = nat_translation_enabled
353
354    @property
355    def phase_one_config(self):
356        """
357        Gets the phase_one_config of this CreateIPSecConnectionTunnelDetails.
358
359        :return: The phase_one_config of this CreateIPSecConnectionTunnelDetails.
360        :rtype: oci.core.models.PhaseOneConfigDetails
361        """
362        return self._phase_one_config
363
364    @phase_one_config.setter
365    def phase_one_config(self, phase_one_config):
366        """
367        Sets the phase_one_config of this CreateIPSecConnectionTunnelDetails.
368
369        :param phase_one_config: The phase_one_config of this CreateIPSecConnectionTunnelDetails.
370        :type: oci.core.models.PhaseOneConfigDetails
371        """
372        self._phase_one_config = phase_one_config
373
374    @property
375    def phase_two_config(self):
376        """
377        Gets the phase_two_config of this CreateIPSecConnectionTunnelDetails.
378
379        :return: The phase_two_config of this CreateIPSecConnectionTunnelDetails.
380        :rtype: oci.core.models.PhaseTwoConfigDetails
381        """
382        return self._phase_two_config
383
384    @phase_two_config.setter
385    def phase_two_config(self, phase_two_config):
386        """
387        Sets the phase_two_config of this CreateIPSecConnectionTunnelDetails.
388
389        :param phase_two_config: The phase_two_config of this CreateIPSecConnectionTunnelDetails.
390        :type: oci.core.models.PhaseTwoConfigDetails
391        """
392        self._phase_two_config = phase_two_config
393
394    @property
395    def dpd_config(self):
396        """
397        Gets the dpd_config of this CreateIPSecConnectionTunnelDetails.
398
399        :return: The dpd_config of this CreateIPSecConnectionTunnelDetails.
400        :rtype: oci.core.models.DpdConfig
401        """
402        return self._dpd_config
403
404    @dpd_config.setter
405    def dpd_config(self, dpd_config):
406        """
407        Sets the dpd_config of this CreateIPSecConnectionTunnelDetails.
408
409        :param dpd_config: The dpd_config of this CreateIPSecConnectionTunnelDetails.
410        :type: oci.core.models.DpdConfig
411        """
412        self._dpd_config = dpd_config
413
414    @property
415    def encryption_domain_config(self):
416        """
417        Gets the encryption_domain_config of this CreateIPSecConnectionTunnelDetails.
418
419        :return: The encryption_domain_config of this CreateIPSecConnectionTunnelDetails.
420        :rtype: oci.core.models.CreateIPSecTunnelEncryptionDomainDetails
421        """
422        return self._encryption_domain_config
423
424    @encryption_domain_config.setter
425    def encryption_domain_config(self, encryption_domain_config):
426        """
427        Sets the encryption_domain_config of this CreateIPSecConnectionTunnelDetails.
428
429        :param encryption_domain_config: The encryption_domain_config of this CreateIPSecConnectionTunnelDetails.
430        :type: oci.core.models.CreateIPSecTunnelEncryptionDomainDetails
431        """
432        self._encryption_domain_config = encryption_domain_config
433
434    def __repr__(self):
435        return formatted_flat_dict(self)
436
437    def __eq__(self, other):
438        if other is None:
439            return False
440
441        return self.__dict__ == other.__dict__
442
443    def __ne__(self, other):
444        return not self == other
445