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
- 
  
    
      #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. 
- 
  
    
      #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. 
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
| 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | # File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 95 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'] end | 
Instance Attribute Details
#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 | 
#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 | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 59 60 61 62 63 64 65 66 67 68 69 | # File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 59 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' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 72 73 74 75 76 77 78 79 80 81 82 | # File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 72 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' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 152 153 154 155 156 157 158 159 160 161 | # File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 152 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 end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | # File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 186 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
| 166 167 168 | # File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 166 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 175 176 177 | # File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 175 def hash [lag_time_in_seconds, lifecycle_state, lifecycle_details, time_data_guard_role_changed, time_disaster_recovery_role_changed].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 219 220 221 222 223 224 225 226 227 228 | # File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 219 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
| 213 214 215 | # File 'lib/oci/database/models/autonomous_database_standby_summary.rb', line 213 def to_s to_hash.to_s end |