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 RoleSummary(object): 12 """ 13 Summary of each role. 14 """ 15 16 #: A constant which can be used with the admin_option property of a RoleSummary. 17 #: This constant has a value of "YES" 18 ADMIN_OPTION_YES = "YES" 19 20 #: A constant which can be used with the admin_option property of a RoleSummary. 21 #: This constant has a value of "NO" 22 ADMIN_OPTION_NO = "NO" 23 24 #: A constant which can be used with the delegate_option property of a RoleSummary. 25 #: This constant has a value of "YES" 26 DELEGATE_OPTION_YES = "YES" 27 28 #: A constant which can be used with the delegate_option property of a RoleSummary. 29 #: This constant has a value of "NO" 30 DELEGATE_OPTION_NO = "NO" 31 32 #: A constant which can be used with the default_role property of a RoleSummary. 33 #: This constant has a value of "YES" 34 DEFAULT_ROLE_YES = "YES" 35 36 #: A constant which can be used with the default_role property of a RoleSummary. 37 #: This constant has a value of "NO" 38 DEFAULT_ROLE_NO = "NO" 39 40 #: A constant which can be used with the common property of a RoleSummary. 41 #: This constant has a value of "YES" 42 COMMON_YES = "YES" 43 44 #: A constant which can be used with the common property of a RoleSummary. 45 #: This constant has a value of "NO" 46 COMMON_NO = "NO" 47 48 #: A constant which can be used with the inherited property of a RoleSummary. 49 #: This constant has a value of "YES" 50 INHERITED_YES = "YES" 51 52 #: A constant which can be used with the inherited property of a RoleSummary. 53 #: This constant has a value of "NO" 54 INHERITED_NO = "NO" 55 56 def __init__(self, **kwargs): 57 """ 58 Initializes a new RoleSummary object with values from keyword arguments. 59 The following keyword arguments are supported (corresponding to the getters/setters of this class): 60 61 :param name: 62 The value to assign to the name property of this RoleSummary. 63 :type name: str 64 65 :param admin_option: 66 The value to assign to the admin_option property of this RoleSummary. 67 Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'. 68 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 69 :type admin_option: str 70 71 :param delegate_option: 72 The value to assign to the delegate_option property of this RoleSummary. 73 Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'. 74 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 75 :type delegate_option: str 76 77 :param default_role: 78 The value to assign to the default_role property of this RoleSummary. 79 Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'. 80 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 81 :type default_role: str 82 83 :param common: 84 The value to assign to the common property of this RoleSummary. 85 Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'. 86 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 87 :type common: str 88 89 :param inherited: 90 The value to assign to the inherited property of this RoleSummary. 91 Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'. 92 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 93 :type inherited: str 94 95 """ 96 self.swagger_types = { 97 'name': 'str', 98 'admin_option': 'str', 99 'delegate_option': 'str', 100 'default_role': 'str', 101 'common': 'str', 102 'inherited': 'str' 103 } 104 105 self.attribute_map = { 106 'name': 'name', 107 'admin_option': 'adminOption', 108 'delegate_option': 'delegateOption', 109 'default_role': 'defaultRole', 110 'common': 'common', 111 'inherited': 'inherited' 112 } 113 114 self._name = None 115 self._admin_option = None 116 self._delegate_option = None 117 self._default_role = None 118 self._common = None 119 self._inherited = None 120 121 @property 122 def name(self): 123 """ 124 Gets the name of this RoleSummary. 125 The name of a granted role 126 127 128 :return: The name of this RoleSummary. 129 :rtype: str 130 """ 131 return self._name 132 133 @name.setter 134 def name(self, name): 135 """ 136 Sets the name of this RoleSummary. 137 The name of a granted role 138 139 140 :param name: The name of this RoleSummary. 141 :type: str 142 """ 143 self._name = name 144 145 @property 146 def admin_option(self): 147 """ 148 Gets the admin_option of this RoleSummary. 149 Indicates whether the grant was with the ADMIN OPTION (YES) or not (NO) 150 151 Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'. 152 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 153 154 155 :return: The admin_option of this RoleSummary. 156 :rtype: str 157 """ 158 return self._admin_option 159 160 @admin_option.setter 161 def admin_option(self, admin_option): 162 """ 163 Sets the admin_option of this RoleSummary. 164 Indicates whether the grant was with the ADMIN OPTION (YES) or not (NO) 165 166 167 :param admin_option: The admin_option of this RoleSummary. 168 :type: str 169 """ 170 allowed_values = ["YES", "NO"] 171 if not value_allowed_none_or_none_sentinel(admin_option, allowed_values): 172 admin_option = 'UNKNOWN_ENUM_VALUE' 173 self._admin_option = admin_option 174 175 @property 176 def delegate_option(self): 177 """ 178 Gets the delegate_option of this RoleSummary. 179 Indicates whether the grant was with the DELEGATE OPTION (YES) or not (NO) 180 181 Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'. 182 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 183 184 185 :return: The delegate_option of this RoleSummary. 186 :rtype: str 187 """ 188 return self._delegate_option 189 190 @delegate_option.setter 191 def delegate_option(self, delegate_option): 192 """ 193 Sets the delegate_option of this RoleSummary. 194 Indicates whether the grant was with the DELEGATE OPTION (YES) or not (NO) 195 196 197 :param delegate_option: The delegate_option of this RoleSummary. 198 :type: str 199 """ 200 allowed_values = ["YES", "NO"] 201 if not value_allowed_none_or_none_sentinel(delegate_option, allowed_values): 202 delegate_option = 'UNKNOWN_ENUM_VALUE' 203 self._delegate_option = delegate_option 204 205 @property 206 def default_role(self): 207 """ 208 Gets the default_role of this RoleSummary. 209 Indicates whether the role is designated as a DEFAULT ROLE for the user (YES) or not (NO) 210 211 Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'. 212 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 213 214 215 :return: The default_role of this RoleSummary. 216 :rtype: str 217 """ 218 return self._default_role 219 220 @default_role.setter 221 def default_role(self, default_role): 222 """ 223 Sets the default_role of this RoleSummary. 224 Indicates whether the role is designated as a DEFAULT ROLE for the user (YES) or not (NO) 225 226 227 :param default_role: The default_role of this RoleSummary. 228 :type: str 229 """ 230 allowed_values = ["YES", "NO"] 231 if not value_allowed_none_or_none_sentinel(default_role, allowed_values): 232 default_role = 'UNKNOWN_ENUM_VALUE' 233 self._default_role = default_role 234 235 @property 236 def common(self): 237 """ 238 Gets the common of this RoleSummary. 239 Indicates how the grant was made. Possible values: 240 YES if the role was granted commonly (CONTAINER=ALL was used) 241 NO if the role was granted locally (CONTAINER=ALL was not used) 242 243 Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'. 244 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 245 246 247 :return: The common of this RoleSummary. 248 :rtype: str 249 """ 250 return self._common 251 252 @common.setter 253 def common(self, common): 254 """ 255 Sets the common of this RoleSummary. 256 Indicates how the grant was made. Possible values: 257 YES if the role was granted commonly (CONTAINER=ALL was used) 258 NO if the role was granted locally (CONTAINER=ALL was not used) 259 260 261 :param common: The common of this RoleSummary. 262 :type: str 263 """ 264 allowed_values = ["YES", "NO"] 265 if not value_allowed_none_or_none_sentinel(common, allowed_values): 266 common = 'UNKNOWN_ENUM_VALUE' 267 self._common = common 268 269 @property 270 def inherited(self): 271 """ 272 Gets the inherited of this RoleSummary. 273 Indicates whether the role grant was inherited from another container (YES) or not (NO) 274 275 Allowed values for this property are: "YES", "NO", 'UNKNOWN_ENUM_VALUE'. 276 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 277 278 279 :return: The inherited of this RoleSummary. 280 :rtype: str 281 """ 282 return self._inherited 283 284 @inherited.setter 285 def inherited(self, inherited): 286 """ 287 Sets the inherited of this RoleSummary. 288 Indicates whether the role grant was inherited from another container (YES) or not (NO) 289 290 291 :param inherited: The inherited of this RoleSummary. 292 :type: str 293 """ 294 allowed_values = ["YES", "NO"] 295 if not value_allowed_none_or_none_sentinel(inherited, allowed_values): 296 inherited = 'UNKNOWN_ENUM_VALUE' 297 self._inherited = inherited 298 299 def __repr__(self): 300 return formatted_flat_dict(self) 301 302 def __eq__(self, other): 303 if other is None: 304 return False 305 306 return self.__dict__ == other.__dict__ 307 308 def __ne__(self, other): 309 return not self == other 310