Class: OCI::Opsi::Models::DBExternalProperties
- Inherits:
-
DatabaseConfigurationMetricGroup
- Object
- DatabaseConfigurationMetricGroup
- OCI::Opsi::Models::DBExternalProperties
- Defined in:
- lib/oci/opsi/models/db_external_properties.rb
Overview
Configuration parameters defined for external databases.
Constant Summary
Constants inherited from DatabaseConfigurationMetricGroup
OCI::Opsi::Models::DatabaseConfigurationMetricGroup::METRIC_NAME_ENUM
Instance Attribute Summary collapse
-
#cdb ⇒ String
Indicates if it is a CDB or not.
-
#control_file_type ⇒ String
Type of control file.
-
#created ⇒ DateTime
Creation time.
-
#database_role ⇒ String
Current role of the database.
-
#guard_status ⇒ String
Data protection policy.
-
#log_mode ⇒ String
Archive log mode.
-
#name ⇒ String
Name of the database.
-
#open_mode ⇒ String
Open mode information.
-
#platform_name ⇒ String
Platform name of the database, OS with architecture.
-
#switchover_status ⇒ String
Indicates whether switchover is allowed.
Attributes inherited from DatabaseConfigurationMetricGroup
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 = {}) ⇒ DBExternalProperties
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.
Methods inherited from DatabaseConfigurationMetricGroup
Constructor Details
#initialize(attributes = {}) ⇒ DBExternalProperties
Initializes the object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 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 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 109 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['metricName'] = 'DB_EXTERNAL_PROPERTIES' super(attributes) # 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.log_mode = attributes[:'logMode'] if attributes[:'logMode'] raise 'You cannot provide both :logMode and :log_mode' if attributes.key?(:'logMode') && attributes.key?(:'log_mode') self.log_mode = attributes[:'log_mode'] if attributes[:'log_mode'] self.cdb = attributes[:'cdb'] if attributes[:'cdb'] self.open_mode = attributes[:'openMode'] if attributes[:'openMode'] raise 'You cannot provide both :openMode and :open_mode' if attributes.key?(:'openMode') && attributes.key?(:'open_mode') self.open_mode = attributes[:'open_mode'] if attributes[:'open_mode'] self.database_role = attributes[:'databaseRole'] if attributes[:'databaseRole'] raise 'You cannot provide both :databaseRole and :database_role' if attributes.key?(:'databaseRole') && attributes.key?(:'database_role') self.database_role = attributes[:'database_role'] if attributes[:'database_role'] self.guard_status = attributes[:'guardStatus'] if attributes[:'guardStatus'] raise 'You cannot provide both :guardStatus and :guard_status' if attributes.key?(:'guardStatus') && attributes.key?(:'guard_status') self.guard_status = attributes[:'guard_status'] if attributes[:'guard_status'] self.platform_name = attributes[:'platformName'] if attributes[:'platformName'] raise 'You cannot provide both :platformName and :platform_name' if attributes.key?(:'platformName') && attributes.key?(:'platform_name') self.platform_name = attributes[:'platform_name'] if attributes[:'platform_name'] self.control_file_type = attributes[:'controlFileType'] if attributes[:'controlFileType'] raise 'You cannot provide both :controlFileType and :control_file_type' if attributes.key?(:'controlFileType') && attributes.key?(:'control_file_type') self.control_file_type = attributes[:'control_file_type'] if attributes[:'control_file_type'] self.switchover_status = attributes[:'switchoverStatus'] if attributes[:'switchoverStatus'] raise 'You cannot provide both :switchoverStatus and :switchover_status' if attributes.key?(:'switchoverStatus') && attributes.key?(:'switchover_status') self.switchover_status = attributes[:'switchover_status'] if attributes[:'switchover_status'] self.created = attributes[:'created'] if attributes[:'created'] end |
Instance Attribute Details
#cdb ⇒ String
Indicates if it is a CDB or not. This would be 'yes' or 'no'.
22 23 24 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 22 def cdb @cdb end |
#control_file_type ⇒ String
Type of control file.
42 43 44 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 42 def control_file_type @control_file_type end |
#created ⇒ DateTime
Creation time.
50 51 52 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 50 def created @created end |
#database_role ⇒ String
Current role of the database.
30 31 32 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 30 def database_role @database_role end |
#guard_status ⇒ String
Data protection policy.
34 35 36 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 34 def guard_status @guard_status end |
#log_mode ⇒ String
Archive log mode.
18 19 20 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 18 def log_mode @log_mode end |
#name ⇒ String
Name of the database.
14 15 16 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 14 def name @name end |
#open_mode ⇒ String
Open mode information.
26 27 28 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 26 def open_mode @open_mode end |
#platform_name ⇒ String
Platform name of the database, OS with architecture.
38 39 40 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 38 def platform_name @platform_name end |
#switchover_status ⇒ String
Indicates whether switchover is allowed.
46 47 48 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 46 def switchover_status @switchover_status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 53 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'metric_name': :'metricName', 'time_collected': :'timeCollected', 'name': :'name', 'log_mode': :'logMode', 'cdb': :'cdb', 'open_mode': :'openMode', 'database_role': :'databaseRole', 'guard_status': :'guardStatus', 'platform_name': :'platformName', 'control_file_type': :'controlFileType', 'switchover_status': :'switchoverStatus', 'created': :'created' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 73 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'metric_name': :'String', 'time_collected': :'DateTime', 'name': :'String', 'log_mode': :'String', 'cdb': :'String', 'open_mode': :'String', 'database_role': :'String', 'guard_status': :'String', 'platform_name': :'String', 'control_file_type': :'String', 'switchover_status': :'String', 'created': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 175 def ==(other) return true if equal?(other) self.class == other.class && metric_name == other.metric_name && time_collected == other.time_collected && name == other.name && log_mode == other.log_mode && cdb == other.cdb && open_mode == other.open_mode && database_role == other.database_role && guard_status == other.guard_status && platform_name == other.platform_name && control_file_type == other.control_file_type && switchover_status == other.switchover_status && created == other.created end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 216 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
196 197 198 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 196 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
205 206 207 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 205 def hash [metric_name, time_collected, name, log_mode, cdb, open_mode, database_role, guard_status, platform_name, control_file_type, switchover_status, created].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
249 250 251 252 253 254 255 256 257 258 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 249 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
243 244 245 |
# File 'lib/oci/opsi/models/db_external_properties.rb', line 243 def to_s to_hash.to_s end |