Class: OCI::Database::Models::AutonomousDatabaseStandbySummary
- Inherits:
-
Object
- Object
- OCI::Database::Models::AutonomousDatabaseStandbySummary
- Defined in:
- lib/oci/database/models/autonomous_database_standby_summary.rb
Overview
Autonomous Data Guard standby database details.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze, LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze, LIFECYCLE_STATE_STOPPING = 'STOPPING'.freeze, LIFECYCLE_STATE_STOPPED = 'STOPPED'.freeze, LIFECYCLE_STATE_STARTING = 'STARTING'.freeze, LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze, LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze, LIFECYCLE_STATE_UNAVAILABLE = 'UNAVAILABLE'.freeze, LIFECYCLE_STATE_RESTORE_IN_PROGRESS = 'RESTORE_IN_PROGRESS'.freeze, LIFECYCLE_STATE_RESTORE_FAILED = 'RESTORE_FAILED'.freeze, LIFECYCLE_STATE_BACKUP_IN_PROGRESS = 'BACKUP_IN_PROGRESS'.freeze, LIFECYCLE_STATE_SCALE_IN_PROGRESS = 'SCALE_IN_PROGRESS'.freeze, LIFECYCLE_STATE_AVAILABLE_NEEDS_ATTENTION = 'AVAILABLE_NEEDS_ATTENTION'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_MAINTENANCE_IN_PROGRESS = 'MAINTENANCE_IN_PROGRESS'.freeze, LIFECYCLE_STATE_RESTARTING = 'RESTARTING'.freeze, LIFECYCLE_STATE_RECREATING = 'RECREATING'.freeze, LIFECYCLE_STATE_ROLE_CHANGE_IN_PROGRESS = 'ROLE_CHANGE_IN_PROGRESS'.freeze, LIFECYCLE_STATE_UPGRADING = 'UPGRADING'.freeze, LIFECYCLE_STATE_INACCESSIBLE = 'INACCESSIBLE'.freeze, LIFECYCLE_STATE_STANDBY = 'STANDBY'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#availability_domain ⇒ String
The availability domain of a local Autonomous Data Guard standby database of an Autonomous Database Serverless instance.
-
#lag_time_in_seconds ⇒ Integer
The amount of time, in seconds, that the data of the standby database lags the data of the primary database.
-
#lifecycle_details ⇒ String
Additional information about the current lifecycle state.
-
#lifecycle_state ⇒ String
The current state of the Autonomous Database.
-
#maintenance_target_component ⇒ String
The component chosen for maintenance.
-
#time_data_guard_role_changed ⇒ DateTime
The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database.
-
#time_disaster_recovery_role_changed ⇒ DateTime
The date and time the Disaster Recovery role was switched for the standby Autonomous Database.
-
#time_maintenance_begin ⇒ DateTime
The date and time when maintenance will begin.
-
#time_maintenance_end ⇒ DateTime
The date and time when maintenance will end.
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 = {}) ⇒ AutonomousDatabaseStandbySummary
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 = {}) ⇒ AutonomousDatabaseStandbySummary
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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/oci/database/models/autonomous_database_standby_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.lag_time_in_seconds = attributes[:'lagTimeInSeconds'] if attributes[:'lagTimeInSeconds'] raise 'You cannot provide both :lagTimeInSeconds and :lag_time_in_seconds' if attributes.key?(:'lagTimeInSeconds') && attributes.key?(:'lag_time_in_seconds') self.lag_time_in_seconds = attributes[:'lag_time_in_seconds'] if attributes[:'lag_time_in_seconds'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self.time_data_guard_role_changed = attributes[:'timeDataGuardRoleChanged'] if attributes[:'timeDataGuardRoleChanged'] raise 'You cannot provide both :timeDataGuardRoleChanged and :time_data_guard_role_changed' if attributes.key?(:'timeDataGuardRoleChanged') && attributes.key?(:'time_data_guard_role_changed') self.time_data_guard_role_changed = attributes[:'time_data_guard_role_changed'] if attributes[:'time_data_guard_role_changed'] self.time_disaster_recovery_role_changed = attributes[:'timeDisasterRecoveryRoleChanged'] if attributes[:'timeDisasterRecoveryRoleChanged'] raise 'You cannot provide both :timeDisasterRecoveryRoleChanged and :time_disaster_recovery_role_changed' if attributes.key?(:'timeDisasterRecoveryRoleChanged') && attributes.key?(:'time_disaster_recovery_role_changed') self.time_disaster_recovery_role_changed = attributes[:'time_disaster_recovery_role_changed'] if attributes[:'time_disaster_recovery_role_changed'] self.time_maintenance_begin = attributes[:'timeMaintenanceBegin'] if attributes[:'timeMaintenanceBegin'] raise 'You cannot provide both :timeMaintenanceBegin and :time_maintenance_begin' if attributes.key?(:'timeMaintenanceBegin') && attributes.key?(:'time_maintenance_begin') self.time_maintenance_begin = attributes[:'time_maintenance_begin'] if attributes[:'time_maintenance_begin'] self.time_maintenance_end = attributes[:'timeMaintenanceEnd'] if attributes[:'timeMaintenanceEnd'] raise 'You cannot provide both :timeMaintenanceEnd and :time_maintenance_end' if attributes.key?(:'timeMaintenanceEnd') && attributes.key?(:'time_maintenance_end') self.time_maintenance_end = attributes[:'time_maintenance_end'] if attributes[:'time_maintenance_end'] self.maintenance_target_component = attributes[:'maintenanceTargetComponent'] if attributes[:'maintenanceTargetComponent'] raise 'You cannot provide both :maintenanceTargetComponent and :maintenance_target_component' if attributes.key?(:'maintenanceTargetComponent') && attributes.key?(:'maintenance_target_component') self.maintenance_target_component = attributes[:'maintenance_target_component'] if attributes[:'maintenance_target_component'] self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain'] raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain') self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain'] end |
Instance Attribute Details
#availability_domain ⇒ String
The availability domain of a local Autonomous Data Guard standby database of an Autonomous Database Serverless instance.
72 73 74 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 72 def availability_domain @availability_domain end |
#lag_time_in_seconds ⇒ Integer
The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used to determine the potential data loss in the event of a failover.
40 41 42 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 40 def lag_time_in_seconds @lag_time_in_seconds end |
#lifecycle_details ⇒ String
Additional information about the current lifecycle state.
48 49 50 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 48 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
The current state of the Autonomous Database.
44 45 46 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 44 def lifecycle_state @lifecycle_state end |
#maintenance_target_component ⇒ String
The component chosen for maintenance.
68 69 70 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 68 def maintenance_target_component @maintenance_target_component end |
#time_data_guard_role_changed ⇒ DateTime
The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database.
52 53 54 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 52 def time_data_guard_role_changed @time_data_guard_role_changed end |
#time_disaster_recovery_role_changed ⇒ DateTime
The date and time the Disaster Recovery role was switched for the standby Autonomous Database.
56 57 58 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 56 def time_disaster_recovery_role_changed @time_disaster_recovery_role_changed end |
#time_maintenance_begin ⇒ DateTime
The date and time when maintenance will begin.
60 61 62 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 60 def time_maintenance_begin @time_maintenance_begin end |
#time_maintenance_end ⇒ DateTime
The date and time when maintenance will end.
64 65 66 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 64 def time_maintenance_end @time_maintenance_end 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/models/autonomous_database_standby_summary.rb', line 75 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'lag_time_in_seconds': :'lagTimeInSeconds', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'time_data_guard_role_changed': :'timeDataGuardRoleChanged', 'time_disaster_recovery_role_changed': :'timeDisasterRecoveryRoleChanged', 'time_maintenance_begin': :'timeMaintenanceBegin', 'time_maintenance_end': :'timeMaintenanceEnd', 'maintenance_target_component': :'maintenanceTargetComponent', 'availability_domain': :'availabilityDomain' # 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/models/autonomous_database_standby_summary.rb', line 92 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'lag_time_in_seconds': :'Integer', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'time_data_guard_role_changed': :'DateTime', 'time_disaster_recovery_role_changed': :'DateTime', 'time_maintenance_begin': :'DateTime', 'time_maintenance_end': :'DateTime', 'maintenance_target_component': :'String', 'availability_domain': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 204 def ==(other) return true if equal?(other) self.class == other.class && lag_time_in_seconds == other.lag_time_in_seconds && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && time_data_guard_role_changed == other.time_data_guard_role_changed && time_disaster_recovery_role_changed == other.time_disaster_recovery_role_changed && time_maintenance_begin == other.time_maintenance_begin && time_maintenance_end == other.time_maintenance_end && maintenance_target_component == other.maintenance_target_component && availability_domain == other.availability_domain end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 242 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
222 223 224 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 222 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
231 232 233 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 231 def hash [lag_time_in_seconds, lifecycle_state, lifecycle_details, time_data_guard_role_changed, time_disaster_recovery_role_changed, time_maintenance_begin, time_maintenance_end, maintenance_target_component, availability_domain].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 275 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
269 270 271 |
# File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 269 def to_s to_hash.to_s end |