Class: OCI::OsManagement::Models::ManagedInstance
- Inherits:
-
Object
- Object
- OCI::OsManagement::Models::ManagedInstance
- Defined in:
- lib/oci/os_management/models/managed_instance.rb
Overview
Detail information for an OCI Compute instance that is being managed
Constant Summary collapse
- STATUS_ENUM =
[ STATUS_NORMAL = 'NORMAL'.freeze, STATUS_UNREACHABLE = 'UNREACHABLE'.freeze, STATUS_ERROR = 'ERROR'.freeze, STATUS_WARNING = 'WARNING'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- OS_FAMILY_ENUM =
[ OS_FAMILY_LINUX = 'LINUX'.freeze, OS_FAMILY_WINDOWS = 'WINDOWS'.freeze, OS_FAMILY_ALL = 'ALL'.freeze, OS_FAMILY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#child_software_sources ⇒ Array<OCI::OsManagement::Models::SoftwareSourceId>
list of child Software Sources attached to the Managed Instance.
-
#compartment_id ⇒ String
[Required] OCID for the Compartment.
-
#description ⇒ String
Information specified by the user about the managed instance.
-
#display_name ⇒ String
[Required] Managed Instance identifier.
-
#id ⇒ String
[Required] OCID for the managed instance.
-
#is_reboot_required ⇒ BOOLEAN
Indicates whether a reboot is required to complete installation of updates.
-
#last_boot ⇒ String
Time at which the instance last booted.
-
#last_checkin ⇒ String
Time at which the instance last checked in.
-
#managed_instance_groups ⇒ Array<OCI::OsManagement::Models::Id>
The ids of the managed instance groups of which this instance is a member.
-
#os_family ⇒ String
The Operating System type of the managed instance.
-
#os_kernel_version ⇒ String
Operating System Kernel Version.
-
#os_name ⇒ String
Operating System Name.
-
#os_version ⇒ String
Operating System Version.
-
#parent_software_source ⇒ OCI::OsManagement::Models::SoftwareSourceId
the parent (base) Software Source attached to the Managed Instance.
-
#status ⇒ String
status of the managed instance.
-
#updates_available ⇒ Integer
Number of updates available to be installed.
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 = {}) ⇒ ManagedInstance
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 = {}) ⇒ ManagedInstance
Initializes the object
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 213 214 215 216 217 218 219 220 221 222 223 224 225 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 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 162 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.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.id = attributes[:'id'] if attributes[:'id'] self.description = attributes[:'description'] if attributes[:'description'] self.last_checkin = attributes[:'lastCheckin'] if attributes[:'lastCheckin'] raise 'You cannot provide both :lastCheckin and :last_checkin' if attributes.key?(:'lastCheckin') && attributes.key?(:'last_checkin') self.last_checkin = attributes[:'last_checkin'] if attributes[:'last_checkin'] self.last_boot = attributes[:'lastBoot'] if attributes[:'lastBoot'] raise 'You cannot provide both :lastBoot and :last_boot' if attributes.key?(:'lastBoot') && attributes.key?(:'last_boot') self.last_boot = attributes[:'last_boot'] if attributes[:'last_boot'] self.updates_available = attributes[:'updatesAvailable'] if attributes[:'updatesAvailable'] raise 'You cannot provide both :updatesAvailable and :updates_available' if attributes.key?(:'updatesAvailable') && attributes.key?(:'updates_available') self.updates_available = attributes[:'updates_available'] if attributes[:'updates_available'] self.os_name = attributes[:'osName'] if attributes[:'osName'] raise 'You cannot provide both :osName and :os_name' if attributes.key?(:'osName') && attributes.key?(:'os_name') self.os_name = attributes[:'os_name'] if attributes[:'os_name'] self.os_version = attributes[:'osVersion'] if attributes[:'osVersion'] raise 'You cannot provide both :osVersion and :os_version' if attributes.key?(:'osVersion') && attributes.key?(:'os_version') self.os_version = attributes[:'os_version'] if attributes[:'os_version'] self.os_kernel_version = attributes[:'osKernelVersion'] if attributes[:'osKernelVersion'] raise 'You cannot provide both :osKernelVersion and :os_kernel_version' if attributes.key?(:'osKernelVersion') && attributes.key?(:'os_kernel_version') self.os_kernel_version = attributes[:'os_kernel_version'] if attributes[:'os_kernel_version'] 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.status = attributes[:'status'] if attributes[:'status'] self.parent_software_source = attributes[:'parentSoftwareSource'] if attributes[:'parentSoftwareSource'] raise 'You cannot provide both :parentSoftwareSource and :parent_software_source' if attributes.key?(:'parentSoftwareSource') && attributes.key?(:'parent_software_source') self.parent_software_source = attributes[:'parent_software_source'] if attributes[:'parent_software_source'] self.child_software_sources = attributes[:'childSoftwareSources'] if attributes[:'childSoftwareSources'] raise 'You cannot provide both :childSoftwareSources and :child_software_sources' if attributes.key?(:'childSoftwareSources') && attributes.key?(:'child_software_sources') self.child_software_sources = attributes[:'child_software_sources'] if attributes[:'child_software_sources'] self.managed_instance_groups = attributes[:'managedInstanceGroups'] if attributes[:'managedInstanceGroups'] raise 'You cannot provide both :managedInstanceGroups and :managed_instance_groups' if attributes.key?(:'managedInstanceGroups') && attributes.key?(:'managed_instance_groups') self.managed_instance_groups = attributes[:'managed_instance_groups'] if attributes[:'managed_instance_groups'] self.os_family = attributes[:'osFamily'] if attributes[:'osFamily'] raise 'You cannot provide both :osFamily and :os_family' if attributes.key?(:'osFamily') && attributes.key?(:'os_family') self.os_family = attributes[:'os_family'] if attributes[:'os_family'] self.is_reboot_required = attributes[:'isRebootRequired'] unless attributes[:'isRebootRequired'].nil? raise 'You cannot provide both :isRebootRequired and :is_reboot_required' if attributes.key?(:'isRebootRequired') && attributes.key?(:'is_reboot_required') self.is_reboot_required = attributes[:'is_reboot_required'] unless attributes[:'is_reboot_required'].nil? end |
Instance Attribute Details
#child_software_sources ⇒ Array<OCI::OsManagement::Models::SoftwareSourceId>
list of child Software Sources attached to the Managed Instance
76 77 78 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 76 def child_software_sources @child_software_sources end |
#compartment_id ⇒ String
[Required] OCID for the Compartment
64 65 66 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 64 def compartment_id @compartment_id end |
#description ⇒ String
Information specified by the user about the managed instance
36 37 38 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 36 def description @description end |
#display_name ⇒ String
[Required] Managed Instance identifier
28 29 30 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 28 def display_name @display_name end |
#id ⇒ String
[Required] OCID for the managed instance
32 33 34 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 32 def id @id end |
#is_reboot_required ⇒ BOOLEAN
Indicates whether a reboot is required to complete installation of updates.
90 91 92 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 90 def is_reboot_required @is_reboot_required end |
#last_boot ⇒ String
Time at which the instance last booted
44 45 46 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 44 def last_boot @last_boot end |
#last_checkin ⇒ String
Time at which the instance last checked in
40 41 42 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 40 def last_checkin @last_checkin end |
#managed_instance_groups ⇒ Array<OCI::OsManagement::Models::Id>
The ids of the managed instance groups of which this instance is a member.
82 83 84 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 82 def managed_instance_groups @managed_instance_groups end |
#os_family ⇒ String
The Operating System type of the managed instance.
86 87 88 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 86 def os_family @os_family end |
#os_kernel_version ⇒ String
Operating System Kernel Version
60 61 62 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 60 def os_kernel_version @os_kernel_version end |
#os_name ⇒ String
Operating System Name
52 53 54 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 52 def os_name @os_name end |
#os_version ⇒ String
Operating System Version
56 57 58 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 56 def os_version @os_version end |
#parent_software_source ⇒ OCI::OsManagement::Models::SoftwareSourceId
the parent (base) Software Source attached to the Managed Instance
72 73 74 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 72 def parent_software_source @parent_software_source end |
#status ⇒ String
status of the managed instance.
68 69 70 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 68 def status @status end |
#updates_available ⇒ Integer
Number of updates available to be installed
48 49 50 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 48 def updates_available @updates_available end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 93 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'id': :'id', 'description': :'description', 'last_checkin': :'lastCheckin', 'last_boot': :'lastBoot', 'updates_available': :'updatesAvailable', 'os_name': :'osName', 'os_version': :'osVersion', 'os_kernel_version': :'osKernelVersion', 'compartment_id': :'compartmentId', 'status': :'status', 'parent_software_source': :'parentSoftwareSource', 'child_software_sources': :'childSoftwareSources', 'managed_instance_groups': :'managedInstanceGroups', 'os_family': :'osFamily', 'is_reboot_required': :'isRebootRequired' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 117 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'id': :'String', 'description': :'String', 'last_checkin': :'String', 'last_boot': :'String', 'updates_available': :'Integer', 'os_name': :'String', 'os_version': :'String', 'os_kernel_version': :'String', 'compartment_id': :'String', 'status': :'String', 'parent_software_source': :'OCI::OsManagement::Models::SoftwareSourceId', 'child_software_sources': :'Array<OCI::OsManagement::Models::SoftwareSourceId>', 'managed_instance_groups': :'Array<OCI::OsManagement::Models::Id>', 'os_family': :'String', 'is_reboot_required': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 286 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && id == other.id && description == other.description && last_checkin == other.last_checkin && last_boot == other.last_boot && updates_available == other.updates_available && os_name == other.os_name && os_version == other.os_version && os_kernel_version == other.os_kernel_version && compartment_id == other.compartment_id && status == other.status && parent_software_source == other.parent_software_source && child_software_sources == other.child_software_sources && managed_instance_groups == other.managed_instance_groups && os_family == other.os_family && is_reboot_required == other.is_reboot_required end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 331 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
311 312 313 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 311 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
320 321 322 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 320 def hash [display_name, id, description, last_checkin, last_boot, updates_available, os_name, os_version, os_kernel_version, compartment_id, status, parent_software_source, child_software_sources, managed_instance_groups, os_family, is_reboot_required].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
364 365 366 367 368 369 370 371 372 373 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 364 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
358 359 360 |
# File 'lib/oci/os_management/models/managed_instance.rb', line 358 def to_s to_hash.to_s end |