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 VcnDnsResolverAssociation(object):
12    """
13    The information about the VCN and the DNS resolver in the association.
14    """
15
16    #: A constant which can be used with the lifecycle_state property of a VcnDnsResolverAssociation.
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 VcnDnsResolverAssociation.
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 VcnDnsResolverAssociation.
25    #: This constant has a value of "TERMINATING"
26    LIFECYCLE_STATE_TERMINATING = "TERMINATING"
27
28    #: A constant which can be used with the lifecycle_state property of a VcnDnsResolverAssociation.
29    #: This constant has a value of "TERMINATED"
30    LIFECYCLE_STATE_TERMINATED = "TERMINATED"
31
32    def __init__(self, **kwargs):
33        """
34        Initializes a new VcnDnsResolverAssociation object with values from keyword arguments.
35        The following keyword arguments are supported (corresponding to the getters/setters of this class):
36
37        :param vcn_id:
38            The value to assign to the vcn_id property of this VcnDnsResolverAssociation.
39        :type vcn_id: str
40
41        :param dns_resolver_id:
42            The value to assign to the dns_resolver_id property of this VcnDnsResolverAssociation.
43        :type dns_resolver_id: str
44
45        :param lifecycle_state:
46            The value to assign to the lifecycle_state property of this VcnDnsResolverAssociation.
47            Allowed values for this property are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED", 'UNKNOWN_ENUM_VALUE'.
48            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
49        :type lifecycle_state: str
50
51        """
52        self.swagger_types = {
53            'vcn_id': 'str',
54            'dns_resolver_id': 'str',
55            'lifecycle_state': 'str'
56        }
57
58        self.attribute_map = {
59            'vcn_id': 'vcnId',
60            'dns_resolver_id': 'dnsResolverId',
61            'lifecycle_state': 'lifecycleState'
62        }
63
64        self._vcn_id = None
65        self._dns_resolver_id = None
66        self._lifecycle_state = None
67
68    @property
69    def vcn_id(self):
70        """
71        **[Required]** Gets the vcn_id of this VcnDnsResolverAssociation.
72        The `OCID`__ of the VCN in the association.
73
74        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
75
76
77        :return: The vcn_id of this VcnDnsResolverAssociation.
78        :rtype: str
79        """
80        return self._vcn_id
81
82    @vcn_id.setter
83    def vcn_id(self, vcn_id):
84        """
85        Sets the vcn_id of this VcnDnsResolverAssociation.
86        The `OCID`__ of the VCN in the association.
87
88        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
89
90
91        :param vcn_id: The vcn_id of this VcnDnsResolverAssociation.
92        :type: str
93        """
94        self._vcn_id = vcn_id
95
96    @property
97    def dns_resolver_id(self):
98        """
99        Gets the dns_resolver_id of this VcnDnsResolverAssociation.
100        The `OCID`__ of the DNS resolver in the association.
101
102        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
103
104
105        :return: The dns_resolver_id of this VcnDnsResolverAssociation.
106        :rtype: str
107        """
108        return self._dns_resolver_id
109
110    @dns_resolver_id.setter
111    def dns_resolver_id(self, dns_resolver_id):
112        """
113        Sets the dns_resolver_id of this VcnDnsResolverAssociation.
114        The `OCID`__ of the DNS resolver in the association.
115
116        __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
117
118
119        :param dns_resolver_id: The dns_resolver_id of this VcnDnsResolverAssociation.
120        :type: str
121        """
122        self._dns_resolver_id = dns_resolver_id
123
124    @property
125    def lifecycle_state(self):
126        """
127        **[Required]** Gets the lifecycle_state of this VcnDnsResolverAssociation.
128        The current state of the association.
129
130        Allowed values for this property are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED", 'UNKNOWN_ENUM_VALUE'.
131        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
132
133
134        :return: The lifecycle_state of this VcnDnsResolverAssociation.
135        :rtype: str
136        """
137        return self._lifecycle_state
138
139    @lifecycle_state.setter
140    def lifecycle_state(self, lifecycle_state):
141        """
142        Sets the lifecycle_state of this VcnDnsResolverAssociation.
143        The current state of the association.
144
145
146        :param lifecycle_state: The lifecycle_state of this VcnDnsResolverAssociation.
147        :type: str
148        """
149        allowed_values = ["PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED"]
150        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
151            lifecycle_state = 'UNKNOWN_ENUM_VALUE'
152        self._lifecycle_state = lifecycle_state
153
154    def __repr__(self):
155        return formatted_flat_dict(self)
156
157    def __eq__(self, other):
158        if other is None:
159            return False
160
161        return self.__dict__ == other.__dict__
162
163    def __ne__(self, other):
164        return not self == other
165