Class: OCI::Redis::Models::DefaultConfigurationInfo
- Inherits:
-
Object
- Object
- OCI::Redis::Models::DefaultConfigurationInfo
- Defined in:
- lib/oci/redis/models/default_configuration_info.rb
Overview
Details of a configuration setting in the OCI Cache Default Config Set.
Instance Attribute Summary collapse
-
#allowed_values ⇒ String
Allowed values for the configuration setting.
-
#config_key ⇒ String
[Required] The key of the configuration setting.
-
#data_type ⇒ String
[Required] The data type of the configuration setting.
-
#default_config_value ⇒ String
[Required] The default value for the configuration setting.
-
#description ⇒ String
Description of the configuration setting.
-
#is_modifiable ⇒ BOOLEAN
[Required] Indicates if the configuration is modifiable.
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 = {}) ⇒ DefaultConfigurationInfo
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 = {}) ⇒ DefaultConfigurationInfo
Initializes the object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 75 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.config_key = attributes[:'configKey'] if attributes[:'configKey'] raise 'You cannot provide both :configKey and :config_key' if attributes.key?(:'configKey') && attributes.key?(:'config_key') self.config_key = attributes[:'config_key'] if attributes[:'config_key'] self.default_config_value = attributes[:'defaultConfigValue'] if attributes[:'defaultConfigValue'] raise 'You cannot provide both :defaultConfigValue and :default_config_value' if attributes.key?(:'defaultConfigValue') && attributes.key?(:'default_config_value') self.default_config_value = attributes[:'default_config_value'] if attributes[:'default_config_value'] self.allowed_values = attributes[:'allowedValues'] if attributes[:'allowedValues'] raise 'You cannot provide both :allowedValues and :allowed_values' if attributes.key?(:'allowedValues') && attributes.key?(:'allowed_values') self.allowed_values = attributes[:'allowed_values'] if attributes[:'allowed_values'] self.data_type = attributes[:'dataType'] if attributes[:'dataType'] raise 'You cannot provide both :dataType and :data_type' if attributes.key?(:'dataType') && attributes.key?(:'data_type') self.data_type = attributes[:'data_type'] if attributes[:'data_type'] self.is_modifiable = attributes[:'isModifiable'] unless attributes[:'isModifiable'].nil? raise 'You cannot provide both :isModifiable and :is_modifiable' if attributes.key?(:'isModifiable') && attributes.key?(:'is_modifiable') self.is_modifiable = attributes[:'is_modifiable'] unless attributes[:'is_modifiable'].nil? self.description = attributes[:'description'] if attributes[:'description'] end |
Instance Attribute Details
#allowed_values ⇒ String
Allowed values for the configuration setting.
21 22 23 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 21 def allowed_values @allowed_values end |
#config_key ⇒ String
[Required] The key of the configuration setting.
13 14 15 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 13 def config_key @config_key end |
#data_type ⇒ String
[Required] The data type of the configuration setting.
25 26 27 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 25 def data_type @data_type end |
#default_config_value ⇒ String
[Required] The default value for the configuration setting.
17 18 19 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 17 def default_config_value @default_config_value end |
#description ⇒ String
Description of the configuration setting.
33 34 35 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 33 def description @description end |
#is_modifiable ⇒ BOOLEAN
[Required] Indicates if the configuration is modifiable.
29 30 31 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 29 def is_modifiable @is_modifiable end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 36 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'config_key': :'configKey', 'default_config_value': :'defaultConfigValue', 'allowed_values': :'allowedValues', 'data_type': :'dataType', 'is_modifiable': :'isModifiable', 'description': :'description' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 50 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'config_key': :'String', 'default_config_value': :'String', 'allowed_values': :'String', 'data_type': :'String', 'is_modifiable': :'BOOLEAN', 'description': :'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 129 130 131 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 121 def ==(other) return true if equal?(other) self.class == other.class && config_key == other.config_key && default_config_value == other.default_config_value && allowed_values == other.allowed_values && data_type == other.data_type && is_modifiable == other.is_modifiable && description == other.description end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 156 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
136 137 138 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 136 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
145 146 147 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 145 def hash [config_key, default_config_value, allowed_values, data_type, is_modifiable, description].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
189 190 191 192 193 194 195 196 197 198 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 189 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
183 184 185 |
# File 'lib/oci/redis/models/default_configuration_info.rb', line 183 def to_s to_hash.to_s end |