Class: OCI::Opsi::Models::HostConfigurationSummary
- Inherits:
-
Object
- Object
- OCI::Opsi::Models::HostConfigurationSummary
- Defined in:
- lib/oci/opsi/models/host_configuration_summary.rb
Overview
Summary of a host configuration for a resource. This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
Direct Known Subclasses
EmManagedExternalHostConfigurationSummary, MacsManagedCloudHostConfigurationSummary, MacsManagedExternalHostConfigurationSummary, PeComanagedHostConfigurationSummary
Constant Summary collapse
- ENTITY_SOURCE_ENUM =
[ ENTITY_SOURCE_MACS_MANAGED_EXTERNAL_HOST = 'MACS_MANAGED_EXTERNAL_HOST'.freeze, ENTITY_SOURCE_EM_MANAGED_EXTERNAL_HOST = 'EM_MANAGED_EXTERNAL_HOST'.freeze, ENTITY_SOURCE_MACS_MANAGED_CLOUD_HOST = 'MACS_MANAGED_CLOUD_HOST'.freeze, ENTITY_SOURCE_PE_COMANAGED_HOST = 'PE_COMANAGED_HOST'.freeze, ENTITY_SOURCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PLATFORM_TYPE_ENUM =
[ PLATFORM_TYPE_LINUX = 'LINUX'.freeze, PLATFORM_TYPE_SOLARIS = 'SOLARIS'.freeze, PLATFORM_TYPE_SUNOS = 'SUNOS'.freeze, PLATFORM_TYPE_ZLINUX = 'ZLINUX'.freeze, PLATFORM_TYPE_WINDOWS = 'WINDOWS'.freeze, PLATFORM_TYPE_AIX = 'AIX'.freeze, PLATFORM_TYPE_HP_UX = 'HP_UX'.freeze, PLATFORM_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment.
-
#cores_per_socket ⇒ Integer
[Required] Number of cores per socket.
-
#cpu_architecture ⇒ String
[Required] CPU architechure.
-
#cpu_cache_in_mbs ⇒ Float
[Required] Size of cache memory in megabytes.
-
#cpu_frequency_in_mhz ⇒ Float
[Required] Clock frequency of the processor in megahertz.
-
#cpu_implementation ⇒ String
[Required] Model name of processor.
-
#cpu_vendor ⇒ String
[Required] Name of the CPU vendor.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource.
-
#entity_source ⇒ String
[Required] Source of the host entity.
-
#freeform_tags ⇒ Hash<String, String>
[Required] Simple key-value pair that is applied without any predefined name, type or scope.
-
#host_insight_id ⇒ String
[Required] The OCID of the host insight resource.
-
#host_name ⇒ String
[Required] The host name.
-
#is_hyper_threading_enabled ⇒ BOOLEAN
[Required] Indicates if hyper-threading is enabled or not.
-
#platform_type ⇒ String
[Required] Platform type.
-
#platform_vendor ⇒ String
[Required] Platform vendor.
-
#platform_version ⇒ String
[Required] Platform version.
-
#threads_per_socket ⇒ Integer
[Required] Number of threads per socket.
-
#total_cpus ⇒ Integer
[Required] Total CPU on this host.
-
#total_memory_in_gbs ⇒ Float
[Required] Total amount of usable physical memory in gibabytes.
-
#total_sockets ⇒ Integer
[Required] Number of total sockets.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
.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 = {}) ⇒ HostConfigurationSummary
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 = {}) ⇒ HostConfigurationSummary
Initializes the object
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 226 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.host_insight_id = attributes[:'hostInsightId'] if attributes[:'hostInsightId'] raise 'You cannot provide both :hostInsightId and :host_insight_id' if attributes.key?(:'hostInsightId') && attributes.key?(:'host_insight_id') self.host_insight_id = attributes[:'host_insight_id'] if attributes[:'host_insight_id'] self.entity_source = attributes[:'entitySource'] if attributes[:'entitySource'] raise 'You cannot provide both :entitySource and :entity_source' if attributes.key?(:'entitySource') && attributes.key?(:'entity_source') self.entity_source = attributes[:'entity_source'] if attributes[:'entity_source'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.host_name = attributes[:'hostName'] if attributes[:'hostName'] raise 'You cannot provide both :hostName and :host_name' if attributes.key?(:'hostName') && attributes.key?(:'host_name') self.host_name = attributes[:'host_name'] if attributes[:'host_name'] self.platform_type = attributes[:'platformType'] if attributes[:'platformType'] raise 'You cannot provide both :platformType and :platform_type' if attributes.key?(:'platformType') && attributes.key?(:'platform_type') self.platform_type = attributes[:'platform_type'] if attributes[:'platform_type'] self.platform_version = attributes[:'platformVersion'] if attributes[:'platformVersion'] raise 'You cannot provide both :platformVersion and :platform_version' if attributes.key?(:'platformVersion') && attributes.key?(:'platform_version') self.platform_version = attributes[:'platform_version'] if attributes[:'platform_version'] self.platform_vendor = attributes[:'platformVendor'] if attributes[:'platformVendor'] raise 'You cannot provide both :platformVendor and :platform_vendor' if attributes.key?(:'platformVendor') && attributes.key?(:'platform_vendor') self.platform_vendor = attributes[:'platform_vendor'] if attributes[:'platform_vendor'] self.total_cpus = attributes[:'totalCpus'] if attributes[:'totalCpus'] raise 'You cannot provide both :totalCpus and :total_cpus' if attributes.key?(:'totalCpus') && attributes.key?(:'total_cpus') self.total_cpus = attributes[:'total_cpus'] if attributes[:'total_cpus'] self.total_memory_in_gbs = attributes[:'totalMemoryInGBs'] if attributes[:'totalMemoryInGBs'] raise 'You cannot provide both :totalMemoryInGBs and :total_memory_in_gbs' if attributes.key?(:'totalMemoryInGBs') && attributes.key?(:'total_memory_in_gbs') self.total_memory_in_gbs = attributes[:'total_memory_in_gbs'] if attributes[:'total_memory_in_gbs'] self.cpu_architecture = attributes[:'cpuArchitecture'] if attributes[:'cpuArchitecture'] raise 'You cannot provide both :cpuArchitecture and :cpu_architecture' if attributes.key?(:'cpuArchitecture') && attributes.key?(:'cpu_architecture') self.cpu_architecture = attributes[:'cpu_architecture'] if attributes[:'cpu_architecture'] self.cpu_cache_in_mbs = attributes[:'cpuCacheInMBs'] if attributes[:'cpuCacheInMBs'] raise 'You cannot provide both :cpuCacheInMBs and :cpu_cache_in_mbs' if attributes.key?(:'cpuCacheInMBs') && attributes.key?(:'cpu_cache_in_mbs') self.cpu_cache_in_mbs = attributes[:'cpu_cache_in_mbs'] if attributes[:'cpu_cache_in_mbs'] self.cpu_vendor = attributes[:'cpuVendor'] if attributes[:'cpuVendor'] raise 'You cannot provide both :cpuVendor and :cpu_vendor' if attributes.key?(:'cpuVendor') && attributes.key?(:'cpu_vendor') self.cpu_vendor = attributes[:'cpu_vendor'] if attributes[:'cpu_vendor'] self.cpu_frequency_in_mhz = attributes[:'cpuFrequencyInMhz'] if attributes[:'cpuFrequencyInMhz'] raise 'You cannot provide both :cpuFrequencyInMhz and :cpu_frequency_in_mhz' if attributes.key?(:'cpuFrequencyInMhz') && attributes.key?(:'cpu_frequency_in_mhz') self.cpu_frequency_in_mhz = attributes[:'cpu_frequency_in_mhz'] if attributes[:'cpu_frequency_in_mhz'] self.cpu_implementation = attributes[:'cpuImplementation'] if attributes[:'cpuImplementation'] raise 'You cannot provide both :cpuImplementation and :cpu_implementation' if attributes.key?(:'cpuImplementation') && attributes.key?(:'cpu_implementation') self.cpu_implementation = attributes[:'cpu_implementation'] if attributes[:'cpu_implementation'] self.cores_per_socket = attributes[:'coresPerSocket'] if attributes[:'coresPerSocket'] raise 'You cannot provide both :coresPerSocket and :cores_per_socket' if attributes.key?(:'coresPerSocket') && attributes.key?(:'cores_per_socket') self.cores_per_socket = attributes[:'cores_per_socket'] if attributes[:'cores_per_socket'] self.total_sockets = attributes[:'totalSockets'] if attributes[:'totalSockets'] raise 'You cannot provide both :totalSockets and :total_sockets' if attributes.key?(:'totalSockets') && attributes.key?(:'total_sockets') self.total_sockets = attributes[:'total_sockets'] if attributes[:'total_sockets'] self.threads_per_socket = attributes[:'threadsPerSocket'] if attributes[:'threadsPerSocket'] raise 'You cannot provide both :threadsPerSocket and :threads_per_socket' if attributes.key?(:'threadsPerSocket') && attributes.key?(:'threads_per_socket') self.threads_per_socket = attributes[:'threads_per_socket'] if attributes[:'threads_per_socket'] self.is_hyper_threading_enabled = attributes[:'isHyperThreadingEnabled'] unless attributes[:'isHyperThreadingEnabled'].nil? raise 'You cannot provide both :isHyperThreadingEnabled and :is_hyper_threading_enabled' if attributes.key?(:'isHyperThreadingEnabled') && attributes.key?(:'is_hyper_threading_enabled') self.is_hyper_threading_enabled = attributes[:'is_hyper_threading_enabled'] unless attributes[:'is_hyper_threading_enabled'].nil? self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment.
42 43 44 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 42 def compartment_id @compartment_id end |
#cores_per_socket ⇒ Integer
[Required] Number of cores per socket.
99 100 101 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 99 def cores_per_socket @cores_per_socket end |
#cpu_architecture ⇒ String
[Required] CPU architechure
76 77 78 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 76 def cpu_architecture @cpu_architecture end |
#cpu_cache_in_mbs ⇒ Float
[Required] Size of cache memory in megabytes.
81 82 83 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 81 def cpu_cache_in_mbs @cpu_cache_in_mbs end |
#cpu_frequency_in_mhz ⇒ Float
[Required] Clock frequency of the processor in megahertz.
90 91 92 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 90 def cpu_frequency_in_mhz @cpu_frequency_in_mhz end |
#cpu_implementation ⇒ String
[Required] Model name of processor.
94 95 96 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 94 def cpu_implementation @cpu_implementation end |
#cpu_vendor ⇒ String
[Required] Name of the CPU vendor.
85 86 87 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 85 def cpu_vendor @cpu_vendor end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
118 119 120 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 118 def @defined_tags end |
#entity_source ⇒ String
[Required] Source of the host entity.
38 39 40 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 38 def entity_source @entity_source end |
#freeform_tags ⇒ Hash<String, String>
[Required] Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
124 125 126 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 124 def @freeform_tags end |
#host_insight_id ⇒ String
[Required] The OCID of the host insight resource.
34 35 36 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 34 def host_insight_id @host_insight_id end |
#host_name ⇒ String
[Required] The host name. The host name is unique amongst the hosts managed by the same management agent.
46 47 48 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 46 def host_name @host_name end |
#is_hyper_threading_enabled ⇒ BOOLEAN
[Required] Indicates if hyper-threading is enabled or not
112 113 114 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 112 def is_hyper_threading_enabled @is_hyper_threading_enabled end |
#platform_type ⇒ String
[Required] Platform type. Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX, HP-UX].
54 55 56 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 54 def platform_type @platform_type end |
#platform_vendor ⇒ String
[Required] Platform vendor.
62 63 64 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 62 def platform_vendor @platform_vendor end |
#platform_version ⇒ String
[Required] Platform version.
58 59 60 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 58 def platform_version @platform_version end |
#threads_per_socket ⇒ Integer
[Required] Number of threads per socket.
107 108 109 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 107 def threads_per_socket @threads_per_socket end |
#total_cpus ⇒ Integer
[Required] Total CPU on this host.
67 68 69 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 67 def total_cpus @total_cpus end |
#total_memory_in_gbs ⇒ Float
[Required] Total amount of usable physical memory in gibabytes
72 73 74 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 72 def total_memory_in_gbs @total_memory_in_gbs end |
#total_sockets ⇒ Integer
[Required] Number of total sockets.
103 104 105 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 103 def total_sockets @total_sockets end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 127 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'host_insight_id': :'hostInsightId', 'entity_source': :'entitySource', 'compartment_id': :'compartmentId', 'host_name': :'hostName', 'platform_type': :'platformType', 'platform_version': :'platformVersion', 'platform_vendor': :'platformVendor', 'total_cpus': :'totalCpus', 'total_memory_in_gbs': :'totalMemoryInGBs', 'cpu_architecture': :'cpuArchitecture', 'cpu_cache_in_mbs': :'cpuCacheInMBs', 'cpu_vendor': :'cpuVendor', 'cpu_frequency_in_mhz': :'cpuFrequencyInMhz', 'cpu_implementation': :'cpuImplementation', 'cores_per_socket': :'coresPerSocket', 'total_sockets': :'totalSockets', 'threads_per_socket': :'threadsPerSocket', 'is_hyper_threading_enabled': :'isHyperThreadingEnabled', 'defined_tags': :'definedTags', 'freeform_tags': :'freeformTags' # rubocop:enable Style/SymbolLiteral } end |
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 187 def self.get_subtype(object_hash) type = object_hash[:'entitySource'] # rubocop:disable Style/SymbolLiteral return 'OCI::Opsi::Models::MacsManagedExternalHostConfigurationSummary' if type == 'MACS_MANAGED_EXTERNAL_HOST' return 'OCI::Opsi::Models::PeComanagedHostConfigurationSummary' if type == 'PE_COMANAGED_HOST' return 'OCI::Opsi::Models::EmManagedExternalHostConfigurationSummary' if type == 'EM_MANAGED_EXTERNAL_HOST' return 'OCI::Opsi::Models::MacsManagedCloudHostConfigurationSummary' if type == 'MACS_MANAGED_CLOUD_HOST' # TODO: Log a warning when the subtype is not found. 'OCI::Opsi::Models::HostConfigurationSummary' end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 155 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'host_insight_id': :'String', 'entity_source': :'String', 'compartment_id': :'String', 'host_name': :'String', 'platform_type': :'String', 'platform_version': :'String', 'platform_vendor': :'String', 'total_cpus': :'Integer', 'total_memory_in_gbs': :'Float', 'cpu_architecture': :'String', 'cpu_cache_in_mbs': :'Float', 'cpu_vendor': :'String', 'cpu_frequency_in_mhz': :'Float', 'cpu_implementation': :'String', 'cores_per_socket': :'Integer', 'total_sockets': :'Integer', 'threads_per_socket': :'Integer', 'is_hyper_threading_enabled': :'BOOLEAN', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'freeform_tags': :'Hash<String, String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 386 def ==(other) return true if equal?(other) self.class == other.class && host_insight_id == other.host_insight_id && entity_source == other.entity_source && compartment_id == other.compartment_id && host_name == other.host_name && platform_type == other.platform_type && platform_version == other.platform_version && platform_vendor == other.platform_vendor && total_cpus == other.total_cpus && total_memory_in_gbs == other.total_memory_in_gbs && cpu_architecture == other.cpu_architecture && cpu_cache_in_mbs == other.cpu_cache_in_mbs && cpu_vendor == other.cpu_vendor && cpu_frequency_in_mhz == other.cpu_frequency_in_mhz && cpu_implementation == other.cpu_implementation && cores_per_socket == other.cores_per_socket && total_sockets == other.total_sockets && threads_per_socket == other.threads_per_socket && is_hyper_threading_enabled == other.is_hyper_threading_enabled && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 435 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
415 416 417 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 415 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
424 425 426 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 424 def hash [host_insight_id, entity_source, compartment_id, host_name, platform_type, platform_version, platform_vendor, total_cpus, total_memory_in_gbs, cpu_architecture, cpu_cache_in_mbs, cpu_vendor, cpu_frequency_in_mhz, cpu_implementation, cores_per_socket, total_sockets, threads_per_socket, is_hyper_threading_enabled, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
468 469 470 471 472 473 474 475 476 477 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 468 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
462 463 464 |
# File 'lib/oci/opsi/models/host_configuration_summary.rb', line 462 def to_s to_hash.to_s end |