Class: OCI::GoldenGate::Models::DeploymentPeerSummary
- Inherits:
-
Object
- Object
- OCI::GoldenGate::Models::DeploymentPeerSummary
- Defined in:
- lib/oci/golden_gate/models/deployment_peer_summary.rb
Overview
The summary of the deployment Peer.
Constant Summary collapse
- PEER_TYPE_ENUM =
[ PEER_TYPE_LOCAL = 'LOCAL'.freeze, PEER_TYPE_REMOTE = 'REMOTE'.freeze, PEER_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PEER_ROLE_ENUM =
[ PEER_ROLE_PRIMARY = 'PRIMARY'.freeze, PEER_ROLE_STANDBY = 'STANDBY'.freeze, PEER_ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#availability_domain ⇒ String
[Required] The availability domain of a placement.
-
#deployment_id ⇒ String
[Required] The OCID of the deployment being referenced.
-
#display_name ⇒ String
[Required] An object's Display Name.
-
#fault_domain ⇒ String
[Required] The fault domain of a placement.
-
#lifecycle_state ⇒ String
[Required] Possible lifecycle states for deployment peer.
-
#peer_role ⇒ String
[Required] The type of the deployment role.
-
#peer_type ⇒ String
[Required] The type of the deployment peer.
-
#region ⇒ String
[Required] The name of the region.
-
#time_created ⇒ DateTime
[Required] The time the resource was created.
-
#time_role_changed ⇒ DateTime
[Required] The time of the last role change.
-
#time_updated ⇒ DateTime
[Required] The time the resource was last updated.
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 = {}) ⇒ DeploymentPeerSummary
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 = {}) ⇒ DeploymentPeerSummary
Initializes the object
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 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 145 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.deployment_id = attributes[:'deploymentId'] if attributes[:'deploymentId'] raise 'You cannot provide both :deploymentId and :deployment_id' if attributes.key?(:'deploymentId') && attributes.key?(:'deployment_id') self.deployment_id = attributes[:'deployment_id'] if attributes[:'deployment_id'] self.region = attributes[:'region'] if attributes[:'region'] 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'] self.fault_domain = attributes[:'faultDomain'] if attributes[:'faultDomain'] raise 'You cannot provide both :faultDomain and :fault_domain' if attributes.key?(:'faultDomain') && attributes.key?(:'fault_domain') self.fault_domain = attributes[:'fault_domain'] if attributes[:'fault_domain'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.peer_type = attributes[:'peerType'] if attributes[:'peerType'] raise 'You cannot provide both :peerType and :peer_type' if attributes.key?(:'peerType') && attributes.key?(:'peer_type') self.peer_type = attributes[:'peer_type'] if attributes[:'peer_type'] self.peer_role = attributes[:'peerRole'] if attributes[:'peerRole'] raise 'You cannot provide both :peerRole and :peer_role' if attributes.key?(:'peerRole') && attributes.key?(:'peer_role') self.peer_role = attributes[:'peer_role'] if attributes[:'peer_role'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.time_role_changed = attributes[:'timeRoleChanged'] if attributes[:'timeRoleChanged'] raise 'You cannot provide both :timeRoleChanged and :time_role_changed' if attributes.key?(:'timeRoleChanged') && attributes.key?(:'time_role_changed') self.time_role_changed = attributes[:'time_role_changed'] if attributes[:'time_role_changed'] 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'] end |
Instance Attribute Details
#availability_domain ⇒ String
[Required] The availability domain of a placement.
47 48 49 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 47 def availability_domain @availability_domain end |
#deployment_id ⇒ String
[Required] The OCID of the deployment being referenced.
37 38 39 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 37 def deployment_id @deployment_id end |
#display_name ⇒ String
[Required] An object's Display Name.
56 57 58 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 56 def display_name @display_name end |
#fault_domain ⇒ String
[Required] The fault domain of a placement.
51 52 53 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 51 def fault_domain @fault_domain end |
#lifecycle_state ⇒ String
[Required] Possible lifecycle states for deployment peer.
88 89 90 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 88 def lifecycle_state @lifecycle_state end |
#peer_role ⇒ String
[Required] The type of the deployment role.
66 67 68 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 66 def peer_role @peer_role end |
#peer_type ⇒ String
[Required] The type of the deployment peer.
61 62 63 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 61 def peer_type @peer_type end |
#region ⇒ String
[Required] The name of the region. e.g.: us-ashburn-1 If the region is not provided, backend will default to the default region.
43 44 45 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 43 def region @region end |
#time_created ⇒ DateTime
[Required] The time the resource was created. The format is defined by RFC3339, such as 2016-08-25T21:10:29.600Z
.
72 73 74 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 72 def time_created @time_created end |
#time_role_changed ⇒ DateTime
[Required] The time of the last role change. The format is defined by RFC3339, such as 2016-08-25T21:10:29.600Z
.
84 85 86 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 84 def time_role_changed @time_role_changed end |
#time_updated ⇒ DateTime
[Required] The time the resource was last updated. The format is defined by RFC3339, such as 2016-08-25T21:10:29.600Z
.
78 79 80 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 78 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 91 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'deployment_id': :'deploymentId', 'region': :'region', 'availability_domain': :'availabilityDomain', 'fault_domain': :'faultDomain', 'display_name': :'displayName', 'peer_type': :'peerType', 'peer_role': :'peerRole', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'time_role_changed': :'timeRoleChanged', 'lifecycle_state': :'lifecycleState' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 110 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'deployment_id': :'String', 'region': :'String', 'availability_domain': :'String', 'fault_domain': :'String', 'display_name': :'String', 'peer_type': :'String', 'peer_role': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'time_role_changed': :'DateTime', 'lifecycle_state': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 260 def ==(other) return true if equal?(other) self.class == other.class && deployment_id == other.deployment_id && region == other.region && availability_domain == other.availability_domain && fault_domain == other.fault_domain && display_name == other.display_name && peer_type == other.peer_type && peer_role == other.peer_role && time_created == other.time_created && time_updated == other.time_updated && time_role_changed == other.time_role_changed && lifecycle_state == other.lifecycle_state end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 300 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
280 281 282 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 280 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
289 290 291 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 289 def hash [deployment_id, region, availability_domain, fault_domain, display_name, peer_type, peer_role, time_created, time_updated, time_role_changed, lifecycle_state].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
333 334 335 336 337 338 339 340 341 342 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 333 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
327 328 329 |
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 327 def to_s to_hash.to_s end |