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
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 138 |
# File 'lib/oci/database_management/models/role_summary.rb', line 109 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).
48 49 50 |
# File 'lib/oci/database_management/models/role_summary.rb', line 48 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)
63 64 65 |
# File 'lib/oci/database_management/models/role_summary.rb', line 63 def common @common end |
#default_role ⇒ String
Indicates whether the role is designated as a DEFAULT ROLE for the user (YES) or not (NO).
56 57 58 |
# File 'lib/oci/database_management/models/role_summary.rb', line 56 def default_role @default_role end |
#delegate_option ⇒ String
Indicates whether the role is granted with the DELEGATE OPTION (YES) or not (NO).
52 53 54 |
# File 'lib/oci/database_management/models/role_summary.rb', line 52 def delegate_option @delegate_option end |
#inherited ⇒ String
Indicates whether the granted role is inherited from another container (YES) or not (NO).
67 68 69 |
# File 'lib/oci/database_management/models/role_summary.rb', line 67 def inherited @inherited end |
#name ⇒ String
The name of the role granted to the user.
44 45 46 |
# File 'lib/oci/database_management/models/role_summary.rb', line 44 def name @name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/database_management/models/role_summary.rb', line 70 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.
84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/oci/database_management/models/role_summary.rb', line 84 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.
212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/database_management/models/role_summary.rb', line 212 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
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/oci/database_management/models/role_summary.rb', line 247 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
227 228 229 |
# File 'lib/oci/database_management/models/role_summary.rb', line 227 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
236 237 238 |
# File 'lib/oci/database_management/models/role_summary.rb', line 236 def hash [name, admin_option, delegate_option, default_role, common, inherited].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
280 281 282 283 284 285 286 287 288 289 |
# File 'lib/oci/database_management/models/role_summary.rb', line 280 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
274 275 276 |
# File 'lib/oci/database_management/models/role_summary.rb', line 274 def to_s to_hash.to_s end |