Class: ConnectWise::CompanyManagementSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/connect_wise/models/company_management_summary.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CompanyManagementSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Raises:

  • (ArgumentError)


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
# File 'lib/connect_wise/models/company_management_summary.rb', line 167

def initialize(attributes = {})
  raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::CompanyManagementSummary` initialize method' unless attributes.is_a?(Hash)

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) do |(k, v), h|
    raise ArgumentError, "`#{k}` is not a valid attribute in `ConnectWise::CompanyManagementSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym)

    h[k.to_sym] = v
  end

  self.group_identifier = attributes[:group_identifier] if attributes.key?(:group_identifier)

  self.id = attributes[:id] if attributes.key?(:id)

  self.management_solution = attributes[:management_solution] if attributes.key?(:management_solution)

  self.device_type = attributes[:device_type] if attributes.key?(:device_type)

  self.agreement = attributes[:agreement] if attributes.key?(:agreement)

  self.snmp_machines = attributes[:snmp_machines] if attributes.key?(:snmp_machines)

  self.total_workstations = attributes[:total_workstations] if attributes.key?(:total_workstations)

  self.total_servers = attributes[:total_servers] if attributes.key?(:total_servers)

  self.total_windows_servers = attributes[:total_windows_servers] if attributes.key?(:total_windows_servers)

  self.total_windows_workstations = attributes[:total_windows_workstations] if attributes.key?(:total_windows_workstations)

  self.total_managed_machines = attributes[:total_managed_machines] if attributes.key?(:total_managed_machines)

  self.servers_offline = attributes[:servers_offline] if attributes.key?(:servers_offline)

  self.servers_disk_space_low = attributes[:servers_disk_space_low] if attributes.key?(:servers_disk_space_low)

  self.failed_backup_jobs = attributes[:failed_backup_jobs] if attributes.key?(:failed_backup_jobs)

  self.total_notifications = attributes[:total_notifications] if attributes.key?(:total_notifications)

  self.successful_backup_jobs = attributes[:successful_backup_jobs] if attributes.key?(:successful_backup_jobs)

  self.server_availability = attributes[:server_availability] if attributes.key?(:server_availability)

  self.viruses_removed = attributes[:viruses_removed] if attributes.key?(:viruses_removed)

  self.spyware_items_removed = attributes[:spyware_items_removed] if attributes.key?(:spyware_items_removed)

  self.windows_patches_installed = attributes[:windows_patches_installed] if attributes.key?(:windows_patches_installed)

  self.disk_cleanups = attributes[:disk_cleanups] if attributes.key?(:disk_cleanups)

  self.disk_defragmentations = attributes[:disk_defragmentations] if attributes.key?(:disk_defragmentations)

  self.fully_patched_machines = attributes[:fully_patched_machines] if attributes.key?(:fully_patched_machines)

  self.missing_one_two_patches_machines = attributes[:missing_one_two_patches_machines] if attributes.key?(:missing_one_two_patches_machines)

  self.missing_three_five_patches_machines = attributes[:missing_three_five_patches_machines] if attributes.key?(:missing_three_five_patches_machines)

  self.missing_more_five_patches_machines = attributes[:missing_more_five_patches_machines] if attributes.key?(:missing_more_five_patches_machines)

  self.missing_unscanned_patches_machines = attributes[:missing_unscanned_patches_machines] if attributes.key?(:missing_unscanned_patches_machines)

  self.alerts_generated = attributes[:alerts_generated] if attributes.key?(:alerts_generated)

  self.internet_connectivity = attributes[:internet_connectivity] if attributes.key?(:internet_connectivity)

  self.disk_space_cleaned_mb = attributes[:disk_space_cleaned_mb] if attributes.key?(:disk_space_cleaned_mb)

  self.missing_security_patches = attributes[:missing_security_patches] if attributes.key?(:missing_security_patches)

  self.cpu_utilization = attributes[:cpu_utilization] if attributes.key?(:cpu_utilization)

  self.memory_utilization = attributes[:memory_utilization] if attributes.key?(:memory_utilization)

  self.company = attributes[:company] if attributes.key?(:company)

  return unless attributes.key?(:_info)
  return unless (value = attributes[:_info]).is_a?(Hash)

  self._info = value
end

Instance Attribute Details

#_infoObject

Returns the value of attribute _info.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def _info
  @_info
end

#agreementObject

Returns the value of attribute agreement.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def agreement
  @agreement
end

#alerts_generatedObject

