Class: OCI::OsManagementHub::Models::MatchingRule
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::MatchingRule
- Defined in:
- lib/oci/os_management_hub/models/matching_rule.rb
Overview
An object that defines the set of rules that identifies the target instances in a dynamic set.
Constant Summary collapse
- OS_NAMES_ENUM =
[ OS_NAMES_ORACLE_LINUX = 'ORACLE_LINUX'.freeze, OS_NAMES_UBUNTU = 'UBUNTU'.freeze, OS_NAMES_WINDOWS_SERVER = 'WINDOWS_SERVER'.freeze, OS_NAMES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ARCHITECTURES_ENUM =
[ ARCHITECTURES_X86_64 = 'X86_64'.freeze, ARCHITECTURES_AARCH64 = 'AARCH64'.freeze, ARCHITECTURES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- OS_FAMILIES_ENUM =
[ OS_FAMILIES_ORACLE_LINUX_10 = 'ORACLE_LINUX_10'.freeze, OS_FAMILIES_ORACLE_LINUX_9 = 'ORACLE_LINUX_9'.freeze, OS_FAMILIES_ORACLE_LINUX_8 = 'ORACLE_LINUX_8'.freeze, OS_FAMILIES_ORACLE_LINUX_7 = 'ORACLE_LINUX_7'.freeze, OS_FAMILIES_ORACLE_LINUX_6 = 'ORACLE_LINUX_6'.freeze, OS_FAMILIES_WINDOWS_SERVER_2016 = 'WINDOWS_SERVER_2016'.freeze, OS_FAMILIES_WINDOWS_SERVER_2019 = 'WINDOWS_SERVER_2019'.freeze, OS_FAMILIES_WINDOWS_SERVER_2022 = 'WINDOWS_SERVER_2022'.freeze, OS_FAMILIES_WINDOWS_SERVER_2025 = 'WINDOWS_SERVER_2025'.freeze, OS_FAMILIES_WINDOWS_11 = 'WINDOWS_11'.freeze, OS_FAMILIES_ALL = 'ALL'.freeze, OS_FAMILIES_UBUNTU_20_04 = 'UBUNTU_20_04'.freeze, OS_FAMILIES_UBUNTU_22_04 = 'UBUNTU_22_04'.freeze, OS_FAMILIES_UBUNTU_24_04 = 'UBUNTU_24_04'.freeze, OS_FAMILIES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- STATUSES_ENUM =
[ STATUSES_NORMAL = 'NORMAL'.freeze, STATUSES_UNREACHABLE = 'UNREACHABLE'.freeze, STATUSES_ERROR = 'ERROR'.freeze, STATUSES_WARNING = 'WARNING'.freeze, STATUSES_REGISTRATION_ERROR = 'REGISTRATION_ERROR'.freeze, STATUSES_DELETING = 'DELETING'.freeze, STATUSES_ONBOARDING = 'ONBOARDING'.freeze, STATUSES_REBOOTING = 'REBOOTING'.freeze, STATUSES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LOCATIONS_ENUM =
[ LOCATIONS_ON_PREMISE = 'ON_PREMISE'.freeze, LOCATIONS_OCI_COMPUTE = 'OCI_COMPUTE'.freeze, LOCATIONS_AZURE = 'AZURE'.freeze, LOCATIONS_EC2 = 'EC2'.freeze, LOCATIONS_GCP = 'GCP'.freeze, LOCATIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#architectures ⇒ Array<String>
The list of managed instance architectures.
-
#display_names ⇒ Array<String>
The list of managed instance display names.
-
#is_reboot_required ⇒ BOOLEAN
Indicates if the managed instance needs to be rebooted.
-
#locations ⇒ Array<String>
The list of managed instance locations.
-
#managed_instance_group_ids ⇒ Array<String>
The list of managed instance group IDs.
-
#managed_instance_ids ⇒ Array<String>
The list of managed instance ids.
-
#os_families ⇒ Array<String>
The list of managed instance OS families.
-
#os_names ⇒ Array<String>
The list of managed instance OS names.
-
#statuses ⇒ Array<String>
The list of managed instance statuses.
-
#tags ⇒ Array<OCI::OsManagementHub::Models::Tag>
The list of the managed instance tags.
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 = {}) ⇒ MatchingRule
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 = {}) ⇒ MatchingRule
Initializes the object
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 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 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 156 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. = attributes[:'tags'] if attributes[:'tags'] self.managed_instance_ids = attributes[:'managedInstanceIds'] if attributes[:'managedInstanceIds'] raise 'You cannot provide both :managedInstanceIds and :managed_instance_ids' if attributes.key?(:'managedInstanceIds') && attributes.key?(:'managed_instance_ids') self.managed_instance_ids = attributes[:'managed_instance_ids'] if attributes[:'managed_instance_ids'] self.managed_instance_group_ids = attributes[:'managedInstanceGroupIds'] if attributes[:'managedInstanceGroupIds'] raise 'You cannot provide both :managedInstanceGroupIds and :managed_instance_group_ids' if attributes.key?(:'managedInstanceGroupIds') && attributes.key?(:'managed_instance_group_ids') self.managed_instance_group_ids = attributes[:'managed_instance_group_ids'] if attributes[:'managed_instance_group_ids'] self.display_names = attributes[:'displayNames'] if attributes[:'displayNames'] raise 'You cannot provide both :displayNames and :display_names' if attributes.key?(:'displayNames') && attributes.key?(:'display_names') self.display_names = attributes[:'display_names'] if attributes[:'display_names'] self.os_names = attributes[:'osNames'] if attributes[:'osNames'] raise 'You cannot provide both :osNames and :os_names' if attributes.key?(:'osNames') && attributes.key?(:'os_names') self.os_names = attributes[:'os_names'] if attributes[:'os_names'] self.architectures = attributes[:'architectures'] if attributes[:'architectures'] self.os_families = attributes[:'osFamilies'] if attributes[:'osFamilies'] raise 'You cannot provide both :osFamilies and :os_families' if attributes.key?(:'osFamilies') && attributes.key?(:'os_families') self.os_families = attributes[:'os_families'] if attributes[:'os_families'] self.statuses = attributes[:'statuses'] if attributes[:'statuses'] self.locations = attributes[:'locations'] if attributes[:'locations'] 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
#architectures ⇒ Array<String>
The list of managed instance architectures.
86 87 88 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 86 def architectures @architectures end |
#display_names ⇒ Array<String>
The list of managed instance display names.
78 79 80 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 78 def display_names @display_names end |
#is_reboot_required ⇒ BOOLEAN
Indicates if the managed instance needs to be rebooted.
102 103 104 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 102 def is_reboot_required @is_reboot_required end |
#locations ⇒ Array<String>
The list of managed instance locations.
98 99 100 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 98 def locations @locations end |
#managed_instance_group_ids ⇒ Array<String>
The list of managed instance group IDs.
74 75 76 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 74 def managed_instance_group_ids @managed_instance_group_ids end |
#managed_instance_ids ⇒ Array<String>
The list of managed instance ids.
70 71 72 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 70 def managed_instance_ids @managed_instance_ids end |
#os_families ⇒ Array<String>
The list of managed instance OS families.
90 91 92 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 90 def os_families @os_families end |
#os_names ⇒ Array<String>
The list of managed instance OS names.
82 83 84 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 82 def os_names @os_names end |
#statuses ⇒ Array<String>
The list of managed instance statuses.
94 95 96 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 94 def statuses @statuses end |
#tags ⇒ Array<OCI::OsManagementHub::Models::Tag>
The list of the managed instance tags.
66 67 68 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 66 def @tags end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 105 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'tags': :'tags', 'managed_instance_ids': :'managedInstanceIds', 'managed_instance_group_ids': :'managedInstanceGroupIds', 'display_names': :'displayNames', 'os_names': :'osNames', 'architectures': :'architectures', 'os_families': :'osFamilies', 'statuses': :'statuses', 'locations': :'locations', 'is_reboot_required': :'isRebootRequired' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 123 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'tags': :'Array<OCI::OsManagementHub::Models::Tag>', 'managed_instance_ids': :'Array<String>', 'managed_instance_group_ids': :'Array<String>', 'display_names': :'Array<String>', 'os_names': :'Array<String>', 'architectures': :'Array<String>', 'os_families': :'Array<String>', 'statuses': :'Array<String>', 'locations': :'Array<String>', 'is_reboot_required': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 314 def ==(other) return true if equal?(other) self.class == other.class && == other. && managed_instance_ids == other.managed_instance_ids && managed_instance_group_ids == other.managed_instance_group_ids && display_names == other.display_names && os_names == other.os_names && architectures == other.architectures && os_families == other.os_families && statuses == other.statuses && locations == other.locations && is_reboot_required == other.is_reboot_required end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 353 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
333 334 335 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 333 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
342 343 344 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 342 def hash [, managed_instance_ids, managed_instance_group_ids, display_names, os_names, architectures, os_families, statuses, locations, is_reboot_required].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
386 387 388 389 390 391 392 393 394 395 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 386 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
380 381 382 |
# File 'lib/oci/os_management_hub/models/matching_rule.rb', line 380 def to_s to_hash.to_s end |