Class: ConnectWise::CompanyManagementSummary
- Inherits:
-
Object
- Object
- ConnectWise::CompanyManagementSummary
- Defined in:
- lib/connectwise-ruby-sdk/models/company_management_summary.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#_info ⇒ Object
Metadata of the entity.
-
#agreement ⇒ Object
Returns the value of attribute agreement.
-
#alerts_generated ⇒ Object
Returns the value of attribute alerts_generated.
-
#company ⇒ Object
Returns the value of attribute company.
-
#cpu_utilization ⇒ Object
Returns the value of attribute cpu_utilization.
-
#device_type ⇒ Object
deviceType is required if the managementSolution is Legacy.
-
#disk_cleanups ⇒ Object
Returns the value of attribute disk_cleanups.
-
#disk_defragmentations ⇒ Object
Returns the value of attribute disk_defragmentations.
-
#disk_space_cleaned_mb ⇒ Object
Returns the value of attribute disk_space_cleaned_mb.
-
#failed_backup_jobs ⇒ Object
Returns the value of attribute failed_backup_jobs.
-
#fully_patched_machines ⇒ Object
Returns the value of attribute fully_patched_machines.
-
#group_identifier ⇒ Object
Returns the value of attribute group_identifier.
-
#id ⇒ Object
Returns the value of attribute id.
-
#internet_connectivity ⇒ Object
Returns the value of attribute internet_connectivity.
-
#management_solution ⇒ Object
Returns the value of attribute management_solution.
-
#memory_utilization ⇒ Object
Returns the value of attribute memory_utilization.
-
#missing_more_five_patches_machines ⇒ Object
Returns the value of attribute missing_more_five_patches_machines.
-
#missing_one_two_patches_machines ⇒ Object
Returns the value of attribute missing_one_two_patches_machines.
-
#missing_security_patches ⇒ Object
Returns the value of attribute missing_security_patches.
-
#missing_three_five_patches_machines ⇒ Object
Returns the value of attribute missing_three_five_patches_machines.
-
#missing_unscanned_patches_machines ⇒ Object
Returns the value of attribute missing_unscanned_patches_machines.
-
#server_availability ⇒ Object
Returns the value of attribute server_availability.
-
#servers_disk_space_low ⇒ Object
Returns the value of attribute servers_disk_space_low.
-
#servers_offline ⇒ Object
Returns the value of attribute servers_offline.
-
#snmp_machines ⇒ Object
Returns the value of attribute snmp_machines.
-
#spyware_items_removed ⇒ Object
Returns the value of attribute spyware_items_removed.
-
#successful_backup_jobs ⇒ Object
Returns the value of attribute successful_backup_jobs.
-
#total_managed_machines ⇒ Object
Returns the value of attribute total_managed_machines.
-
#total_notifications ⇒ Object
Returns the value of attribute total_notifications.
-
#total_servers ⇒ Object
Returns the value of attribute total_servers.
-
#total_windows_servers ⇒ Object
Returns the value of attribute total_windows_servers.
-
#total_windows_workstations ⇒ Object
Returns the value of attribute total_windows_workstations.
-
#total_workstations ⇒ Object
Returns the value of attribute total_workstations.
-
#viruses_removed ⇒ Object
Returns the value of attribute viruses_removed.
-
#windows_patches_installed ⇒ Object
Returns the value of attribute windows_patches_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
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CompanyManagementSummary
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CompanyManagementSummary
Initializes the object
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 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 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 185 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} if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'managementSolution') self.management_solution = attributes[:'managementSolution'] end if attributes.has_key?(:'groupIdentifier') self.group_identifier = attributes[:'groupIdentifier'] end if attributes.has_key?(:'deviceType') self.device_type = attributes[:'deviceType'] end if attributes.has_key?(:'agreement') self.agreement = attributes[:'agreement'] end if attributes.has_key?(:'snmpMachines') self.snmp_machines = attributes[:'snmpMachines'] end if attributes.has_key?(:'totalWorkstations') self.total_workstations = attributes[:'totalWorkstations'] end if attributes.has_key?(:'totalServers') self.total_servers = attributes[:'totalServers'] end if attributes.has_key?(:'totalWindowsServers') self.total_windows_servers = attributes[:'totalWindowsServers'] end if attributes.has_key?(:'totalWindowsWorkstations') self.total_windows_workstations = attributes[:'totalWindowsWorkstations'] end if attributes.has_key?(:'totalManagedMachines') self.total_managed_machines = attributes[:'totalManagedMachines'] end if attributes.has_key?(:'serversOffline') self.servers_offline = attributes[:'serversOffline'] end if attributes.has_key?(:'serversDiskSpaceLow') self.servers_disk_space_low = attributes[:'serversDiskSpaceLow'] end if attributes.has_key?(:'failedBackupJobs') self.failed_backup_jobs = attributes[:'failedBackupJobs'] end if attributes.has_key?(:'totalNotifications') self.total_notifications = attributes[:'totalNotifications'] end if attributes.has_key?(:'successfulBackupJobs') self.successful_backup_jobs = attributes[:'successfulBackupJobs'] end if attributes.has_key?(:'serverAvailability') self.server_availability = attributes[:'serverAvailability'] end if attributes.has_key?(:'virusesRemoved') self.viruses_removed = attributes[:'virusesRemoved'] end if attributes.has_key?(:'spywareItemsRemoved') self.spyware_items_removed = attributes[:'spywareItemsRemoved'] end if attributes.has_key?(:'windowsPatchesInstalled') self.windows_patches_installed = attributes[:'windowsPatchesInstalled'] end if attributes.has_key?(:'diskCleanups') self.disk_cleanups = attributes[:'diskCleanups'] end if attributes.has_key?(:'diskDefragmentations') self.disk_defragmentations = attributes[:'diskDefragmentations'] end if attributes.has_key?(:'fullyPatchedMachines') self.fully_patched_machines = attributes[:'fullyPatchedMachines'] end if attributes.has_key?(:'missingOneTwoPatchesMachines') self.missing_one_two_patches_machines = attributes[:'missingOneTwoPatchesMachines'] end if attributes.has_key?(:'missingThreeFivePatchesMachines') self.missing_three_five_patches_machines = attributes[:'missingThreeFivePatchesMachines'] end if attributes.has_key?(:'missingMoreFivePatchesMachines') self.missing_more_five_patches_machines = attributes[:'missingMoreFivePatchesMachines'] end if attributes.has_key?(:'missingUnscannedPatchesMachines') self.missing_unscanned_patches_machines = attributes[:'missingUnscannedPatchesMachines'] end if attributes.has_key?(:'alertsGenerated') self.alerts_generated = attributes[:'alertsGenerated'] end if attributes.has_key?(:'internetConnectivity') self.internet_connectivity = attributes[:'internetConnectivity'] end if attributes.has_key?(:'diskSpaceCleanedMb') self.disk_space_cleaned_mb = attributes[:'diskSpaceCleanedMb'] end if attributes.has_key?(:'missingSecurityPatches') self.missing_security_patches = attributes[:'missingSecurityPatches'] end if attributes.has_key?(:'cpuUtilization') self.cpu_utilization = attributes[:'cpuUtilization'] end if attributes.has_key?(:'memoryUtilization') self.memory_utilization = attributes[:'memoryUtilization'] end if attributes.has_key?(:'company') self.company = attributes[:'company'] end if attributes.has_key?(:'_info') self._info = attributes[:'_info'] end end |
Instance Attribute Details
#_info ⇒ Object
Metadata of the entity
77 78 79 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 77 def _info @_info end |
#agreement ⇒ Object
Returns the value of attribute agreement.
16 17 18 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 16 def agreement @agreement end |
#alerts_generated ⇒ Object
Returns the value of attribute alerts_generated.
62 63 64 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 62 def alerts_generated @alerts_generated end |
#company ⇒ Object
Returns the value of attribute company.
74 75 76 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 74 def company @company end |
#cpu_utilization ⇒ Object
Returns the value of attribute cpu_utilization.
70 71 72 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 70 def cpu_utilization @cpu_utilization end |
#device_type ⇒ Object
deviceType is required if the managementSolution is Legacy
14 15 16 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 14 def device_type @device_type end |
#disk_cleanups ⇒ Object
Returns the value of attribute disk_cleanups.
48 49 50 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 48 def disk_cleanups @disk_cleanups end |
#disk_defragmentations ⇒ Object
Returns the value of attribute disk_defragmentations.
50 51 52 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 50 def disk_defragmentations @disk_defragmentations end |
#disk_space_cleaned_mb ⇒ Object
Returns the value of attribute disk_space_cleaned_mb.
66 67 68 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 66 def disk_space_cleaned_mb @disk_space_cleaned_mb end |
#failed_backup_jobs ⇒ Object
Returns the value of attribute failed_backup_jobs.
34 35 36 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 34 def failed_backup_jobs @failed_backup_jobs end |
#fully_patched_machines ⇒ Object
Returns the value of attribute fully_patched_machines.
52 53 54 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 52 def fully_patched_machines @fully_patched_machines end |
#group_identifier ⇒ Object
Returns the value of attribute group_identifier.
11 12 13 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 11 def group_identifier @group_identifier end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 7 def id @id end |
#internet_connectivity ⇒ Object
Returns the value of attribute internet_connectivity.
64 65 66 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 64 def internet_connectivity @internet_connectivity end |
#management_solution ⇒ Object
Returns the value of attribute management_solution.
9 10 11 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 9 def management_solution @management_solution end |
#memory_utilization ⇒ Object
Returns the value of attribute memory_utilization.
72 73 74 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 72 def memory_utilization @memory_utilization end |
#missing_more_five_patches_machines ⇒ Object
Returns the value of attribute missing_more_five_patches_machines.
58 59 60 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 58 def missing_more_five_patches_machines @missing_more_five_patches_machines end |
#missing_one_two_patches_machines ⇒ Object
Returns the value of attribute missing_one_two_patches_machines.
54 55 56 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 54 def missing_one_two_patches_machines @missing_one_two_patches_machines end |
#missing_security_patches ⇒ Object
Returns the value of attribute missing_security_patches.
68 69 70 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 68 def missing_security_patches @missing_security_patches end |
#missing_three_five_patches_machines ⇒ Object
Returns the value of attribute missing_three_five_patches_machines.
56 57 58 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 56 def missing_three_five_patches_machines @missing_three_five_patches_machines end |
#missing_unscanned_patches_machines ⇒ Object
Returns the value of attribute missing_unscanned_patches_machines.
60 61 62 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 60 def missing_unscanned_patches_machines @missing_unscanned_patches_machines end |
#server_availability ⇒ Object
Returns the value of attribute server_availability.
40 41 42 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 40 def server_availability @server_availability end |
#servers_disk_space_low ⇒ Object
Returns the value of attribute servers_disk_space_low.
32 33 34 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 32 def servers_disk_space_low @servers_disk_space_low end |
#servers_offline ⇒ Object
Returns the value of attribute servers_offline.
30 31 32 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 30 def servers_offline @servers_offline end |
#snmp_machines ⇒ Object
Returns the value of attribute snmp_machines.
18 19 20 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 18 def snmp_machines @snmp_machines end |
#spyware_items_removed ⇒ Object
Returns the value of attribute spyware_items_removed.
44 45 46 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 44 def spyware_items_removed @spyware_items_removed end |
#successful_backup_jobs ⇒ Object
Returns the value of attribute successful_backup_jobs.
38 39 40 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 38 def successful_backup_jobs @successful_backup_jobs end |
#total_managed_machines ⇒ Object
Returns the value of attribute total_managed_machines.
28 29 30 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 28 def total_managed_machines @total_managed_machines end |
#total_notifications ⇒ Object
Returns the value of attribute total_notifications.
36 37 38 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 36 def total_notifications @total_notifications end |
#total_servers ⇒ Object
Returns the value of attribute total_servers.
22 23 24 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 22 def total_servers @total_servers end |
#total_windows_servers ⇒ Object
Returns the value of attribute total_windows_servers.
24 25 26 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 24 def total_windows_servers @total_windows_servers end |
#total_windows_workstations ⇒ Object
Returns the value of attribute total_windows_workstations.
26 27 28 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 26 def total_windows_workstations @total_windows_workstations end |
#total_workstations ⇒ Object
Returns the value of attribute total_workstations.
20 21 22 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 20 def total_workstations @total_workstations end |
#viruses_removed ⇒ Object
Returns the value of attribute viruses_removed.
42 43 44 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 42 def viruses_removed @viruses_removed end |
#windows_patches_installed ⇒ Object
Returns the value of attribute windows_patches_installed.
46 47 48 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 46 def windows_patches_installed @windows_patches_installed end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
102 103 104 105 106 107 108 109 110 111 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 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 102 def self.attribute_map { :'id' => :'id', :'management_solution' => :'managementSolution', :'group_identifier' => :'groupIdentifier', :'device_type' => :'deviceType', :'agreement' => :'agreement', :'snmp_machines' => :'snmpMachines', :'total_workstations' => :'totalWorkstations', :'total_servers' => :'totalServers', :'total_windows_servers' => :'totalWindowsServers', :'total_windows_workstations' => :'totalWindowsWorkstations', :'total_managed_machines' => :'totalManagedMachines', :'servers_offline' => :'serversOffline', :'servers_disk_space_low' => :'serversDiskSpaceLow', :'failed_backup_jobs' => :'failedBackupJobs', :'total_notifications' => :'totalNotifications', :'successful_backup_jobs' => :'successfulBackupJobs', :'server_availability' => :'serverAvailability', :'viruses_removed' => :'virusesRemoved', :'spyware_items_removed' => :'spywareItemsRemoved', :'windows_patches_installed' => :'windowsPatchesInstalled', :'disk_cleanups' => :'diskCleanups', :'disk_defragmentations' => :'diskDefragmentations', :'fully_patched_machines' => :'fullyPatchedMachines', :'missing_one_two_patches_machines' => :'missingOneTwoPatchesMachines', :'missing_three_five_patches_machines' => :'missingThreeFivePatchesMachines', :'missing_more_five_patches_machines' => :'missingMoreFivePatchesMachines', :'missing_unscanned_patches_machines' => :'missingUnscannedPatchesMachines', :'alerts_generated' => :'alertsGenerated', :'internet_connectivity' => :'internetConnectivity', :'disk_space_cleaned_mb' => :'diskSpaceCleanedMb', :'missing_security_patches' => :'missingSecurityPatches', :'cpu_utilization' => :'cpuUtilization', :'memory_utilization' => :'memoryUtilization', :'company' => :'company', :'_info' => :'_info' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 176 177 178 179 180 181 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 143 def self.swagger_types { :'id' => :'Integer', :'management_solution' => :'ManagementSolutionReference', :'group_identifier' => :'String', :'device_type' => :'String', :'agreement' => :'AgreementReference', :'snmp_machines' => :'Integer', :'total_workstations' => :'Integer', :'total_servers' => :'Integer', :'total_windows_servers' => :'Integer', :'total_windows_workstations' => :'Integer', :'total_managed_machines' => :'Integer', :'servers_offline' => :'Integer', :'servers_disk_space_low' => :'Integer', :'failed_backup_jobs' => :'Integer', :'total_notifications' => :'Integer', :'successful_backup_jobs' => :'Integer', :'server_availability' => :'Integer', :'viruses_removed' => :'Integer', :'spyware_items_removed' => :'Integer', :'windows_patches_installed' => :'Integer', :'disk_cleanups' => :'Integer', :'disk_defragmentations' => :'Integer', :'fully_patched_machines' => :'Integer', :'missing_one_two_patches_machines' => :'Integer', :'missing_three_five_patches_machines' => :'Integer', :'missing_more_five_patches_machines' => :'Integer', :'missing_unscanned_patches_machines' => :'Integer', :'alerts_generated' => :'String', :'internet_connectivity' => :'Float', :'disk_space_cleaned_mb' => :'Integer', :'missing_security_patches' => :'String', :'cpu_utilization' => :'Float', :'memory_utilization' => :'Float', :'company' => :'CompanyReference', :'_info' => :'Metadata' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
384 385 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 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 384 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && management_solution == o.management_solution && group_identifier == o.group_identifier && device_type == o.device_type && agreement == o.agreement && snmp_machines == o.snmp_machines && total_workstations == o.total_workstations && total_servers == o.total_servers && total_windows_servers == o.total_windows_servers && total_windows_workstations == o.total_windows_workstations && total_managed_machines == o.total_managed_machines && servers_offline == o.servers_offline && servers_disk_space_low == o.servers_disk_space_low && failed_backup_jobs == o.failed_backup_jobs && total_notifications == o.total_notifications && successful_backup_jobs == o.successful_backup_jobs && server_availability == o.server_availability && viruses_removed == o.viruses_removed && spyware_items_removed == o.spyware_items_removed && windows_patches_installed == o.windows_patches_installed && disk_cleanups == o.disk_cleanups && disk_defragmentations == o.disk_defragmentations && fully_patched_machines == o.fully_patched_machines && missing_one_two_patches_machines == o.missing_one_two_patches_machines && missing_three_five_patches_machines == o.missing_three_five_patches_machines && missing_more_five_patches_machines == o.missing_more_five_patches_machines && missing_unscanned_patches_machines == o.missing_unscanned_patches_machines && alerts_generated == o.alerts_generated && internet_connectivity == o.internet_connectivity && disk_space_cleaned_mb == o.disk_space_cleaned_mb && missing_security_patches == o.missing_security_patches && cpu_utilization == o.cpu_utilization && memory_utilization == o.memory_utilization && company == o.company && _info == o._info end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 460 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = ConnectWise.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 526 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 439 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/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) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(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?(o) ⇒ Boolean
426 427 428 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 426 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
432 433 434 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 432 def hash [id, management_solution, group_identifier, device_type, agreement, snmp_machines, total_workstations, total_servers, total_windows_servers, total_windows_workstations, total_managed_machines, servers_offline, servers_disk_space_low, failed_backup_jobs, total_notifications, successful_backup_jobs, server_availability, viruses_removed, spyware_items_removed, windows_patches_installed, disk_cleanups, disk_defragmentations, fully_patched_machines, missing_one_two_patches_machines, missing_three_five_patches_machines, missing_more_five_patches_machines, missing_unscanned_patches_machines, alerts_generated, internet_connectivity, disk_space_cleaned_mb, missing_security_patches, cpu_utilization, memory_utilization, company, _info].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 335 def list_invalid_properties invalid_properties = Array.new if @group_identifier.nil? invalid_properties.push("invalid value for 'group_identifier', group_identifier cannot be nil.") end if @group_identifier.to_s.length > 100 invalid_properties.push("invalid value for 'group_identifier', the character length must be smaller than or equal to 100.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
506 507 508 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 506 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
512 513 514 515 516 517 518 519 520 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 512 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
500 501 502 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 500 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
350 351 352 353 354 355 356 |
# File 'lib/connectwise-ruby-sdk/models/company_management_summary.rb', line 350 def valid? return false if @group_identifier.nil? return false if @group_identifier.to_s.length > 100 device_type_validator = EnumAttributeValidator.new('String', ["WorkstationsAndServers", "BackupStats", "Servers", "Workstations"]) return false unless device_type_validator.valid?(@device_type) return true end |