Returns the value of attribute alerts_generated.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def alerts_generated
  @alerts_generated
end

#companyObject

Returns the value of attribute company.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def company
  @company
end

#cpu_utilizationObject

Returns the value of attribute cpu_utilization.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def cpu_utilization
  @cpu_utilization
end

#device_typeObject

deviceType is required if the managementSolution is Legacy



22
23
24
# File 'lib/connect_wise/models/company_management_summary.rb', line 22

def device_type
  @device_type
end

#disk_cleanupsObject

Returns the value of attribute disk_cleanups.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def disk_cleanups
  @disk_cleanups
end

#disk_defragmentationsObject

Returns the value of attribute disk_defragmentations.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def disk_defragmentations
  @disk_defragmentations
end

#disk_space_cleaned_mbObject

Returns the value of attribute disk_space_cleaned_mb.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def disk_space_cleaned_mb
  @disk_space_cleaned_mb
end

#failed_backup_jobsObject

Returns the value of attribute failed_backup_jobs.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def failed_backup_jobs
  @failed_backup_jobs
end

#fully_patched_machinesObject

Returns the value of attribute fully_patched_machines.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def fully_patched_machines
  @fully_patched_machines
end

#group_identifierObject

Max length: 100;



17
18
19
# File 'lib/connect_wise/models/company_management_summary.rb', line 17

def group_identifier
  @group_identifier
end

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def id
  @id
end

#internet_connectivityObject

Returns the value of attribute internet_connectivity.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def internet_connectivity
  @internet_connectivity
end

#management_solutionObject

Returns the value of attribute management_solution.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def management_solution
  @management_solution
end

#memory_utilizationObject

Returns the value of attribute memory_utilization.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def memory_utilization
  @memory_utilization
end

#missing_more_five_patches_machinesObject

Returns the value of attribute missing_more_five_patches_machines.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def missing_more_five_patches_machines
  @missing_more_five_patches_machines
end

#missing_one_two_patches_machinesObject

Returns the value of attribute missing_one_two_patches_machines.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def missing_one_two_patches_machines
  @missing_one_two_patches_machines
end

#missing_security_patchesObject

Returns the value of attribute missing_security_patches.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def missing_security_patches
  @missing_security_patches
end

#missing_three_five_patches_machinesObject

Returns the value of attribute missing_three_five_patches_machines.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def missing_three_five_patches_machines
  @missing_three_five_patches_machines
end

#missing_unscanned_patches_machinesObject

Returns the value of attribute missing_unscanned_patches_machines.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def missing_unscanned_patches_machines
  @missing_unscanned_patches_machines
end

#server_availabilityObject

Returns the value of attribute server_availability.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def server_availability
  @server_availability
end

#servers_disk_space_lowObject

Returns the value of attribute servers_disk_space_low.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def servers_disk_space_low
  @servers_disk_space_low
end

#servers_offlineObject

Returns the value of attribute servers_offline.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def servers_offline
  @servers_offline
end

#snmp_machinesObject

Returns the value of attribute snmp_machines.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def snmp_machines
  @snmp_machines
end

#spyware_items_removedObject

Returns the value of attribute spyware_items_removed.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def spyware_items_removed
  @spyware_items_removed
end

#successful_backup_jobsObject

Returns the value of attribute successful_backup_jobs.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def successful_backup_jobs
  @successful_backup_jobs
end

#total_managed_machinesObject

Returns the value of attribute total_managed_machines.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def total_managed_machines
  @total_managed_machines
end

#total_notificationsObject

Returns the value of attribute total_notifications.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def total_notifications
  @total_notifications
end

#total_serversObject

Returns the value of attribute total_servers.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def total_servers
  @total_servers
end

#total_windows_serversObject

Returns the value of attribute total_windows_servers.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def total_windows_servers
  @total_windows_servers
end

#total_windows_workstationsObject

Returns the value of attribute total_windows_workstations.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def total_windows_workstations
  @total_windows_workstations
end

#total_workstationsObject

Returns the value of attribute total_workstations.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def total_workstations
  @total_workstations
end

#viruses_removedObject

Returns the value of attribute viruses_removed.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def viruses_removed
  @viruses_removed
end

#windows_patches_installedObject

Returns the value of attribute windows_patches_installed.



19
20
21
# File 'lib/connect_wise/models/company_management_summary.rb', line 19

def windows_patches_installed
  @windows_patches_installed
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



87
88
89
# File 'lib/connect_wise/models/company_management_summary.rb', line 87

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/connect_wise/models/company_management_summary.rb', line 46

