Class: OCI::DistributedDatabase::Models::CreateShardPeerWithDedicatedInfraDetails
- Inherits:
-
Object
- Object
- OCI::DistributedDatabase::Models::CreateShardPeerWithDedicatedInfraDetails
- Defined in:
- lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb
Overview
Details required for creation of autonomous dedicated infrastructure based shard peer.
Constant Summary collapse
- PROTECTION_MODE_ENUM =
[ PROTECTION_MODE_MAXIMUM_AVAILABILITY = 'MAXIMUM_AVAILABILITY'.freeze, PROTECTION_MODE_MAXIMUM_PERFORMANCE = 'MAXIMUM_PERFORMANCE'.freeze ].freeze
Instance Attribute Summary collapse
-
#cloud_autonomous_vm_cluster_id ⇒ String
[Required] The OCID of the cloud Autonomous VM Cluster for the peer shard.
-
#fast_start_fail_over_lag_limit_in_seconds ⇒ Integer
The lag time preference based on data loss tolerance in seconds.
-
#is_automatic_failover_enabled ⇒ BOOLEAN
This field is deprecated.
-
#protection_mode ⇒ String
The protectionMode for the shard peer.
-
#standby_maintenance_buffer_in_days ⇒ Integer
The scheduling detail for the quarterly maintenance window of the standby Autonomous Container 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 = {}) ⇒ CreateShardPeerWithDedicatedInfraDetails
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 = {}) ⇒ CreateShardPeerWithDedicatedInfraDetails
Initializes the object
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 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 76 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.cloud_autonomous_vm_cluster_id = attributes[:'cloudAutonomousVmClusterId'] if attributes[:'cloudAutonomousVmClusterId'] raise 'You cannot provide both :cloudAutonomousVmClusterId and :cloud_autonomous_vm_cluster_id' if attributes.key?(:'cloudAutonomousVmClusterId') && attributes.key?(:'cloud_autonomous_vm_cluster_id') self.cloud_autonomous_vm_cluster_id = attributes[:'cloud_autonomous_vm_cluster_id'] if attributes[:'cloud_autonomous_vm_cluster_id'] self.protection_mode = attributes[:'protectionMode'] if attributes[:'protectionMode'] raise 'You cannot provide both :protectionMode and :protection_mode' if attributes.key?(:'protectionMode') && attributes.key?(:'protection_mode') self.protection_mode = attributes[:'protection_mode'] if attributes[:'protection_mode'] self.fast_start_fail_over_lag_limit_in_seconds = attributes[:'fastStartFailOverLagLimitInSeconds'] if attributes[:'fastStartFailOverLagLimitInSeconds'] raise 'You cannot provide both :fastStartFailOverLagLimitInSeconds and :fast_start_fail_over_lag_limit_in_seconds' if attributes.key?(:'fastStartFailOverLagLimitInSeconds') && attributes.key?(:'fast_start_fail_over_lag_limit_in_seconds') self.fast_start_fail_over_lag_limit_in_seconds = attributes[:'fast_start_fail_over_lag_limit_in_seconds'] if attributes[:'fast_start_fail_over_lag_limit_in_seconds'] self.is_automatic_failover_enabled = attributes[:'isAutomaticFailoverEnabled'] unless attributes[:'isAutomaticFailoverEnabled'].nil? raise 'You cannot provide both :isAutomaticFailoverEnabled and :is_automatic_failover_enabled' if attributes.key?(:'isAutomaticFailoverEnabled') && attributes.key?(:'is_automatic_failover_enabled') self.is_automatic_failover_enabled = attributes[:'is_automatic_failover_enabled'] unless attributes[:'is_automatic_failover_enabled'].nil? self.standby_maintenance_buffer_in_days = attributes[:'standbyMaintenanceBufferInDays'] if attributes[:'standbyMaintenanceBufferInDays'] raise 'You cannot provide both :standbyMaintenanceBufferInDays and :standby_maintenance_buffer_in_days' if attributes.key?(:'standbyMaintenanceBufferInDays') && attributes.key?(:'standby_maintenance_buffer_in_days') self.standby_maintenance_buffer_in_days = attributes[:'standby_maintenance_buffer_in_days'] if attributes[:'standby_maintenance_buffer_in_days'] end |
Instance Attribute Details
#cloud_autonomous_vm_cluster_id ⇒ String
[Required] The OCID of the cloud Autonomous VM Cluster for the peer shard.
18 19 20 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 18 def cloud_autonomous_vm_cluster_id @cloud_autonomous_vm_cluster_id end |
#fast_start_fail_over_lag_limit_in_seconds ⇒ Integer
The lag time preference based on data loss tolerance in seconds.
26 27 28 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 26 def fast_start_fail_over_lag_limit_in_seconds @fast_start_fail_over_lag_limit_in_seconds end |
#is_automatic_failover_enabled ⇒ BOOLEAN
This field is deprecated. Support for this field will be removed after one year of deprecation cycle.
31 32 33 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 31 def is_automatic_failover_enabled @is_automatic_failover_enabled end |
#protection_mode ⇒ String
The protectionMode for the shard peer.
22 23 24 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 22 def protection_mode @protection_mode end |
#standby_maintenance_buffer_in_days ⇒ Integer
The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. This value represents the number of days before schedlued maintenance of the primary database.
37 38 39 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 37 def standby_maintenance_buffer_in_days @standby_maintenance_buffer_in_days end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 40 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'cloud_autonomous_vm_cluster_id': :'cloudAutonomousVmClusterId', 'protection_mode': :'protectionMode', 'fast_start_fail_over_lag_limit_in_seconds': :'fastStartFailOverLagLimitInSeconds', 'is_automatic_failover_enabled': :'isAutomaticFailoverEnabled', 'standby_maintenance_buffer_in_days': :'standbyMaintenanceBufferInDays' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 53 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'cloud_autonomous_vm_cluster_id': :'String', 'protection_mode': :'String', 'fast_start_fail_over_lag_limit_in_seconds': :'Integer', 'is_automatic_failover_enabled': :'BOOLEAN', 'standby_maintenance_buffer_in_days': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
128 129 130 131 132 133 134 135 136 137 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 128 def ==(other) return true if equal?(other) self.class == other.class && cloud_autonomous_vm_cluster_id == other.cloud_autonomous_vm_cluster_id && protection_mode == other.protection_mode && fast_start_fail_over_lag_limit_in_seconds == other.fast_start_fail_over_lag_limit_in_seconds && is_automatic_failover_enabled == other.is_automatic_failover_enabled && standby_maintenance_buffer_in_days == other.standby_maintenance_buffer_in_days end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 162 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
142 143 144 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 142 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
151 152 153 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 151 def hash [cloud_autonomous_vm_cluster_id, protection_mode, fast_start_fail_over_lag_limit_in_seconds, is_automatic_failover_enabled, standby_maintenance_buffer_in_days].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
195 196 197 198 199 200 201 202 203 204 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 195 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
189 190 191 |
# File 'lib/oci/distributed_database/models/create_shard_peer_with_dedicated_infra_details.rb', line 189 def to_s to_hash.to_s end |