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
5from .resolver_endpoint_summary import ResolverEndpointSummary
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 ResolverVnicEndpointSummary(ResolverEndpointSummary):
12    """
13    An OCI DNS resolver VNIC endpoint.
14
15    **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
16    """
17
18    def __init__(self, **kwargs):
19        """
20        Initializes a new ResolverVnicEndpointSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.dns.models.ResolverVnicEndpointSummary.endpoint_type` attribute
21        of this class is ``VNIC`` and it should not be changed.
22        The following keyword arguments are supported (corresponding to the getters/setters of this class):
23
24        :param name:
25            The value to assign to the name property of this ResolverVnicEndpointSummary.
26        :type name: str
27
28        :param endpoint_type:
29            The value to assign to the endpoint_type property of this ResolverVnicEndpointSummary.
30            Allowed values for this property are: "VNIC"
31        :type endpoint_type: str
32
33        :param forwarding_address:
34            The value to assign to the forwarding_address property of this ResolverVnicEndpointSummary.
35        :type forwarding_address: str
36
37        :param is_forwarding:
38            The value to assign to the is_forwarding property of this ResolverVnicEndpointSummary.
39        :type is_forwarding: bool
40
41        :param is_listening:
42            The value to assign to the is_listening property of this ResolverVnicEndpointSummary.
43        :type is_listening: bool
44
45        :param listening_address:
46            The value to assign to the listening_address property of this ResolverVnicEndpointSummary.
47        :type listening_address: str
48
49        :param compartment_id:
50            The value to assign to the compartment_id property of this ResolverVnicEndpointSummary.
51        :type compartment_id: str
52
53        :param time_created:
54            The value to assign to the time_created property of this ResolverVnicEndpointSummary.
55        :type time_created: datetime
56
57        :param time_updated:
58            The value to assign to the time_updated property of this ResolverVnicEndpointSummary.
59        :type time_updated: datetime
60
61        :param lifecycle_state:
62            The value to assign to the lifecycle_state property of this ResolverVnicEndpointSummary.
63            Allowed values for this property are: "ACTIVE", "CREATING", "DELETED", "DELETING", "FAILED", "UPDATING"
64        :type lifecycle_state: str
65
66        :param _self:
67            The value to assign to the _self property of this ResolverVnicEndpointSummary.
68        :type _self: str
69
70        :param subnet_id:
71            The value to assign to the subnet_id property of this ResolverVnicEndpointSummary.
72        :type subnet_id: str
73
74        """
75        self.swagger_types = {
76            'name': 'str',
77            'endpoint_type': 'str',
78            'forwarding_address': 'str',
79            'is_forwarding': 'bool',
80            'is_listening': 'bool',
81            'listening_address': 'str',
82            'compartment_id': 'str',
83            'time_created': 'datetime',
84            'time_updated': 'datetime',
85            'lifecycle_state': 'str',
86            '_self': 'str',
87            'subnet_id': 'str'
88        }
89
90        self.attribute_map = {
91            'name': 'name',
92            'endpoint_type': 'endpointType',
93            'forwarding_address': 'forwardingAddress',
94            'is_forwarding': 'isForwarding',
95            'is_listening': 'isListening',
96            'listening_address': 'listeningAddress',
97            'compartment_id': 'compartmentId',
98            'time_created': 'timeCreated',
99            'time_updated': 'timeUpdated',
100            'lifecycle_state': 'lifecycleState',
101            '_self': 'self',
102            'subnet_id': 'subnetId'
103        }
104
105        self._name = None
106        self._endpoint_type = None
107        self._forwarding_address = None
108        self._is_forwarding = None
109        self._is_listening = None
110        self._listening_address = None
111        self._compartment_id = None
112        self._time_created = None
113        self._time_updated = None
114        self._lifecycle_state = None
115        self.__self = None
116        self._subnet_id = None
117        self._endpoint_type = 'VNIC'
118
119    @property
120    def subnet_id(self):
121        """
122        **[Required]** Gets the subnet_id of this ResolverVnicEndpointSummary.
123        The OCID of a subnet. Must be part of the VCN that the resolver is attached to.
124
125
126        :return: The subnet_id of this ResolverVnicEndpointSummary.
127        :rtype: str
128        """
129        return self._subnet_id
130
131    @subnet_id.setter
132    def subnet_id(self, subnet_id):
133        """
134        Sets the subnet_id of this ResolverVnicEndpointSummary.
135        The OCID of a subnet. Must be part of the VCN that the resolver is attached to.
136
137
138        :param subnet_id: The subnet_id of this ResolverVnicEndpointSummary.
139        :type: str
140        """
141        self._subnet_id = subnet_id
142
143    def __repr__(self):
144        return formatted_flat_dict(self)
145
146    def __eq__(self, other):
147        if other is None:
148            return False
149
150        return self.__dict__ == other.__dict__
151
152    def __ne__(self, other):
153        return not self == other
154