Class: OCI::CloudBridge::Models::VmwareVmProperties
- Inherits:
-
Object
- Object
- OCI::CloudBridge::Models::VmwareVmProperties
- Defined in:
- lib/oci/cloud_bridge/models/vmware_vm_properties.rb
Overview
VMware virtual machine related properties.
Instance Attribute Summary collapse
-
#cluster ⇒ String
Cluster name.
-
#customer_fields ⇒ Array<String>
Customer fields.
-
#customer_tags ⇒ Array<OCI::CloudBridge::Models::CustomerTag>
Customer defined tags.
-
#fault_tolerance_bandwidth ⇒ Integer
Fault tolerance bandwidth.
-
#fault_tolerance_secondary_latency ⇒ Integer
Fault tolerance to secondary latency.
-
#fault_tolerance_state ⇒ String
Fault tolerance state.
-
#instance_uuid ⇒ String
vCenter-specific identifier of the virtual machine.
-
#is_disks_cbt_enabled ⇒ BOOLEAN
Indicates that change tracking is supported for virtual disks of this virtual machine.
-
#is_disks_uuid_enabled ⇒ BOOLEAN
Whether changed block tracking for this VM's disk is active.
-
#path ⇒ String
Path directory of the asset.
-
#vmware_tools_status ⇒ String
VMware tools status.
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 = {}) ⇒ VmwareVmProperties
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 = {}) ⇒ VmwareVmProperties
Initializes the object
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 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 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 112 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.cluster = attributes[:'cluster'] if attributes[:'cluster'] self.customer_fields = attributes[:'customerFields'] if attributes[:'customerFields'] raise 'You cannot provide both :customerFields and :customer_fields' if attributes.key?(:'customerFields') && attributes.key?(:'customer_fields') self.customer_fields = attributes[:'customer_fields'] if attributes[:'customer_fields'] self. = attributes[:'customerTags'] if attributes[:'customerTags'] raise 'You cannot provide both :customerTags and :customer_tags' if attributes.key?(:'customerTags') && attributes.key?(:'customer_tags') self. = attributes[:'customer_tags'] if attributes[:'customer_tags'] self.instance_uuid = attributes[:'instanceUuid'] if attributes[:'instanceUuid'] raise 'You cannot provide both :instanceUuid and :instance_uuid' if attributes.key?(:'instanceUuid') && attributes.key?(:'instance_uuid') self.instance_uuid = attributes[:'instance_uuid'] if attributes[:'instance_uuid'] self.path = attributes[:'path'] if attributes[:'path'] self.vmware_tools_status = attributes[:'vmwareToolsStatus'] if attributes[:'vmwareToolsStatus'] raise 'You cannot provide both :vmwareToolsStatus and :vmware_tools_status' if attributes.key?(:'vmwareToolsStatus') && attributes.key?(:'vmware_tools_status') self.vmware_tools_status = attributes[:'vmware_tools_status'] if attributes[:'vmware_tools_status'] self.is_disks_uuid_enabled = attributes[:'isDisksUuidEnabled'] unless attributes[:'isDisksUuidEnabled'].nil? raise 'You cannot provide both :isDisksUuidEnabled and :is_disks_uuid_enabled' if attributes.key?(:'isDisksUuidEnabled') && attributes.key?(:'is_disks_uuid_enabled') self.is_disks_uuid_enabled = attributes[:'is_disks_uuid_enabled'] unless attributes[:'is_disks_uuid_enabled'].nil? self.is_disks_cbt_enabled = attributes[:'isDisksCbtEnabled'] unless attributes[:'isDisksCbtEnabled'].nil? raise 'You cannot provide both :isDisksCbtEnabled and :is_disks_cbt_enabled' if attributes.key?(:'isDisksCbtEnabled') && attributes.key?(:'is_disks_cbt_enabled') self.is_disks_cbt_enabled = attributes[:'is_disks_cbt_enabled'] unless attributes[:'is_disks_cbt_enabled'].nil? self.fault_tolerance_state = attributes[:'faultToleranceState'] if attributes[:'faultToleranceState'] raise 'You cannot provide both :faultToleranceState and :fault_tolerance_state' if attributes.key?(:'faultToleranceState') && attributes.key?(:'fault_tolerance_state') self.fault_tolerance_state = attributes[:'fault_tolerance_state'] if attributes[:'fault_tolerance_state'] self.fault_tolerance_bandwidth = attributes[:'faultToleranceBandwidth'] if attributes[:'faultToleranceBandwidth'] raise 'You cannot provide both :faultToleranceBandwidth and :fault_tolerance_bandwidth' if attributes.key?(:'faultToleranceBandwidth') && attributes.key?(:'fault_tolerance_bandwidth') self.fault_tolerance_bandwidth = attributes[:'fault_tolerance_bandwidth'] if attributes[:'fault_tolerance_bandwidth'] self.fault_tolerance_secondary_latency = attributes[:'faultToleranceSecondaryLatency'] if attributes[:'faultToleranceSecondaryLatency'] raise 'You cannot provide both :faultToleranceSecondaryLatency and :fault_tolerance_secondary_latency' if attributes.key?(:'faultToleranceSecondaryLatency') && attributes.key?(:'fault_tolerance_secondary_latency') self.fault_tolerance_secondary_latency = attributes[:'fault_tolerance_secondary_latency'] if attributes[:'fault_tolerance_secondary_latency'] end |
Instance Attribute Details
#cluster ⇒ String
Cluster name.
13 14 15 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 13 def cluster @cluster end |
#customer_fields ⇒ Array<String>
Customer fields.
17 18 19 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 17 def customer_fields @customer_fields end |
#customer_tags ⇒ Array<OCI::CloudBridge::Models::CustomerTag>
Customer defined tags.
21 22 23 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 21 def @customer_tags end |
#fault_tolerance_bandwidth ⇒ Integer
Fault tolerance bandwidth.
51 52 53 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 51 def fault_tolerance_bandwidth @fault_tolerance_bandwidth end |
#fault_tolerance_secondary_latency ⇒ Integer
Fault tolerance to secondary latency.
55 56 57 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 55 def fault_tolerance_secondary_latency @fault_tolerance_secondary_latency end |
#fault_tolerance_state ⇒ String
Fault tolerance state.
47 48 49 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 47 def fault_tolerance_state @fault_tolerance_state end |
#instance_uuid ⇒ String
vCenter-specific identifier of the virtual machine.
25 26 27 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 25 def instance_uuid @instance_uuid end |
#is_disks_cbt_enabled ⇒ BOOLEAN
Indicates that change tracking is supported for virtual disks of this virtual machine. However, even if change tracking is supported, it might not be available for all disks of the virtual machine.
43 44 45 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 43 def is_disks_cbt_enabled @is_disks_cbt_enabled end |
#is_disks_uuid_enabled ⇒ BOOLEAN
Whether changed block tracking for this VM's disk is active.
37 38 39 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 37 def is_disks_uuid_enabled @is_disks_uuid_enabled end |
#path ⇒ String
Path directory of the asset.
29 30 31 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 29 def path @path end |
#vmware_tools_status ⇒ String
VMware tools status.
33 34 35 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 33 def vmware_tools_status @vmware_tools_status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 58 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'cluster': :'cluster', 'customer_fields': :'customerFields', 'customer_tags': :'customerTags', 'instance_uuid': :'instanceUuid', 'path': :'path', 'vmware_tools_status': :'vmwareToolsStatus', 'is_disks_uuid_enabled': :'isDisksUuidEnabled', 'is_disks_cbt_enabled': :'isDisksCbtEnabled', 'fault_tolerance_state': :'faultToleranceState', 'fault_tolerance_bandwidth': :'faultToleranceBandwidth', 'fault_tolerance_secondary_latency': :'faultToleranceSecondaryLatency' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 77 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'cluster': :'String', 'customer_fields': :'Array<String>', 'customer_tags': :'Array<OCI::CloudBridge::Models::CustomerTag>', 'instance_uuid': :'String', 'path': :'String', 'vmware_tools_status': :'String', 'is_disks_uuid_enabled': :'BOOLEAN', 'is_disks_cbt_enabled': :'BOOLEAN', 'fault_tolerance_state': :'String', 'fault_tolerance_bandwidth': :'Integer', 'fault_tolerance_secondary_latency': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 184 def ==(other) return true if equal?(other) self.class == other.class && cluster == other.cluster && customer_fields == other.customer_fields && == other. && instance_uuid == other.instance_uuid && path == other.path && vmware_tools_status == other.vmware_tools_status && is_disks_uuid_enabled == other.is_disks_uuid_enabled && is_disks_cbt_enabled == other.is_disks_cbt_enabled && fault_tolerance_state == other.fault_tolerance_state && fault_tolerance_bandwidth == other.fault_tolerance_bandwidth && fault_tolerance_secondary_latency == other.fault_tolerance_secondary_latency end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 224 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
204 205 206 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 204 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
213 214 215 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 213 def hash [cluster, customer_fields, , instance_uuid, path, vmware_tools_status, is_disks_uuid_enabled, is_disks_cbt_enabled, fault_tolerance_state, fault_tolerance_bandwidth, fault_tolerance_secondary_latency].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
257 258 259 260 261 262 263 264 265 266 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 257 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
251 252 253 |
# File 'lib/oci/cloud_bridge/models/vmware_vm_properties.rb', line 251 def to_s to_hash.to_s end |