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 TagDefaultSummary(object):
12    """
13    Summary information for the specified tag default.
14    """
15
16    #: A constant which can be used with the lifecycle_state property of a TagDefaultSummary.
17    #: This constant has a value of "ACTIVE"
18    LIFECYCLE_STATE_ACTIVE = "ACTIVE"
19
20    def __init__(self, **kwargs):
21        """
22        Initializes a new TagDefaultSummary object with values from keyword arguments.
23        The following keyword arguments are supported (corresponding to the getters/setters of this class):
24
25        :param id:
26            The value to assign to the id property of this TagDefaultSummary.
27        :type id: str
28
29        :param compartment_id:
30            The value to assign to the compartment_id property of this TagDefaultSummary.
31        :type compartment_id: str
32
33        :param tag_namespace_id:
34            The value to assign to the tag_namespace_id property of this TagDefaultSummary.
35        :type tag_namespace_id: str
36
37        :param tag_definition_id:
38            The value to assign to the tag_definition_id property of this TagDefaultSummary.
39        :type tag_definition_id: str
40
41        :param tag_definition_name:
42            The value to assign to the tag_definition_name property of this TagDefaultSummary.
43        :type tag_definition_name: str
44
45        :param value:
46            The value to assign to the value property of this TagDefaultSummary.
47        :type value: str
48
49        :param time_created:
50            The value to assign to the time_created property of this TagDefaultSummary.
51        :type time_created: datetime
52
53        :param lifecycle_state:
54            The value to assign to the lifecycle_state property of this TagDefaultSummary.
55            Allowed values for this property are: "ACTIVE", 'UNKNOWN_ENUM_VALUE'.
56            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
57        :type lifecycle_state: str
58
59        :param is_required:
60            The value to assign to the is_required property of this TagDefaultSummary.
61        :type is_required: bool
62
63        """
64        self.swagger_types = {
65            'id': 'str',
66            'compartment_id': 'str',
67            'tag_namespace_id': 'str',
68            'tag_definition_id': 'str',
69            'tag_definition_name': 'str',
70            'value': 'str',
71            'time_created': 'datetime',
72            'lifecycle_state': 'str',
73            'is_required': 'bool'
74        }
75
76        self.attribute_map = {
77            'id': 'id',
78            'compartment_id': 'compartmentId',
79            'tag_namespace_id': 'tagNamespaceId',
80            'tag_definition_id': 'tagDefinitionId',
81            'tag_definition_name': 'tagDefinitionName',
82            'value': 'value',
83            'time_created': 'timeCreated',
84            'lifecycle_state': 'lifecycleState',
85            'is_required': 'isRequired'
86        }
87
88        self._id = None
89        self._compartment_id = None
90        self._tag_namespace_id = None
91        self._tag_definition_id = None
92        self._tag_definition_name = None
93        self._value = None
94        self._time_created = None
95        self._lifecycle_state = None
96        self._is_required = None
97
98    @property
99    def id(self):
100        """
101        **[Required]** Gets the id of this TagDefaultSummary.
102        The OCID of the tag default.
103
104
105        :return: The id of this TagDefaultSummary.
106        :rtype: str
107        """
108        return self._id
109
110    @id.setter
111    def id(self, id):
112        """
113        Sets the id of this TagDefaultSummary.
114        The OCID of the tag default.
115
116
117        :param id: The id of this TagDefaultSummary.
118        :type: str
119        """
120        self._id = id
121
122    @property
123    def compartment_id(self):
124        """
125        **[Required]** Gets the compartment_id of this TagDefaultSummary.
126        The OCID of the compartment. The tag default will apply to all new resources that are created in the compartment.
127
128
129        :return: The compartment_id of this TagDefaultSummary.
130        :rtype: str
131        """
132        return self._compartment_id
133
134    @compartment_id.setter
135    def compartment_id(self, compartment_id):
136        """
137        Sets the compartment_id of this TagDefaultSummary.
138        The OCID of the compartment. The tag default will apply to all new resources that are created in the compartment.
139
140
141        :param compartment_id: The compartment_id of this TagDefaultSummary.
142        :type: str
143        """
144        self._compartment_id = compartment_id
145
146    @property
147    def tag_namespace_id(self):
148        """
149        **[Required]** Gets the tag_namespace_id of this TagDefaultSummary.
150        The OCID of the tag namespace that contains the tag definition.
151
152
153        :return: The tag_namespace_id of this TagDefaultSummary.
154        :rtype: str
155        """
156        return self._tag_namespace_id
157
158    @tag_namespace_id.setter
159    def tag_namespace_id(self, tag_namespace_id):
160        """
161        Sets the tag_namespace_id of this TagDefaultSummary.
162        The OCID of the tag namespace that contains the tag definition.
163
164
165        :param tag_namespace_id: The tag_namespace_id of this TagDefaultSummary.
166        :type: str
167        """
168        self._tag_namespace_id = tag_namespace_id
169
170    @property
171    def tag_definition_id(self):
172        """
173        **[Required]** Gets the tag_definition_id of this TagDefaultSummary.
174        The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
175
176
177        :return: The tag_definition_id of this TagDefaultSummary.
178        :rtype: str
179        """
180        return self._tag_definition_id
181
182    @tag_definition_id.setter
183    def tag_definition_id(self, tag_definition_id):
184        """
185        Sets the tag_definition_id of this TagDefaultSummary.
186        The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
187
188
189        :param tag_definition_id: The tag_definition_id of this TagDefaultSummary.
190        :type: str
191        """
192        self._tag_definition_id = tag_definition_id
193
194    @property
195    def tag_definition_name(self):
196        """
197        **[Required]** Gets the tag_definition_name of this TagDefaultSummary.
198        The name used in the tag definition. This field is informational in the context of the tag default.
199
200
201        :return: The tag_definition_name of this TagDefaultSummary.
202        :rtype: str
203        """
204        return self._tag_definition_name
205
206    @tag_definition_name.setter
207    def tag_definition_name(self, tag_definition_name):
208        """
209        Sets the tag_definition_name of this TagDefaultSummary.
210        The name used in the tag definition. This field is informational in the context of the tag default.
211
212
213        :param tag_definition_name: The tag_definition_name of this TagDefaultSummary.
214        :type: str
215        """
216        self._tag_definition_name = tag_definition_name
217
218    @property
219    def value(self):
220        """
221        **[Required]** Gets the value of this TagDefaultSummary.
222        The default value for the tag definition. This will be applied to all new resources created in the compartment.
223
224
225        :return: The value of this TagDefaultSummary.
226        :rtype: str
227        """
228        return self._value
229
230    @value.setter
231    def value(self, value):
232        """
233        Sets the value of this TagDefaultSummary.
234        The default value for the tag definition. This will be applied to all new resources created in the compartment.
235
236
237        :param value: The value of this TagDefaultSummary.
238        :type: str
239        """
240        self._value = value
241
242    @property
243    def time_created(self):
244        """
245        **[Required]** Gets the time_created of this TagDefaultSummary.
246        Date and time the `TagDefault` object was created, in the format defined by RFC3339.
247
248        Example: `2016-08-25T21:10:29.600Z`
249
250
251        :return: The time_created of this TagDefaultSummary.
252        :rtype: datetime
253        """
254        return self._time_created
255
256    @time_created.setter
257    def time_created(self, time_created):
258        """
259        Sets the time_created of this TagDefaultSummary.
260        Date and time the `TagDefault` object was created, in the format defined by RFC3339.
261
262        Example: `2016-08-25T21:10:29.600Z`
263
264
265        :param time_created: The time_created of this TagDefaultSummary.
266        :type: datetime
267        """
268        self._time_created = time_created
269
270    @property
271    def lifecycle_state(self):
272        """
273        Gets the lifecycle_state of this TagDefaultSummary.
274        The tag default's current state. After creating a `TagDefault`, make sure its `lifecycleState` is ACTIVE before using it.
275
276        Allowed values for this property are: "ACTIVE", 'UNKNOWN_ENUM_VALUE'.
277        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
278
279
280        :return: The lifecycle_state of this TagDefaultSummary.
281        :rtype: str
282        """
283        return self._lifecycle_state
284
285    @lifecycle_state.setter
286    def lifecycle_state(self, lifecycle_state):
287        """
288        Sets the lifecycle_state of this TagDefaultSummary.
289        The tag default's current state. After creating a `TagDefault`, make sure its `lifecycleState` is ACTIVE before using it.
290
291
292        :param lifecycle_state: The lifecycle_state of this TagDefaultSummary.
293        :type: str
294        """
295        allowed_values = ["ACTIVE"]
296        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
297            lifecycle_state = 'UNKNOWN_ENUM_VALUE'
298        self._lifecycle_state = lifecycle_state
299
300    @property
301    def is_required(self):
302        """
303        **[Required]** Gets the is_required of this TagDefaultSummary.
304        If you specify that a value is required, a value is set during resource creation (either by
305        the user creating the resource or another tag defualt). If no value is set, resource
306        creation is blocked.
307
308        * If the `isRequired` flag is set to \"true\", the value is set during resource creation.
309        * If the `isRequired` flag is set to \"false\", the value you enter is set during resource creation.
310
311        Example: `false`
312
313
314        :return: The is_required of this TagDefaultSummary.
315        :rtype: bool
316        """
317        return self._is_required
318
319    @is_required.setter
320    def is_required(self, is_required):
321        """
322        Sets the is_required of this TagDefaultSummary.
323        If you specify that a value is required, a value is set during resource creation (either by
324        the user creating the resource or another tag defualt). If no value is set, resource
325        creation is blocked.
326
327        * If the `isRequired` flag is set to \"true\", the value is set during resource creation.
328        * If the `isRequired` flag is set to \"false\", the value you enter is set during resource creation.
329
330        Example: `false`
331
332
333        :param is_required: The is_required of this TagDefaultSummary.
334        :type: bool
335        """
336        self._is_required = is_required
337
338    def __repr__(self):
339        return formatted_flat_dict(self)
340
341    def __eq__(self, other):
342        if other is None:
343            return False
344
345        return self.__dict__ == other.__dict__
346
347    def __ne__(self, other):
348        return not self == other
349