Class: OCI::DatabaseManagement::Models::SystemPrivilegeSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::SystemPrivilegeSummary
- Defined in:
- lib/oci/database_management/models/system_privilege_summary.rb
Overview
A Summary of system privileges.
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
- 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 system privilege is granted with the ADMIN option (YES) or not (NO).
-
#common ⇒ String
Indicates how the system privilege was granted.
-
#inherited ⇒ String
Indicates whether the granted system privilege is inherited from another container (YES) or not (NO).
-
#name ⇒ String
The name of a system privilege.
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 = {}) ⇒ SystemPrivilegeSummary
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 = {}) ⇒ SystemPrivilegeSummary
Initializes the object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 83 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.common = attributes[:'common'] if attributes[:'common'] self.inherited = attributes[:'inherited'] if attributes[:'inherited'] end |
Instance Attribute Details
#admin_option ⇒ String
Indicates whether the system privilege is granted with the ADMIN option (YES) or not (NO).
36 37 38 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 36 def admin_option @admin_option end |
#common ⇒ String
Indicates how the system privilege was granted. Possible values: YES if the system privilege is granted commonly (CONTAINER=ALL is used) NO if the system privilege is granted locally (CONTAINER=ALL is not used)
43 44 45 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 43 def common @common end |
#inherited ⇒ String
Indicates whether the granted system privilege is inherited from another container (YES) or not (NO).
47 48 49 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 47 def inherited @inherited end |
#name ⇒ String
The name of a system privilege.
32 33 34 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 32 def name @name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 50 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'admin_option': :'adminOption', 'common': :'common', 'inherited': :'inherited' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 62 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'admin_option': :'String', 'common': :'String', 'inherited': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
148 149 150 151 152 153 154 155 156 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 148 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && admin_option == other.admin_option && common == other.common && inherited == other.inherited end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 181 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
161 162 163 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 161 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
170 171 172 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 170 def hash [name, admin_option, common, inherited].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
214 215 216 217 218 219 220 221 222 223 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 214 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
208 209 210 |
# File 'lib/oci/database_management/models/system_privilege_summary.rb', line 208 def to_s to_hash.to_s end |