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 View(object):
12    """
13    An OCI DNS view.
14
15    **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
16    """
17
18    #: A constant which can be used with the lifecycle_state property of a View.
19    #: This constant has a value of "ACTIVE"
20    LIFECYCLE_STATE_ACTIVE = "ACTIVE"
21
22    #: A constant which can be used with the lifecycle_state property of a View.
23    #: This constant has a value of "DELETED"
24    LIFECYCLE_STATE_DELETED = "DELETED"
25
26    #: A constant which can be used with the lifecycle_state property of a View.
27    #: This constant has a value of "DELETING"
28    LIFECYCLE_STATE_DELETING = "DELETING"
29
30    #: A constant which can be used with the lifecycle_state property of a View.
31    #: This constant has a value of "UPDATING"
32    LIFECYCLE_STATE_UPDATING = "UPDATING"
33
34    def __init__(self, **kwargs):
35        """
36        Initializes a new View object with values from keyword arguments.
37        The following keyword arguments are supported (corresponding to the getters/setters of this class):
38
39        :param compartment_id:
40            The value to assign to the compartment_id property of this View.
41        :type compartment_id: str
42
43        :param display_name:
44            The value to assign to the display_name property of this View.
45        :type display_name: str
46
47        :param freeform_tags:
48            The value to assign to the freeform_tags property of this View.
49        :type freeform_tags: dict(str, str)
50
51        :param defined_tags:
52            The value to assign to the defined_tags property of this View.
53        :type defined_tags: dict(str, dict(str, object))
54
55        :param id:
56            The value to assign to the id property of this View.
57        :type id: str
58
59        :param _self:
60            The value to assign to the _self property of this View.
61        :type _self: str
62
63        :param time_created:
64            The value to assign to the time_created property of this View.
65        :type time_created: datetime
66
67        :param time_updated:
68            The value to assign to the time_updated property of this View.
69        :type time_updated: datetime
70
71        :param lifecycle_state:
72            The value to assign to the lifecycle_state property of this View.
73            Allowed values for this property are: "ACTIVE", "DELETED", "DELETING", "UPDATING", 'UNKNOWN_ENUM_VALUE'.
74            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
75        :type lifecycle_state: str
76
77        :param is_protected:
78            The value to assign to the is_protected property of this View.
79        :type is_protected: bool
80
81        """
82        self.swagger_types = {
83            'compartment_id': 'str',
84            'display_name': 'str',
85            'freeform_tags': 'dict(str, str)',
86            'defined_tags': 'dict(str, dict(str, object))',
87            'id': 'str',
88            '_self': 'str',
89            'time_created': 'datetime',
90            'time_updated': 'datetime',
91            'lifecycle_state': 'str',
92            'is_protected': 'bool'
93        }
94
95        self.attribute_map = {
96            'compartment_id': 'compartmentId',
97            'display_name': 'displayName',
98            'freeform_tags': 'freeformTags',
99            'defined_tags': 'definedTags',
100            'id': 'id',
101            '_self': 'self',
102            'time_created': 'timeCreated',
103            'time_updated': 'timeUpdated',
104            'lifecycle_state': 'lifecycleState',
105            'is_protected': 'isProtected'
106        }
107
108        self._compartment_id = None
109        self._display_name = None
110        self._freeform_tags = None
111        self._defined_tags = None
112        self._id = None
113        self.__self = None
114        self._time_created = None
115        self._time_updated = None
116        self._lifecycle_state = None
117        self._is_protected = None
118
119    @property
120    def compartment_id(self):
121        """
122        **[Required]** Gets the compartment_id of this View.
123        The OCID of the owning compartment.
124
125
126        :return: The compartment_id of this View.
127        :rtype: str
128        """
129        return self._compartment_id
130
131    @compartment_id.setter
132    def compartment_id(self, compartment_id):
133        """
134        Sets the compartment_id of this View.
135        The OCID of the owning compartment.
136
137
138        :param compartment_id: The compartment_id of this View.
139        :type: str
140        """
141        self._compartment_id = compartment_id
142
143    @property
144    def display_name(self):
145        """
146        **[Required]** Gets the display_name of this View.
147        The display name of the view.
148
149
150        :return: The display_name of this View.
151        :rtype: str
152        """
153        return self._display_name
154
155    @display_name.setter
156    def display_name(self, display_name):
157        """
158        Sets the display_name of this View.
159        The display name of the view.
160
161
162        :param display_name: The display_name of this View.
163        :type: str
164        """
165        self._display_name = display_name
166
167    @property
168    def freeform_tags(self):
169        """
170        **[Required]** Gets the freeform_tags of this View.
171        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
172        For more information, see `Resource Tags`__.
173
174
175        **Example:** `{\"Department\": \"Finance\"}`
176
177        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
178
179
180        :return: The freeform_tags of this View.
181        :rtype: dict(str, str)
182        """
183        return self._freeform_tags
184
185    @freeform_tags.setter
186    def freeform_tags(self, freeform_tags):
187        """
188        Sets the freeform_tags of this View.
189        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
190        For more information, see `Resource Tags`__.
191
192
193        **Example:** `{\"Department\": \"Finance\"}`
194
195        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
196
197
198        :param freeform_tags: The freeform_tags of this View.
199        :type: dict(str, str)
200        """
201        self._freeform_tags = freeform_tags
202
203    @property
204    def defined_tags(self):
205        """
206        **[Required]** Gets the defined_tags of this View.
207        Defined tags for this resource. Each key is predefined and scoped to a namespace.
208        For more information, see `Resource Tags`__.
209
210
211        **Example:** `{\"Operations\": {\"CostCenter\": \"42\"}}`
212
213        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
214
215
216        :return: The defined_tags of this View.
217        :rtype: dict(str, dict(str, object))
218        """
219        return self._defined_tags
220
221    @defined_tags.setter
222    def defined_tags(self, defined_tags):
223        """
224        Sets the defined_tags of this View.
225        Defined tags for this resource. Each key is predefined and scoped to a namespace.
226        For more information, see `Resource Tags`__.
227
228
229        **Example:** `{\"Operations\": {\"CostCenter\": \"42\"}}`
230
231        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
232
233
234        :param defined_tags: The defined_tags of this View.
235        :type: dict(str, dict(str, object))
236        """
237        self._defined_tags = defined_tags
238
239    @property
240    def id(self):
241        """
242        **[Required]** Gets the id of this View.
243        The OCID of the view.
244
245
246        :return: The id of this View.
247        :rtype: str
248        """
249        return self._id
250
251    @id.setter
252    def id(self, id):
253        """
254        Sets the id of this View.
255        The OCID of the view.
256
257
258        :param id: The id of this View.
259        :type: str
260        """
261        self._id = id
262
263    @property
264    def _self(self):
265        """
266        **[Required]** Gets the _self of this View.
267        The canonical absolute URL of the resource.
268
269
270        :return: The _self of this View.
271        :rtype: str
272        """
273        return self.__self
274
275    @_self.setter
276    def _self(self, _self):
277        """
278        Sets the _self of this View.
279        The canonical absolute URL of the resource.
280
281
282        :param _self: The _self of this View.
283        :type: str
284        """
285        self.__self = _self
286
287    @property
288    def time_created(self):
289        """
290        **[Required]** Gets the time_created of this View.
291        The date and time the resource was created in \"YYYY-MM-ddThh:mm:ssZ\" format
292        with a Z offset, as defined by RFC 3339.
293
294        **Example:** `2016-07-22T17:23:59:60Z`
295
296
297        :return: The time_created of this View.
298        :rtype: datetime
299        """
300        return self._time_created
301
302    @time_created.setter
303    def time_created(self, time_created):
304        """
305        Sets the time_created of this View.
306        The date and time the resource was created in \"YYYY-MM-ddThh:mm:ssZ\" format
307        with a Z offset, as defined by RFC 3339.
308
309        **Example:** `2016-07-22T17:23:59:60Z`
310
311
312        :param time_created: The time_created of this View.
313        :type: datetime
314        """
315        self._time_created = time_created
316
317    @property
318    def time_updated(self):
319        """
320        **[Required]** Gets the time_updated of this View.
321        The date and time the resource was last updated in \"YYYY-MM-ddThh:mm:ssZ\"
322        format with a Z offset, as defined by RFC 3339.
323
324        **Example:** `2016-07-22T17:23:59:60Z`
325
326
327        :return: The time_updated of this View.
328        :rtype: datetime
329        """
330        return self._time_updated
331
332    @time_updated.setter
333    def time_updated(self, time_updated):
334        """
335        Sets the time_updated of this View.
336        The date and time the resource was last updated in \"YYYY-MM-ddThh:mm:ssZ\"
337        format with a Z offset, as defined by RFC 3339.
338
339        **Example:** `2016-07-22T17:23:59:60Z`
340
341
342        :param time_updated: The time_updated of this View.
343        :type: datetime
344        """
345        self._time_updated = time_updated
346
347    @property
348    def lifecycle_state(self):
349        """
350        **[Required]** Gets the lifecycle_state of this View.
351        The current state of the resource.
352
353        Allowed values for this property are: "ACTIVE", "DELETED", "DELETING", "UPDATING", 'UNKNOWN_ENUM_VALUE'.
354        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
355
356
357        :return: The lifecycle_state of this View.
358        :rtype: str
359        """
360        return self._lifecycle_state
361
362    @lifecycle_state.setter
363    def lifecycle_state(self, lifecycle_state):
364        """
365        Sets the lifecycle_state of this View.
366        The current state of the resource.
367
368
369        :param lifecycle_state: The lifecycle_state of this View.
370        :type: str
371        """
372        allowed_values = ["ACTIVE", "DELETED", "DELETING", "UPDATING"]
373        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
374            lifecycle_state = 'UNKNOWN_ENUM_VALUE'
375        self._lifecycle_state = lifecycle_state
376
377    @property
378    def is_protected(self):
379        """
380        **[Required]** Gets the is_protected of this View.
381        A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
382
383
384        :return: The is_protected of this View.
385        :rtype: bool
386        """
387        return self._is_protected
388
389    @is_protected.setter
390    def is_protected(self, is_protected):
391        """
392        Sets the is_protected of this View.
393        A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
394
395
396        :param is_protected: The is_protected of this View.
397        :type: bool
398        """
399        self._is_protected = is_protected
400
401    def __repr__(self):
402        return formatted_flat_dict(self)
403
404    def __eq__(self, other):
405        if other is None:
406            return False
407
408        return self.__dict__ == other.__dict__
409
410    def __ne__(self, other):
411        return not self == other
412