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 ObjectPrivilegeSummary(object):
12    """
13    Summary of objectPrivileges.
14    """
15
16    #: A constant which can be used with the hierarchy property of a ObjectPrivilegeSummary.
17    #: This constant has a value of "YES"
18    HIERARCHY_YES = "YES"
19
20    #: A constant which can be used with the hierarchy property of a ObjectPrivilegeSummary.
21    #: This constant has a value of "NO"
22    HIERARCHY_NO = "NO"
23
24    #: A constant which can be used with the grant_option property of a ObjectPrivilegeSummary.
25    #: This constant has a value of "YES"
26    GRANT_OPTION_YES = "YES"
27
28    #: A constant which can be used with the grant_option property of a ObjectPrivilegeSummary.
29    #: This constant has a value of "NO"
30    GRANT_OPTION_NO = "NO"
31
32    #: A constant which can be used with the common property of a ObjectPrivilegeSummary.
33    #: This constant has a value of "YES"
34    COMMON_YES = "YES"
35
36    #: A constant which can be used with the common property of a ObjectPrivilegeSummary.
37    #: This constant has a value of "NO"
38    COMMON_NO = "NO"
39
40    #: A constant which can be used with the inherited property of a ObjectPrivilegeSummary.
41    #: This constant has a value of "YES"
42    INHERITED_YES = "YES"
43
44    #: A constant which can be used with the inherited property of a ObjectPrivilegeSummary.
45    #: This constant has a value of "NO"
46    INHERITED_NO = "NO"
47
48    def __init__(self, **kwargs):
49        """
50        Initializes a new ObjectPrivilegeSummary object with values from keyword arguments.
51        The following keyword arguments are supported (corresponding to the getters/setters of this class):
52
53        :param name:
54            The value to assign to the name property of this ObjectPrivilegeSummary.
55        :type name: str
56
57        :param schema_type:
58            The value to assign to the schema_type property of this ObjectPrivilegeSummary.
59        :type schema_type: str
60
61        :param owner:
62            The value to assign to the owner property of this ObjectPrivilegeSummary.
63        :type owner: str
64
65        :param grantor:
66            The value to assign to the grantor property of this ObjectPrivilegeSummary.
67        :type grantor: str
68
69        :param hierarchy:
70            The value to assign to the hierarchy property of this ObjectPrivilegeSummary.
71            Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'.
72            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
73        :type hierarchy: str
74
75        :param object:
76            The value to assign to the object property of this ObjectPrivilegeSummary.
77        :type object: str
78
79        :param grant_option:
80            The value to assign to the grant_option property of this ObjectPrivilegeSummary.
81            Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'.
82            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
83        :type grant_option: str
84
85        :param common:
86            The value to assign to the common property of this ObjectPrivilegeSummary.
87            Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'.
88            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
89        :type common: str
90
91        :param inherited:
92            The value to assign to the inherited property of this ObjectPrivilegeSummary.
93            Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'.
94            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
95        :type inherited: str
96
97        """
98        self.swagger_types = {
99            'name': 'str',
100            'schema_type': 'str',
101            'owner': 'str',
102            'grantor': 'str',
103            'hierarchy': 'str',
104            'object': 'str',
105            'grant_option': 'str',
106            'common': 'str',
107            'inherited': 'str'
108        }
109
110        self.attribute_map = {
111            'name': 'name',
112            'schema_type': 'schemaType',
113            'owner': 'owner',
114            'grantor': 'grantor',
115            'hierarchy': 'hierarchy',
116            'object': 'object',
117            'grant_option': 'grantOption',
118            'common': 'common',
119            'inherited': 'inherited'
120        }
121
122        self._name = None
123        self._schema_type = None
124        self._owner = None
125        self._grantor = None
126        self._hierarchy = None
127        self._object = None
128        self._grant_option = None
129        self._common = None
130        self._inherited = None
131
132    @property
133    def name(self):
134        """
135        Gets the name of this ObjectPrivilegeSummary.
136        The name of the privilege on the object.
137
138
139        :return: The name of this ObjectPrivilegeSummary.
140        :rtype: str
141        """
142        return self._name
143
144    @name.setter
145    def name(self, name):
146        """
147        Sets the name of this ObjectPrivilegeSummary.
148        The name of the privilege on the object.
149
150
151        :param name: The name of this ObjectPrivilegeSummary.
152        :type: str
153        """
154        self._name = name
155
156    @property
157    def schema_type(self):
158        """
159        Gets the schema_type of this ObjectPrivilegeSummary.
160        The type of the object.
161
162
163        :return: The schema_type of this ObjectPrivilegeSummary.
164        :rtype: str
165        """
166        return self._schema_type
167
168    @schema_type.setter
169    def schema_type(self, schema_type):
170        """
171        Sets the schema_type of this ObjectPrivilegeSummary.
172        The type of the object.
173
174
175        :param schema_type: The schema_type of this ObjectPrivilegeSummary.
176        :type: str
177        """
178        self._schema_type = schema_type
179
180    @property
181    def owner(self):
182        """
183        Gets the owner of this ObjectPrivilegeSummary.
184        The owner of the object.
185
186
187        :return: The owner of this ObjectPrivilegeSummary.
188        :rtype: str
189        """
190        return self._owner
191
192    @owner.setter
193    def owner(self, owner):
194        """
195        Sets the owner of this ObjectPrivilegeSummary.
196        The owner of the object.
197
198
199        :param owner: The owner of this ObjectPrivilegeSummary.
200        :type: str
201        """
202        self._owner = owner
203
204    @property
205    def grantor(self):
206        """
207        Gets the grantor of this ObjectPrivilegeSummary.
208        The name of the user who performed the grant
209
210
211        :return: The grantor of this ObjectPrivilegeSummary.
212        :rtype: str
213        """
214        return self._grantor
215
216    @grantor.setter
217    def grantor(self, grantor):
218        """
219        Sets the grantor of this ObjectPrivilegeSummary.
220        The name of the user who performed the grant
221
222
223        :param grantor: The grantor of this ObjectPrivilegeSummary.
224        :type: str
225        """
226        self._grantor = grantor
227
228    @property
229    def hierarchy(self):
230        """
231        Gets the hierarchy of this ObjectPrivilegeSummary.
232        Indicates whether the privilege was granted with the HIERARCHY OPTION (YES) or not (NO)
233
234        Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'.
235        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
236
237
238        :return: The hierarchy of this ObjectPrivilegeSummary.
239        :rtype: str
240        """
241        return self._hierarchy
242
243    @hierarchy.setter
244    def hierarchy(self, hierarchy):
245        """
246        Sets the hierarchy of this ObjectPrivilegeSummary.
247        Indicates whether the privilege was granted with the HIERARCHY OPTION (YES) or not (NO)
248
249
250        :param hierarchy: The hierarchy of this ObjectPrivilegeSummary.
251        :type: str
252        """
253        allowed_values = ["YES", "NO"]
254        if not value_allowed_none_or_none_sentinel(hierarchy, allowed_values):
255            hierarchy = 'UNKNOWN_ENUM_VALUE'
256        self._hierarchy = hierarchy
257
258    @property
259    def object(self):
260        """
261        Gets the object of this ObjectPrivilegeSummary.
262        The name of the object. The object can be any object, including tables, packages, indexes, sequences, and so on.
263
264
265        :return: The object of this ObjectPrivilegeSummary.
266        :rtype: str
267        """
268        return self._object
269
270    @object.setter
271    def object(self, object):
272        """
273        Sets the object of this ObjectPrivilegeSummary.
274        The name of the object. The object can be any object, including tables, packages, indexes, sequences, and so on.
275
276
277        :param object: The object of this ObjectPrivilegeSummary.
278        :type: str
279        """
280        self._object = object
281
282    @property
283    def grant_option(self):
284        """
285        Gets the grant_option of this ObjectPrivilegeSummary.
286        Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)
287
288        Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'.
289        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
290
291
292        :return: The grant_option of this ObjectPrivilegeSummary.
293        :rtype: str
294        """
295        return self._grant_option
296
297    @grant_option.setter
298    def grant_option(self, grant_option):
299        """
300        Sets the grant_option of this ObjectPrivilegeSummary.
301        Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)
302
303
304        :param grant_option: The grant_option of this ObjectPrivilegeSummary.
305        :type: str
306        """
307        allowed_values = ["YES", "NO"]
308        if not value_allowed_none_or_none_sentinel(grant_option, allowed_values):
309            grant_option = 'UNKNOWN_ENUM_VALUE'
310        self._grant_option = grant_option
311
312    @property
313    def common(self):
314        """
315        Gets the common of this ObjectPrivilegeSummary.
316        Indicates how the grant was made. Possible values:
317        YES if the role was granted commonly (CONTAINER=ALL was used)
318        NO if the role was granted locally (CONTAINER=ALL was not used)
319
320        Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'.
321        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
322
323
324        :return: The common of this ObjectPrivilegeSummary.
325        :rtype: str
326        """
327        return self._common
328
329    @common.setter
330    def common(self, common):
331        """
332        Sets the common of this ObjectPrivilegeSummary.
333        Indicates how the grant was made. Possible values:
334        YES if the role was granted commonly (CONTAINER=ALL was used)
335        NO if the role was granted locally (CONTAINER=ALL was not used)
336
337
338        :param common: The common of this ObjectPrivilegeSummary.
339        :type: str
340        """
341        allowed_values = ["YES", "NO"]
342        if not value_allowed_none_or_none_sentinel(common, allowed_values):
343            common = 'UNKNOWN_ENUM_VALUE'
344        self._common = common
345
346    @property
347    def inherited(self):
348        """
349        Gets the inherited of this ObjectPrivilegeSummary.
350        Indicates whether the role grant was inherited from another container (YES) or not (NO)
351
352        Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'.
353        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
354
355
356        :return: The inherited of this ObjectPrivilegeSummary.
357        :rtype: str
358        """
359        return self._inherited
360
361    @inherited.setter
362    def inherited(self, inherited):
363        """
364        Sets the inherited of this ObjectPrivilegeSummary.
365        Indicates whether the role grant was inherited from another container (YES) or not (NO)
366
367
368        :param inherited: The inherited of this ObjectPrivilegeSummary.
369        :type: str
370        """
371        allowed_values = ["YES", "NO"]
372        if not value_allowed_none_or_none_sentinel(inherited, allowed_values):
373            inherited = 'UNKNOWN_ENUM_VALUE'
374        self._inherited = inherited
375
376    def __repr__(self):
377        return formatted_flat_dict(self)
378
379    def __eq__(self, other):
380        if other is None:
381            return False
382
383        return self.__dict__ == other.__dict__
384
385    def __ne__(self, other):
386        return not self == other
387