Class: OCI::DatabaseManagement::Models::ConsumerGroupPrivilegeSummary
- Inherits:
- 
      Object
      
        - Object
- OCI::DatabaseManagement::Models::ConsumerGroupPrivilegeSummary
 
- Defined in:
- lib/oci/database_management/models/consumer_group_privilege_summary.rb
Overview
A summary of consumer group privileges.
Constant Summary collapse
- GRANT_OPTION_ENUM =
- [ GRANT_OPTION_YES = 'YES'.freeze, GRANT_OPTION_NO = 'NO'.freeze, GRANT_OPTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze 
- INITIAL_GROUP_ENUM =
- [ INITIAL_GROUP_YES = 'YES'.freeze, INITIAL_GROUP_NO = 'NO'.freeze, INITIAL_GROUP_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze 
Instance Attribute Summary collapse
- 
  
    
      #grant_option  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Indicates whether the privilege is granted with the GRANT option (YES) or not (NO). 
- 
  
    
      #initial_group  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Indicates whether the consumer group is designated as the default for this user or role (YES) or not (NO). 
- 
  
    
      #name  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The name of the granted consumer group 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 = {})  ⇒ ConsumerGroupPrivilegeSummary 
    
    
  
  
  
    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 = {}) ⇒ ConsumerGroupPrivilegeSummary
Initializes the object
| 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 67 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.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.initial_group = attributes[:'initialGroup'] if attributes[:'initialGroup'] raise 'You cannot provide both :initialGroup and :initial_group' if attributes.key?(:'initialGroup') && attributes.key?(:'initial_group') self.initial_group = attributes[:'initial_group'] if attributes[:'initial_group'] end | 
Instance Attribute Details
#grant_option ⇒ String
Indicates whether the privilege is granted with the GRANT option (YES) or not (NO).
| 30 31 32 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 30 def grant_option @grant_option end | 
#initial_group ⇒ String
Indicates whether the consumer group is designated as the default for this user or role (YES) or not (NO).
| 34 35 36 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 34 def initial_group @initial_group end | 
#name ⇒ String
The name of the granted consumer group privilege.
| 26 27 28 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 26 def name @name end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 37 38 39 40 41 42 43 44 45 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 37 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'grant_option': :'grantOption', 'initial_group': :'initialGroup' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 48 49 50 51 52 53 54 55 56 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 48 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'grant_option': :'String', 'initial_group': :'String' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 121 122 123 124 125 126 127 128 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 121 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && grant_option == other.grant_option && initial_group == other.initial_group end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 153 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
| 133 134 135 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 133 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 142 143 144 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 142 def hash [name, grant_option, initial_group].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 186 187 188 189 190 191 192 193 194 195 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 186 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
| 180 181 182 | # File 'lib/oci/database_management/models/consumer_group_privilege_summary.rb', line 180 def to_s to_hash.to_s end |