Class: OCI::CloudMigrations::Models::VmTargetEnvironment
- Inherits:
-
TargetEnvironment
- Object
- TargetEnvironment
- OCI::CloudMigrations::Models::VmTargetEnvironment
- Defined in:
- lib/oci/cloud_migrations/models/vm_target_environment.rb
Overview
Description of the VM target environment.
Constant Summary
Constants inherited from TargetEnvironment
TargetEnvironment::TARGET_ENVIRONMENT_TYPE_ENUM
Instance Attribute Summary collapse
-
#availability_domain ⇒ String
Availability Domain of the VM configuration.
-
#dedicated_vm_host ⇒ String
OCID of the dedicated VM configuration host.
-
#fault_domain ⇒ String
Fault domain of the VM configuration.
-
#ms_license ⇒ String
Microsoft license for the VM configuration.
-
#preferred_shape_type ⇒ String
Preferred VM shape type provided by the customer.
-
#subnet ⇒ String
[Required] OCID of the VM configuration subnet.
-
#vcn ⇒ String
[Required] OCID of the VM configuration VCN.
Attributes inherited from TargetEnvironment
#target_compartment_id, #target_environment_type
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 = {}) ⇒ VmTargetEnvironment
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 TargetEnvironment
Constructor Details
#initialize(attributes = {}) ⇒ VmTargetEnvironment
Initializes the object
88 89 90 91 92 93 94 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 131 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 88 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['targetEnvironmentType'] = 'VM_TARGET_ENV' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 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.vcn = attributes[:'vcn'] if attributes[:'vcn'] self.subnet = attributes[:'subnet'] if attributes[:'subnet'] self.dedicated_vm_host = attributes[:'dedicatedVmHost'] if attributes[:'dedicatedVmHost'] raise 'You cannot provide both :dedicatedVmHost and :dedicated_vm_host' if attributes.key?(:'dedicatedVmHost') && attributes.key?(:'dedicated_vm_host') self.dedicated_vm_host = attributes[:'dedicated_vm_host'] if attributes[:'dedicated_vm_host'] self.ms_license = attributes[:'msLicense'] if attributes[:'msLicense'] raise 'You cannot provide both :msLicense and :ms_license' if attributes.key?(:'msLicense') && attributes.key?(:'ms_license') self.ms_license = attributes[:'ms_license'] if attributes[:'ms_license'] self.preferred_shape_type = attributes[:'preferredShapeType'] if attributes[:'preferredShapeType'] raise 'You cannot provide both :preferredShapeType and :preferred_shape_type' if attributes.key?(:'preferredShapeType') && attributes.key?(:'preferred_shape_type') self.preferred_shape_type = attributes[:'preferred_shape_type'] if attributes[:'preferred_shape_type'] end |
Instance Attribute Details
#availability_domain ⇒ String
Availability Domain of the VM configuration.
14 15 16 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 14 def availability_domain @availability_domain end |
#dedicated_vm_host ⇒ String
OCID of the dedicated VM configuration host.
30 31 32 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 30 def dedicated_vm_host @dedicated_vm_host end |
#fault_domain ⇒ String
Fault domain of the VM configuration.
18 19 20 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 18 def fault_domain @fault_domain end |
#ms_license ⇒ String
Microsoft license for the VM configuration.
34 35 36 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 34 def ms_license @ms_license end |
#preferred_shape_type ⇒ String
Preferred VM shape type provided by the customer.
38 39 40 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 38 def preferred_shape_type @preferred_shape_type end |
#subnet ⇒ String
[Required] OCID of the VM configuration subnet.
26 27 28 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 26 def subnet @subnet end |
#vcn ⇒ String
[Required] OCID of the VM configuration VCN.
22 23 24 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 22 def vcn @vcn end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 41 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'target_compartment_id': :'targetCompartmentId', 'target_environment_type': :'targetEnvironmentType', 'availability_domain': :'availabilityDomain', 'fault_domain': :'faultDomain', 'vcn': :'vcn', 'subnet': :'subnet', 'dedicated_vm_host': :'dedicatedVmHost', 'ms_license': :'msLicense', 'preferred_shape_type': :'preferredShapeType' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 58 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'target_compartment_id': :'String', 'target_environment_type': :'String', 'availability_domain': :'String', 'fault_domain': :'String', 'vcn': :'String', 'subnet': :'String', 'dedicated_vm_host': :'String', 'ms_license': :'String', 'preferred_shape_type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 140 def ==(other) return true if equal?(other) self.class == other.class && target_compartment_id == other.target_compartment_id && target_environment_type == other.target_environment_type && availability_domain == other.availability_domain && fault_domain == other.fault_domain && vcn == other.vcn && subnet == other.subnet && dedicated_vm_host == other.dedicated_vm_host && ms_license == other.ms_license && preferred_shape_type == other.preferred_shape_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 178 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
158 159 160 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 158 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
167 168 169 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 167 def hash [target_compartment_id, target_environment_type, availability_domain, fault_domain, vcn, subnet, dedicated_vm_host, ms_license, preferred_shape_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 211 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
205 206 207 |
# File 'lib/oci/cloud_migrations/models/vm_target_environment.rb', line 205 def to_s to_hash.to_s end |