Class: OCI::DatabaseManagement::Models::ObjectPrivilegeSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::ObjectPrivilegeSummary
- Defined in:
- lib/oci/database_management/models/object_privilege_summary.rb
Overview
A summary of object privileges.
Constant Summary collapse
- HIERARCHY_ENUM =
[ HIERARCHY_YES = 'YES'.freeze, HIERARCHY_NO = 'NO'.freeze, HIERARCHY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- GRANT_OPTION_ENUM =
[ GRANT_OPTION_YES = 'YES'.freeze, GRANT_OPTION_NO = 'NO'.freeze, GRANT_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
-
#common ⇒ String
Indicates how the object privilege was granted.
-
#grant_option ⇒ String
Indicates whether the privilege is granted with the GRANT OPTION (YES) or not (NO).
-
#grantor ⇒ String
The name of the user who granted the object privilege.
-
#hierarchy ⇒ String
Indicates whether the privilege is granted with the HIERARCHY OPTION (YES) or not (NO).
-
#inherited ⇒ String
Indicates whether the granted privilege is inherited from another container (YES) or not (NO).
-
#name ⇒ String
The name of the privilege on the object.
-
#object ⇒ String
The name of the object.
-
#owner ⇒ String
The owner of the object.
-
#schema_type ⇒ String
The type of object.
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 = {}) ⇒ ObjectPrivilegeSummary
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 = {}) ⇒ ObjectPrivilegeSummary
Initializes the object
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 124 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.schema_type = attributes[:'schemaType'] if attributes[:'schemaType'] raise 'You cannot provide both :schemaType and :schema_type' if attributes.key?(:'schemaType') && attributes.key?(:'schema_type') self.schema_type = attributes[:'schema_type'] if attributes[:'schema_type'] self.owner = attributes[:'owner'] if attributes[:'owner'] self.grantor = attributes[:'grantor'] if attributes[:'grantor'] self.hierarchy = attributes[:'hierarchy'] if attributes[:'hierarchy'] self.object = attributes[:'object'] if attributes[:'object'] self.grant_option = attributes[:'grantOption'] if attributes[:'grantOption'] raise 'You cannot provide both :grantOption and :grant_option' if attributes.key?(:'grantOption') && attributes.key?(:'grant_option') self.grant_option = attributes[:'grant_option'] if attributes[:'grant_option'] self.common = attributes[:'common'] if attributes[:'common'] self.inherited = attributes[:'inherited'] if attributes[:'inherited'] end |
Instance Attribute Details
#common ⇒ String
Indicates how the object privilege 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)
69 70 71 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 69 def common @common end |
#grant_option ⇒ String
Indicates whether the privilege is granted with the GRANT OPTION (YES) or not (NO).
62 63 64 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 62 def grant_option @grant_option end |
#grantor ⇒ String
The name of the user who granted the object privilege.
50 51 52 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 50 def grantor @grantor end |
#hierarchy ⇒ String
Indicates whether the privilege is granted with the HIERARCHY OPTION (YES) or not (NO).
54 55 56 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 54 def hierarchy @hierarchy end |
#inherited ⇒ String
Indicates whether the granted privilege is inherited from another container (YES) or not (NO).
73 74 75 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 73 def inherited @inherited end |
#name ⇒ String
The name of the privilege on the object.
38 39 40 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 38 def name @name end |
#object ⇒ String
The name of the object. The object can be any object, including tables, packages, indexes, sequences, and so on.
58 59 60 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 58 def object @object end |
#owner ⇒ String
The owner of the object.
46 47 48 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 46 def owner @owner end |
#schema_type ⇒ String
The type of object.
42 43 44 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 42 def schema_type @schema_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 76 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'schema_type': :'schemaType', 'owner': :'owner', 'grantor': :'grantor', 'hierarchy': :'hierarchy', 'object': :'object', 'grant_option': :'grantOption', 'common': :'common', 'inherited': :'inherited' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 93 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'schema_type': :'String', 'owner': :'String', 'grantor': :'String', 'hierarchy': :'String', 'object': :'String', 'grant_option': :'String', 'common': :'String', 'inherited': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 216 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && schema_type == other.schema_type && owner == other.owner && grantor == other.grantor && hierarchy == other.hierarchy && object == other.object && grant_option == other.grant_option && common == other.common && inherited == other.inherited end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 254 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
234 235 236 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 234 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
243 244 245 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 243 def hash [name, schema_type, owner, grantor, hierarchy, object, grant_option, common, inherited].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
287 288 289 290 291 292 293 294 295 296 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 287 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
281 282 283 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 281 def to_s to_hash.to_s end |