Class: OCI::FleetAppsManagement::Models::InventoryRecordSummary
- Inherits:
-
Object
- Object
- OCI::FleetAppsManagement::Models::InventoryRecordSummary
- Defined in:
- lib/oci/fleet_apps_management/models/inventory_record_summary.rb
Overview
Summary information about an inventory target.
Instance Attribute Summary collapse
-
#architecture ⇒ String
[Required] Architecture of the resource associated with the target.
-
#compartment_id ⇒ String
[Required] OCID of the compartment to which the resource belongs to.
-
#components ⇒ Array<OCI::FleetAppsManagement::Models::InventoryRecordComponent>
[Required] List of target components.
-
#installed_patches ⇒ Array<OCI::FleetAppsManagement::Models::InventoryRecordPatchDetails>
[Required] List of details on the patches currently installed on the target.
-
#lifecycle_state ⇒ String
The current state of the Inventory target.
-
#os_type ⇒ String
[Required] OS installed on the resource associated with the target.
-
#properties ⇒ Array<OCI::FleetAppsManagement::Models::InventoryRecordProperty>
[Required] List of target properties.
-
#target_id ⇒ String
[Required] The OCID of the Inventory target.
-
#target_name ⇒ String
[Required] Name of the target.
-
#target_product_id ⇒ String
OCID of the product installed at the target path.
-
#target_product_name ⇒ String
[Required] Name of the product installed at the target path.
-
#target_resource_id ⇒ String
[Required] OCID of the resource associated with the target.
-
#target_resource_name ⇒ String
Name of the resource associated with the target.
-
#time_created ⇒ DateTime
The time this resource was created.
-
#time_updated ⇒ DateTime
The time this resource was last updated.
-
#version ⇒ String
[Required] Version of the product on the target.
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 = {}) ⇒ InventoryRecordSummary
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 = {}) ⇒ InventoryRecordSummary
Initializes the object
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 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 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 145 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.target_id = attributes[:'targetId'] if attributes[:'targetId'] raise 'You cannot provide both :targetId and :target_id' if attributes.key?(:'targetId') && attributes.key?(:'target_id') self.target_id = attributes[:'target_id'] if attributes[:'target_id'] self.target_name = attributes[:'targetName'] if attributes[:'targetName'] raise 'You cannot provide both :targetName and :target_name' if attributes.key?(:'targetName') && attributes.key?(:'target_name') self.target_name = attributes[:'target_name'] if attributes[:'target_name'] self.version = attributes[:'version'] if attributes[:'version'] self.target_resource_id = attributes[:'targetResourceId'] if attributes[:'targetResourceId'] raise 'You cannot provide both :targetResourceId and :target_resource_id' if attributes.key?(:'targetResourceId') && attributes.key?(:'target_resource_id') self.target_resource_id = attributes[:'target_resource_id'] if attributes[:'target_resource_id'] self.target_resource_name = attributes[:'targetResourceName'] if attributes[:'targetResourceName'] raise 'You cannot provide both :targetResourceName and :target_resource_name' if attributes.key?(:'targetResourceName') && attributes.key?(:'target_resource_name') self.target_resource_name = attributes[:'target_resource_name'] if attributes[:'target_resource_name'] 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.target_product_id = attributes[:'targetProductId'] if attributes[:'targetProductId'] raise 'You cannot provide both :targetProductId and :target_product_id' if attributes.key?(:'targetProductId') && attributes.key?(:'target_product_id') self.target_product_id = attributes[:'target_product_id'] if attributes[:'target_product_id'] self.target_product_name = attributes[:'targetProductName'] if attributes[:'targetProductName'] raise 'You cannot provide both :targetProductName and :target_product_name' if attributes.key?(:'targetProductName') && attributes.key?(:'target_product_name') self.target_product_name = attributes[:'target_product_name'] if attributes[:'target_product_name'] self.os_type = attributes[:'osType'] if attributes[:'osType'] raise 'You cannot provide both :osType and :os_type' if attributes.key?(:'osType') && attributes.key?(:'os_type') self.os_type = attributes[:'os_type'] if attributes[:'os_type'] self.architecture = attributes[:'architecture'] if attributes[:'architecture'] self.properties = attributes[:'properties'] if attributes[:'properties'] self.components = attributes[:'components'] if attributes[:'components'] self.installed_patches = attributes[:'installedPatches'] if attributes[:'installedPatches'] raise 'You cannot provide both :installedPatches and :installed_patches' if attributes.key?(:'installedPatches') && attributes.key?(:'installed_patches') self.installed_patches = attributes[:'installed_patches'] if attributes[:'installed_patches'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] end |
Instance Attribute Details
#architecture ⇒ String
[Required] Architecture of the resource associated with the target
49 50 51 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 49 def architecture @architecture end |
#compartment_id ⇒ String
[Required] OCID of the compartment to which the resource belongs to.
33 34 35 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 33 def compartment_id @compartment_id end |
#components ⇒ Array<OCI::FleetAppsManagement::Models::InventoryRecordComponent>
[Required] List of target components
57 58 59 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 57 def components @components end |
#installed_patches ⇒ Array<OCI::FleetAppsManagement::Models::InventoryRecordPatchDetails>
[Required] List of details on the patches currently installed on the target
61 62 63 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 61 def installed_patches @installed_patches end |
#lifecycle_state ⇒ String
The current state of the Inventory target.
73 74 75 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 73 def lifecycle_state @lifecycle_state end |
#os_type ⇒ String
[Required] OS installed on the resource associated with the target
45 46 47 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 45 def os_type @os_type end |
#properties ⇒ Array<OCI::FleetAppsManagement::Models::InventoryRecordProperty>
[Required] List of target properties
53 54 55 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 53 def properties @properties end |
#target_id ⇒ String
[Required] The OCID of the Inventory target.
13 14 15 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 13 def target_id @target_id end |
#target_name ⇒ String
[Required] Name of the target
17 18 19 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 17 def target_name @target_name end |
#target_product_id ⇒ String
OCID of the product installed at the target path
37 38 39 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 37 def target_product_id @target_product_id end |
#target_product_name ⇒ String
[Required] Name of the product installed at the target path
41 42 43 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 41 def target_product_name @target_product_name end |
#target_resource_id ⇒ String
[Required] OCID of the resource associated with the target
25 26 27 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 25 def target_resource_id @target_resource_id end |
#target_resource_name ⇒ String
Name of the resource associated with the target
29 30 31 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 29 def target_resource_name @target_resource_name end |
#time_created ⇒ DateTime
The time this resource was created. An RFC3339 formatted datetime string.
65 66 67 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 65 def time_created @time_created end |
#time_updated ⇒ DateTime
The time this resource was last updated. An RFC3339 formatted datetime string.
69 70 71 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 69 def time_updated @time_updated end |
#version ⇒ String
[Required] Version of the product on the target
21 22 23 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 21 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 76 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'target_id': :'targetId', 'target_name': :'targetName', 'version': :'version', 'target_resource_id': :'targetResourceId', 'target_resource_name': :'targetResourceName', 'compartment_id': :'compartmentId', 'target_product_id': :'targetProductId', 'target_product_name': :'targetProductName', 'os_type': :'osType', 'architecture': :'architecture', 'properties': :'properties', 'components': :'components', 'installed_patches': :'installedPatches', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 100 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'target_id': :'String', 'target_name': :'String', 'version': :'String', 'target_resource_id': :'String', 'target_resource_name': :'String', 'compartment_id': :'String', 'target_product_id': :'String', 'target_product_name': :'String', 'os_type': :'String', 'architecture': :'String', 'properties': :'Array<OCI::FleetAppsManagement::Models::InventoryRecordProperty>', 'components': :'Array<OCI::FleetAppsManagement::Models::InventoryRecordComponent>', 'installed_patches': :'Array<OCI::FleetAppsManagement::Models::InventoryRecordPatchDetails>', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 239 def ==(other) return true if equal?(other) self.class == other.class && target_id == other.target_id && target_name == other.target_name && version == other.version && target_resource_id == other.target_resource_id && target_resource_name == other.target_resource_name && compartment_id == other.compartment_id && target_product_id == other.target_product_id && target_product_name == other.target_product_name && os_type == other.os_type && architecture == other.architecture && properties == other.properties && components == other.components && installed_patches == other.installed_patches && time_created == other.time_created && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 284 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
264 265 266 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 264 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
273 274 275 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 273 def hash [target_id, target_name, version, target_resource_id, target_resource_name, compartment_id, target_product_id, target_product_name, os_type, architecture, properties, components, installed_patches, time_created, time_updated, lifecycle_state].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
317 318 319 320 321 322 323 324 325 326 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 317 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
311 312 313 |
# File 'lib/oci/fleet_apps_management/models/inventory_record_summary.rb', line 311 def to_s to_hash.to_s end |