Class: OCI::DisasterRecovery::Models::UpdateDrProtectionGroupMemberComputeInstanceMovableDetails
- Inherits:
-
UpdateDrProtectionGroupMemberDetails
- Object
- UpdateDrProtectionGroupMemberDetails
- OCI::DisasterRecovery::Models::UpdateDrProtectionGroupMemberComputeInstanceMovableDetails
- Defined in:
- lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb
Overview
Update properties for a movable compute instance member.
Constant Summary
Constants inherited from UpdateDrProtectionGroupMemberDetails
OCI::DisasterRecovery::Models::UpdateDrProtectionGroupMemberDetails::MEMBER_TYPE_ENUM
Instance Attribute Summary collapse
-
#destination_capacity_reservation_id ⇒ String
The OCID of a capacity reservation in the destination region which will be used to launch the compute instance.
-
#destination_compartment_id ⇒ String
The OCID of a compartment in the destination region in which the compute instance should be launched.
-
#destination_dedicated_vm_host_id ⇒ String
The OCID of a dedicated VM host in the destination region where the compute instance should be launched.
-
#file_system_operations ⇒ Array<OCI::DisasterRecovery::Models::UpdateComputeInstanceMovableFileSystemOperationDetails>
A list of operations performed on file systems used by the compute instance.
-
#is_retain_fault_domain ⇒ BOOLEAN
A flag indicating if the compute instance should be moved to the same fault domain in the destination region.
-
#vnic_mappings ⇒ Array<OCI::DisasterRecovery::Models::ComputeInstanceMovableVnicMappingDetails>
A list of compute instance VNIC mappings.
Attributes inherited from UpdateDrProtectionGroupMemberDetails
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 = {}) ⇒ UpdateDrProtectionGroupMemberComputeInstanceMovableDetails
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 UpdateDrProtectionGroupMemberDetails
Constructor Details
#initialize(attributes = {}) ⇒ UpdateDrProtectionGroupMemberComputeInstanceMovableDetails
Initializes the object
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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 100 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['memberType'] = 'COMPUTE_INSTANCE_MOVABLE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.is_retain_fault_domain = attributes[:'isRetainFaultDomain'] unless attributes[:'isRetainFaultDomain'].nil? self.is_retain_fault_domain = false if is_retain_fault_domain.nil? && !attributes.key?(:'isRetainFaultDomain') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isRetainFaultDomain and :is_retain_fault_domain' if attributes.key?(:'isRetainFaultDomain') && attributes.key?(:'is_retain_fault_domain') self.is_retain_fault_domain = attributes[:'is_retain_fault_domain'] unless attributes[:'is_retain_fault_domain'].nil? self.is_retain_fault_domain = false if is_retain_fault_domain.nil? && !attributes.key?(:'isRetainFaultDomain') && !attributes.key?(:'is_retain_fault_domain') # rubocop:disable Style/StringLiterals self.destination_capacity_reservation_id = attributes[:'destinationCapacityReservationId'] if attributes[:'destinationCapacityReservationId'] raise 'You cannot provide both :destinationCapacityReservationId and :destination_capacity_reservation_id' if attributes.key?(:'destinationCapacityReservationId') && attributes.key?(:'destination_capacity_reservation_id') self.destination_capacity_reservation_id = attributes[:'destination_capacity_reservation_id'] if attributes[:'destination_capacity_reservation_id'] self.vnic_mappings = attributes[:'vnicMappings'] if attributes[:'vnicMappings'] raise 'You cannot provide both :vnicMappings and :vnic_mappings' if attributes.key?(:'vnicMappings') && attributes.key?(:'vnic_mappings') self.vnic_mappings = attributes[:'vnic_mappings'] if attributes[:'vnic_mappings'] self.destination_compartment_id = attributes[:'destinationCompartmentId'] if attributes[:'destinationCompartmentId'] raise 'You cannot provide both :destinationCompartmentId and :destination_compartment_id' if attributes.key?(:'destinationCompartmentId') && attributes.key?(:'destination_compartment_id') self.destination_compartment_id = attributes[:'destination_compartment_id'] if attributes[:'destination_compartment_id'] self.destination_dedicated_vm_host_id = attributes[:'destinationDedicatedVmHostId'] if attributes[:'destinationDedicatedVmHostId'] raise 'You cannot provide both :destinationDedicatedVmHostId and :destination_dedicated_vm_host_id' if attributes.key?(:'destinationDedicatedVmHostId') && attributes.key?(:'destination_dedicated_vm_host_id') self.destination_dedicated_vm_host_id = attributes[:'destination_dedicated_vm_host_id'] if attributes[:'destination_dedicated_vm_host_id'] self.file_system_operations = attributes[:'fileSystemOperations'] if attributes[:'fileSystemOperations'] raise 'You cannot provide both :fileSystemOperations and :file_system_operations' if attributes.key?(:'fileSystemOperations') && attributes.key?(:'file_system_operations') self.file_system_operations = attributes[:'file_system_operations'] if attributes[:'file_system_operations'] end |
Instance Attribute Details
#destination_capacity_reservation_id ⇒ String
The OCID of a capacity reservation in the destination region which will be used to launch the compute instance.
Example: ocid1.capacityreservation.oc1..uniqueID
27 28 29 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 27 def destination_capacity_reservation_id @destination_capacity_reservation_id end |
#destination_compartment_id ⇒ String
The OCID of a compartment in the destination region in which the compute instance should be launched.
Example: ocid1.compartment.oc1..uniqueID
40 41 42 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 40 def destination_compartment_id @destination_compartment_id end |
#destination_dedicated_vm_host_id ⇒ String
The OCID of a dedicated VM host in the destination region where the compute instance should be launched.
Example: ocid1.dedicatedvmhost.oc1..uniqueID
48 49 50 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 48 def destination_dedicated_vm_host_id @destination_dedicated_vm_host_id end |
#file_system_operations ⇒ Array<OCI::DisasterRecovery::Models::UpdateComputeInstanceMovableFileSystemOperationDetails>
A list of operations performed on file systems used by the compute instance.
53 54 55 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 53 def file_system_operations @file_system_operations end |
#is_retain_fault_domain ⇒ BOOLEAN
A flag indicating if the compute instance should be moved to the same fault domain in the destination region. The compute instance launch will fail if this flag is set to true and capacity is not available in the specified fault domain in the destination region.
Example: false
19 20 21 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 19 def is_retain_fault_domain @is_retain_fault_domain end |
#vnic_mappings ⇒ Array<OCI::DisasterRecovery::Models::ComputeInstanceMovableVnicMappingDetails>
A list of compute instance VNIC mappings.
32 33 34 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 32 def vnic_mappings @vnic_mappings end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'member_id': :'memberId', 'member_type': :'memberType', 'is_retain_fault_domain': :'isRetainFaultDomain', 'destination_capacity_reservation_id': :'destinationCapacityReservationId', 'vnic_mappings': :'vnicMappings', 'destination_compartment_id': :'destinationCompartmentId', 'destination_dedicated_vm_host_id': :'destinationDedicatedVmHostId', 'file_system_operations': :'fileSystemOperations' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 72 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'member_id': :'String', 'member_type': :'String', 'is_retain_fault_domain': :'BOOLEAN', 'destination_capacity_reservation_id': :'String', 'vnic_mappings': :'Array<OCI::DisasterRecovery::Models::ComputeInstanceMovableVnicMappingDetails>', 'destination_compartment_id': :'String', 'destination_dedicated_vm_host_id': :'String', 'file_system_operations': :'Array<OCI::DisasterRecovery::Models::UpdateComputeInstanceMovableFileSystemOperationDetails>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 156 def ==(other) return true if equal?(other) self.class == other.class && member_id == other.member_id && member_type == other.member_type && is_retain_fault_domain == other.is_retain_fault_domain && destination_capacity_reservation_id == other.destination_capacity_reservation_id && vnic_mappings == other.vnic_mappings && destination_compartment_id == other.destination_compartment_id && destination_dedicated_vm_host_id == other.destination_dedicated_vm_host_id && file_system_operations == other.file_system_operations end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 193 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
173 174 175 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 173 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
182 183 184 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 182 def hash [member_id, member_type, is_retain_fault_domain, destination_capacity_reservation_id, vnic_mappings, destination_compartment_id, destination_dedicated_vm_host_id, file_system_operations].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
226 227 228 229 230 231 232 233 234 235 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 226 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
220 221 222 |
# File 'lib/oci/disaster_recovery/models/update_dr_protection_group_member_compute_instance_movable_details.rb', line 220 def to_s to_hash.to_s end |