Class: OCI::DatabaseManagement::Models::ObjectPrivilegeSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::ObjectPrivilegeSummary
- Defined in:
- lib/oci/database_management/models/object_privilege_summary.rb
Overview
Summary of objectPrivileges.
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 grant was made.
-
#grant_option ⇒ String
Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO).
-
#grantor ⇒ String
The name of the user who performed the grant.
-
#hierarchy ⇒ String
Indicates whether the privilege was granted with the HIERARCHY OPTION (YES) or not (NO).
-
#inherited ⇒ String
Indicates whether the role grant was 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 the 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
123 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 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 123 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 grant was made. Possible values: YES if the role was granted commonly (CONTAINER=ALL was used) NO if the role was granted locally (CONTAINER=ALL was not used)
68 69 70 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 68 def common @common end |
#grant_option ⇒ String
Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)
61 62 63 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 61 def grant_option @grant_option end |
#grantor ⇒ String
The name of the user who performed the grant
49 50 51 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 49 def grantor @grantor end |
#hierarchy ⇒ String
Indicates whether the privilege was granted with the HIERARCHY OPTION (YES) or not (NO)
53 54 55 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 53 def hierarchy @hierarchy end |
#inherited ⇒ String
Indicates whether the role grant was inherited from another container (YES) or not (NO)
72 73 74 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 72 def inherited @inherited end |
#name ⇒ String
The name of the privilege on the object.
37 38 39 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 37 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.
57 58 59 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 57 def object @object end |
#owner ⇒ String
The owner of the object.
45 46 47 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 45 def owner @owner end |
#schema_type ⇒ String
The type of the object.
41 42 43 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 41 def schema_type @schema_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 75 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.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 92 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.
215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 215 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
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 253 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
233 234 235 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 233 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
242 243 244 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 242 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
286 287 288 289 290 291 292 293 294 295 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 286 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
280 281 282 |
# File 'lib/oci/database_management/models/object_privilege_summary.rb', line 280 def to_s to_hash.to_s end |