Class: OCI::DatabaseManagement::Models::RoleSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::RoleSummary
- Defined in:
- lib/oci/database_management/models/role_summary.rb
Overview
A summary of each role.
Constant Summary collapse
- ADMIN_OPTION_ENUM =
[ ADMIN_OPTION_YES = 'YES'.freeze, ADMIN_OPTION_NO = 'NO'.freeze, ADMIN_OPTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DELEGATE_OPTION_ENUM =
[ DELEGATE_OPTION_YES = 'YES'.freeze, DELEGATE_OPTION_NO = 'NO'.freeze, DELEGATE_OPTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DEFAULT_ROLE_ENUM =
[ DEFAULT_ROLE_YES = 'YES'.freeze, DEFAULT_ROLE_NO = 'NO'.freeze, DEFAULT_ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- COMMON_ENUM =
[ COMMON_YES = 'YES'.freeze, COMMON_NO = 'NO'.freeze, COMMON_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- INHERITED_ENUM =
[ INHERITED_YES = 'YES'.freeze, INHERITED_NO = 'NO'.freeze, INHERITED_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#admin_option ⇒ String
Indicates whether the role is granted with the ADMIN OPTION (YES) or not (NO).
-
#common ⇒ String
Indicates how the role was granted.
-
#default_role ⇒ String
Indicates whether the role is designated as a DEFAULT ROLE for the user (YES) or not (NO).
-
#delegate_option ⇒ String
Indicates whether the role is granted with the DELEGATE OPTION (YES) or not (NO).
-
#inherited ⇒ String
Indicates whether the granted role is inherited from another container (YES) or not (NO).
-
#name ⇒ String
The name of the role granted to the user.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ RoleSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ RoleSummary
Initializes the object
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/oci/database_management/models/role_summary.rb', line 108 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.name = attributes[:'name'] if attributes[:'name'] self.admin_option = attributes[:'adminOption'] if attributes[:'adminOption'] raise 'You cannot provide both :adminOption and :admin_option' if attributes.key?(:'adminOption') && attributes.key?(:'admin_option') self.admin_option = attributes[:'admin_option'] if attributes[:'admin_option'] self.delegate_option = attributes[:'delegateOption'] if attributes[:'delegateOption'] raise 'You cannot provide both :delegateOption and :delegate_option' if attributes.key?(:'delegateOption') && attributes.key?(:'delegate_option') self.delegate_option = attributes[:'delegate_option'] if attributes[:'delegate_option'] self.default_role = attributes[:'defaultRole'] if attributes[:'defaultRole'] raise 'You cannot provide both :defaultRole and :default_role' if attributes.key?(:'defaultRole') && attributes.key?(:'default_role') self.default_role = attributes[:'default_role'] if attributes[:'default_role'] self.common = attributes[:'common'] if attributes[:'common'] self.inherited = attributes[:'inherited'] if attributes[:'inherited'] end |
Instance Attribute Details
#admin_option ⇒ String
Indicates whether the role is granted with the ADMIN OPTION (YES) or not (NO).
47 48 49 |
# File 'lib/oci/database_management/models/role_summary.rb', line 47 def admin_option @admin_option end |
#common ⇒ String
Indicates how the role was granted. Possible values: YES if the role is granted commonly (CONTAINER=ALL is used) NO if the role is granted locally (CONTAINER=ALL is not used)
62 63 64 |
# File 'lib/oci/database_management/models/role_summary.rb', line 62 def common @common end |
#default_role ⇒ String
Indicates whether the role is designated as a DEFAULT ROLE for the user (YES) or not (NO).
55 56 57 |
# File 'lib/oci/database_management/models/role_summary.rb', line 55 def default_role @default_role end |
#delegate_option ⇒ String
Indicates whether the role is granted with the DELEGATE OPTION (YES) or not (NO).
51 52 53 |
# File 'lib/oci/database_management/models/role_summary.rb', line 51 def delegate_option @delegate_option end |
#inherited ⇒ String
Indicates whether the granted role is inherited from another container (YES) or not (NO).
66 67 68 |
# File 'lib/oci/database_management/models/role_summary.rb', line 66 def inherited @inherited end |
#name ⇒ String
The name of the role granted to the user.
43 44 45 |
# File 'lib/oci/database_management/models/role_summary.rb', line 43 def name @name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/database_management/models/role_summary.rb', line 69 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'admin_option': :'adminOption', 'delegate_option': :'delegateOption', 'default_role': :'defaultRole', 'common': :'common', 'inherited': :'inherited' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/oci/database_management/models/role_summary.rb', line 83 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'admin_option': :'String', 'delegate_option': :'String', 'default_role': :'String', 'common': :'String', 'inherited': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/database_management/models/role_summary.rb', line 211 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && admin_option == other.admin_option && delegate_option == other.delegate_option && default_role == other.default_role && common == other.common && inherited == other.inherited end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/oci/database_management/models/role_summary.rb', line 246 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
226 227 228 |
# File 'lib/oci/database_management/models/role_summary.rb', line 226 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
235 236 237 |
# File 'lib/oci/database_management/models/role_summary.rb', line 235 def hash [name, admin_option, delegate_option, default_role, common, inherited].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oci/database_management/models/role_summary.rb', line 279 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
273 274 275 |
# File 'lib/oci/database_management/models/role_summary.rb', line 273 def to_s to_hash.to_s end |