def self.attribute_map
  {
    group_identifier: :groupIdentifier,
    id: :id,
    management_solution: :managementSolution,
    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

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



338
339
340
# File 'lib/connect_wise/models/company_management_summary.rb', line 338

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/connect_wise/models/company_management_summary.rb', line 133

def self.openapi_nullable
  Set.new(%i[
            device_type
            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
            internet_connectivity
            disk_space_cleaned_mb
            cpu_utilization
            memory_utilization
          ])
end

.openapi_typesObject

Attribute type mapping.



92
93
94
95
96
97
98
99
100
101
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
# File 'lib/connect_wise/models/company_management_summary.rb', line 92

def self.openapi_types
  {
    group_identifier: :String,
    id: :Integer,
    management_solution: :ManagementSolutionReference,
    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: :'Hash<String, String>'
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/connect_wise/models/company_management_summary.rb', line 282

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    group_identifier == other.group_identifier &&
    id == other.id &&
    management_solution == other.management_solution &&
    device_type == other.device_type &&
    agreement == other.agreement &&
    snmp_machines == other.snmp_machines &&
    total_workstations == other.total_workstations &&
    total_servers == other.total_servers &&
    total_windows_servers == other.total_windows_servers &&
    total_windows_workstations == other.total_windows_workstations &&
    total_managed_machines == other.total_managed_machines &&
    servers_offline == other.servers_offline &&
    servers_disk_space_low == other.servers_disk_space_low &&
    failed_backup_jobs == other.failed_backup_jobs &&
    total_notifications == other.total_notifications &&
    successful_backup_jobs == other.successful_backup_jobs &&
    server_availability == other.server_availability &&
    viruses_removed == other.viruses_removed &&
    spyware_items_removed == other.spyware_items_removed &&
    windows_patches_installed == other.windows_patches_installed &&
    disk_cleanups == other.disk_cleanups &&
    disk_defragmentations == other.disk_defragmentations &&
    fully_patched_machines == other.fully_patched_machines &&
    missing_one_two_patches_machines == other.missing_one_two_patches_machines &&
    missing_three_five_patches_machines == other.missing_three_five_patches_machines &&
    missing_more_five_patches_machines == other.missing_more_five_patches_machines &&
    missing_unscanned_patches_machines == other.missing_unscanned_patches_machines &&
    alerts_generated == other.alerts_generated &&
    internet_connectivity == other.internet_connectivity &&
    disk_space_cleaned_mb == other.disk_space_cleaned_mb &&
    missing_security_patches == other.missing_security_patches &&
    cpu_utilization == other.cpu_utilization &&
    memory_utilization == other.memory_utilization &&
    company == other.company &&
    _info == other._info
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/connect_wise/models/company_management_summary.rb', line 368

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.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
    # models (e.g. Pet) or oneOf
    klass = ConnectWise.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



439
440
441
442
443
444
445
446
447
448
449
450
451
# File 'lib/connect_wise/models/company_management_summary.rb', line 439

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/connect_wise/models/company_management_summary.rb', line 345

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  attributes = attributes.transform_keys(&:to_sym)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) }) if attributes[self.class.attribute_map[key]].is_a?(Array)
    elsif !attributes[self.class.attribute_map[key]].nil?
      send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


325
326
327
# File 'lib/connect_wise/models/company_management_summary.rb', line 325

def eql?(other)
  self == other
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



331
332
333
# File 'lib/connect_wise/models/company_management_summary.rb', line 331

def hash
  [group_identifier, id, management_solution, 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_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



253
254
255
256
257
258
# File 'lib/connect_wise/models/company_management_summary.rb', line 253

def list_invalid_properties
  invalid_properties = []
  invalid_properties.push('invalid value for "group_identifier", group_identifier cannot be nil.') if @group_identifier.nil?

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



415
416
417
# File 'lib/connect_wise/models/company_management_summary.rb', line 415

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



421
422
423
424
425
426
427
428
429
430
431
432
433
# File 'lib/connect_wise/models/company_management_summary.rb', line 421

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



409
410
411
# File 'lib/connect_wise/models/company_management_summary.rb', line 409

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



262
263
264
265
266
267
268
269
# File 'lib/connect_wise/models/company_management_summary.rb', line 262

def valid?
  return false if @group_identifier.nil?

  device_type_validator = EnumAttributeValidator.new('String', %w[WorkstationsAndServers BackupStats Servers Workstations])
  return false unless device_type_validator.valid?(@device_type)

  true
end