Class: DatadogAPIClient::V1::UsageAttributionValues

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v1/models/usage_attribution_values.rb

Overview

Fields in Usage Summary by tag(s).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UsageAttributionValues

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 250

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageAttributionValues` initialize method"
  end

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

  if attributes.key?(:'api_percentage')
    self.api_percentage = attributes[:'api_percentage']
  end

  if attributes.key?(:'api_usage')
    self.api_usage = attributes[:'api_usage']
  end

  if attributes.key?(:'apm_host_percentage')
    self.apm_host_percentage = attributes[:'apm_host_percentage']
  end

  if attributes.key?(:'apm_host_usage')
    self.apm_host_usage = attributes[:'apm_host_usage']
  end

  if attributes.key?(:'browser_percentage')
    self.browser_percentage = attributes[:'browser_percentage']
  end

  if attributes.key?(:'browser_usage')
    self.browser_usage = attributes[:'browser_usage']
  end

  if attributes.key?(:'container_percentage')
    self.container_percentage = attributes[:'container_percentage']
  end

  if attributes.key?(:'container_usage')
    self.container_usage = attributes[:'container_usage']
  end

  if attributes.key?(:'cspm_container_percentage')
    self.cspm_container_percentage = attributes[:'cspm_container_percentage']
  end

  if attributes.key?(:'cspm_container_usage')
    self.cspm_container_usage = attributes[:'cspm_container_usage']
  end

  if attributes.key?(:'cspm_host_percentage')
    self.cspm_host_percentage = attributes[:'cspm_host_percentage']
  end

  if attributes.key?(:'cspm_host_usage')
    self.cspm_host_usage = attributes[:'cspm_host_usage']
  end

  if attributes.key?(:'custom_timeseries_percentage')
    self.custom_timeseries_percentage = attributes[:'custom_timeseries_percentage']
  end

  if attributes.key?(:'custom_timeseries_usage')
    self.custom_timeseries_usage = attributes[:'custom_timeseries_usage']
  end

  if attributes.key?(:'cws_container_percentage')
    self.cws_container_percentage = attributes[:'cws_container_percentage']
  end

  if attributes.key?(:'cws_container_usage')
    self.cws_container_usage = attributes[:'cws_container_usage']
  end

  if attributes.key?(:'cws_host_percentage')
    self.cws_host_percentage = attributes[:'cws_host_percentage']
  end

  if attributes.key?(:'cws_host_usage')
    self.cws_host_usage = attributes[:'cws_host_usage']
  end

  if attributes.key?(:'dbm_hosts_percentage')
    self.dbm_hosts_percentage = attributes[:'dbm_hosts_percentage']
  end

  if attributes.key?(:'dbm_hosts_usage')
    self.dbm_hosts_usage = attributes[:'dbm_hosts_usage']
  end

  if attributes.key?(:'dbm_queries_percentage')
    self.dbm_queries_percentage = attributes[:'dbm_queries_percentage']
  end

  if attributes.key?(:'dbm_queries_usage')
    self.dbm_queries_usage = attributes[:'dbm_queries_usage']
  end

  if attributes.key?(:'estimated_indexed_logs_percentage')
    self.estimated_indexed_logs_percentage = attributes[:'estimated_indexed_logs_percentage']
  end

  if attributes.key?(:'estimated_indexed_logs_usage')
    self.estimated_indexed_logs_usage = attributes[:'estimated_indexed_logs_usage']
  end

  if attributes.key?(:'infra_host_percentage')
    self.infra_host_percentage = attributes[:'infra_host_percentage']
  end

  if attributes.key?(:'infra_host_usage')
    self.infra_host_usage = attributes[:'infra_host_usage']
  end

  if attributes.key?(:'lambda_functions_percentage')
    self.lambda_functions_percentage = attributes[:'lambda_functions_percentage']
  end

  if attributes.key?(:'lambda_functions_usage')
    self.lambda_functions_usage = attributes[:'lambda_functions_usage']
  end

  if attributes.key?(:'lambda_invocations_percentage')
    self.lambda_invocations_percentage = attributes[:'lambda_invocations_percentage']
  end

  if attributes.key?(:'lambda_invocations_usage')
    self.lambda_invocations_usage = attributes[:'lambda_invocations_usage']
  end

  if attributes.key?(:'lambda_percentage')
    self.lambda_percentage = attributes[:'lambda_percentage']
  end

  if attributes.key?(:'lambda_usage')
    self.lambda_usage = attributes[:'lambda_usage']
  end

  if attributes.key?(:'npm_host_percentage')
    self.npm_host_percentage = attributes[:'npm_host_percentage']
  end

  if attributes.key?(:'npm_host_usage')
    self.npm_host_usage = attributes[:'npm_host_usage']
  end

  if attributes.key?(:'profiled_container_percentage')
    self.profiled_container_percentage = attributes[:'profiled_container_percentage']
  end

  if attributes.key?(:'profiled_container_usage')
    self.profiled_container_usage = attributes[:'profiled_container_usage']
  end

  if attributes.key?(:'profiled_hosts_percentage')
    self.profiled_hosts_percentage = attributes[:'profiled_hosts_percentage']
  end

  if attributes.key?(:'profiled_hosts_usage')
    self.profiled_hosts_usage = attributes[:'profiled_hosts_usage']
  end

  if attributes.key?(:'snmp_percentage')
    self.snmp_percentage = attributes[:'snmp_percentage']
  end

  if attributes.key?(:'snmp_usage')
    self.snmp_usage = attributes[:'snmp_usage']
  end
end

Instance Attribute Details

#_unparsedObject

whether the object has unparsed attributes



23
24
25
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 23

def _unparsed
  @_unparsed
end

#api_percentageObject

The percentage of synthetic API test usage by tag(s).



26
27
28
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 26

def api_percentage
  @api_percentage
end

#api_usageObject

The synthetic API test usage by tag(s).



29
30
31
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 29

def api_usage
  @api_usage
end

#apm_host_percentageObject

The percentage of APM host usage by tag(s).



32
33
34
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 32

def apm_host_percentage
  @apm_host_percentage
end

#apm_host_usageObject

The APM host usage by tag(s).



35
36
37
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 35

def apm_host_usage
  @apm_host_usage
end

#browser_percentageObject

The percentage of synthetic browser test usage by tag(s).



38
39
40
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 38

def browser_percentage
  @browser_percentage
end

#browser_usageObject

The synthetic browser test usage by tag(s).



41
42
43
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 41

def browser_usage
  @browser_usage
end

#container_percentageObject

The percentage of container usage by tag(s).



44
45
46
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 44

def container_percentage
  @container_percentage
end

#container_usageObject

The container usage by tag(s).



47
48
49
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 47

def container_usage
  @container_usage
end

#cspm_container_percentageObject

The percentage of Cloud Security Posture Management container usage by tag(s)



50
51
52
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 50

def cspm_container_percentage
  @cspm_container_percentage
end

#cspm_container_usageObject

The Cloud Security Posture Management container usage by tag(s)



53
54
55
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 53

def cspm_container_usage
  @cspm_container_usage
end

#cspm_host_percentageObject

The percentage of Cloud Security Posture Management host usage by tag(s)



56
57
58
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 56

def cspm_host_percentage
  @cspm_host_percentage
end

#cspm_host_usageObject

The Cloud Security Posture Management host usage by tag(s)



59
60
61
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 59

def cspm_host_usage
  @cspm_host_usage
end

#custom_timeseries_percentageObject

The percentage of custom metrics usage by tag(s).



62
63
64
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 62

def custom_timeseries_percentage
  @custom_timeseries_percentage
end

#custom_timeseries_usageObject

The custom metrics usage by tag(s).



65
66
67
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 65

def custom_timeseries_usage
  @custom_timeseries_usage
end

#cws_container_percentageObject

The percentage of Cloud Workload Security container usage by tag(s)



68
69
70
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 68

def cws_container_percentage
  @cws_container_percentage
end

#cws_container_usageObject

The Cloud Workload Security container usage by tag(s)



71
72
73
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 71

def cws_container_usage
  @cws_container_usage
end

#cws_host_percentageObject

The percentage of Cloud Workload Security host usage by tag(s)



74
75
76
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 74

def cws_host_percentage
  @cws_host_percentage
end

#cws_host_usageObject

The Cloud Workload Security host usage by tag(s)



77
78
79
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 77

def cws_host_usage
  @cws_host_usage
end

#dbm_hosts_percentageObject

The percentage of Database Monitoring host usage by tag(s).



80
81
82
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 80

def dbm_hosts_percentage
  @dbm_hosts_percentage
end

#dbm_hosts_usageObject

The Database Monitoring host usage by tag(s).



83
84
85
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 83

def dbm_hosts_usage
  @dbm_hosts_usage
end

#dbm_queries_percentageObject

The percentage of Database Monitoring normalized queries usage by tag(s).



86
87
88
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 86

def dbm_queries_percentage
  @dbm_queries_percentage
end

#dbm_queries_usageObject

The Database Monitoring normalized queries usage by tag(s).



89
90
91
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 89

def dbm_queries_usage
  @dbm_queries_usage
end

#estimated_indexed_logs_percentageObject

The percentage of estimated live indexed logs usage by tag(s). Note this field is in private beta.



92
93
94
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 92

def estimated_indexed_logs_percentage
  @estimated_indexed_logs_percentage
end

#estimated_indexed_logs_usageObject

The estimated live indexed logs usage by tag(s). Note this field is in private beta.



95
96
97
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 95

def estimated_indexed_logs_usage
  @estimated_indexed_logs_usage
end

#infra_host_percentageObject

The percentage of infrastructure host usage by tag(s).



98
99
100
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 98

def infra_host_percentage
  @infra_host_percentage
end

#infra_host_usageObject

The infrastructure host usage by tag(s).



101
102
103
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 101

def infra_host_usage
  @infra_host_usage
end

#lambda_functions_percentageObject

The percentage of Lambda function usage by tag(s).



104
105
106
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 104

def lambda_functions_percentage
  @lambda_functions_percentage
end

#lambda_functions_usageObject

The Lambda function usage by tag(s).



107
108
109
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 107

def lambda_functions_usage
  @lambda_functions_usage
end

#lambda_invocations_percentageObject

The percentage of Lambda invocation usage by tag(s).



110
111
112
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 110

def lambda_invocations_percentage
  @lambda_invocations_percentage
end

#lambda_invocations_usageObject

The Lambda invocation usage by tag(s).



113
114
115
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 113

def lambda_invocations_usage
  @lambda_invocations_usage
end

#lambda_percentageObject

The percentage of Lambda function usage by tag(s). Note this field is deprecated. Use lambda_functions_percentage instead.



116
117
118
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 116

def lambda_percentage
  @lambda_percentage
end

#lambda_usageObject

The Lambda function usage by tag(s). Note this field is deprecated. Use lambda_functions_usage instead.



119
120
121
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 119

def lambda_usage
  @lambda_usage
end

#npm_host_percentageObject

The percentage of network host usage by tag(s).



122
123
124
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 122

def npm_host_percentage
  @npm_host_percentage
end

#npm_host_usageObject

The network host usage by tag(s).



125
126
127
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 125

def npm_host_usage
  @npm_host_usage
end

#profiled_container_percentageObject

The percentage of profiled containers usage by tag(s).



128
129
130
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 128

def profiled_container_percentage
  @profiled_container_percentage
end

#profiled_container_usageObject

The profiled container usage by tag(s).



131
132
133
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 131

def profiled_container_usage
  @profiled_container_usage
end

#profiled_hosts_percentageObject

The percentage of profiled hosts usage by tag(s).



134
135
136
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 134

def profiled_hosts_percentage
  @profiled_hosts_percentage
end

#profiled_hosts_usageObject

The profiled host usage by tag(s).



137
138
139
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 137

def profiled_hosts_usage
  @profiled_hosts_usage
end

#snmp_percentageObject

The percentage of network device usage by tag(s).



140
141
142
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 140

def snmp_percentage
  @snmp_percentage
end

#snmp_usageObject

The network device usage by tag(s).



143
144
145
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 143

def snmp_usage
  @snmp_usage
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



192
193
194
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 192

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



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
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 146

def self.attribute_map
  {
    :'api_percentage' => :'api_percentage',
    :'api_usage' => :'api_usage',
    :'apm_host_percentage' => :'apm_host_percentage',
    :'apm_host_usage' => :'apm_host_usage',
    :'browser_percentage' => :'browser_percentage',
    :'browser_usage' => :'browser_usage',
    :'container_percentage' => :'container_percentage',
    :'container_usage' => :'container_usage',
    :'cspm_container_percentage' => :'cspm_container_percentage',
    :'cspm_container_usage' => :'cspm_container_usage',
    :'cspm_host_percentage' => :'cspm_host_percentage',
    :'cspm_host_usage' => :'cspm_host_usage',
    :'custom_timeseries_percentage' => :'custom_timeseries_percentage',
    :'custom_timeseries_usage' => :'custom_timeseries_usage',
    :'cws_container_percentage' => :'cws_container_percentage',
    :'cws_container_usage' => :'cws_container_usage',
    :'cws_host_percentage' => :'cws_host_percentage',
    :'cws_host_usage' => :'cws_host_usage',
    :'dbm_hosts_percentage' => :'dbm_hosts_percentage',
    :'dbm_hosts_usage' => :'dbm_hosts_usage',
    :'dbm_queries_percentage' => :'dbm_queries_percentage',
    :'dbm_queries_usage' => :'dbm_queries_usage',
    :'estimated_indexed_logs_percentage' => :'estimated_indexed_logs_percentage',
    :'estimated_indexed_logs_usage' => :'estimated_indexed_logs_usage',
    :'infra_host_percentage' => :'infra_host_percentage',
    :'infra_host_usage' => :'infra_host_usage',
    :'lambda_functions_percentage' => :'lambda_functions_percentage',
    :'lambda_functions_usage' => :'lambda_functions_usage',
    :'lambda_invocations_percentage' => :'lambda_invocations_percentage',
    :'lambda_invocations_usage' => :'lambda_invocations_usage',
    :'lambda_percentage' => :'lambda_percentage',
    :'lambda_usage' => :'lambda_usage',
    :'npm_host_percentage' => :'npm_host_percentage',
    :'npm_host_usage' => :'npm_host_usage',
    :'profiled_container_percentage' => :'profiled_container_percentage',
    :'profiled_container_usage' => :'profiled_container_usage',
    :'profiled_hosts_percentage' => :'profiled_hosts_percentage',
    :'profiled_hosts_usage' => :'profiled_hosts_usage',
    :'snmp_percentage' => :'snmp_percentage',
    :'snmp_usage' => :'snmp_usage'
  }
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



499
500
501
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 499

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

.openapi_nullableObject

List of attributes with nullable: true



243
244
245
246
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 243

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 197

def self.openapi_types
  {
    :'api_percentage' => :'Float',
    :'api_usage' => :'Float',
    :'apm_host_percentage' => :'Float',
    :'apm_host_usage' => :'Float',
    :'browser_percentage' => :'Float',
    :'browser_usage' => :'Float',
    :'container_percentage' => :'Float',
    :'container_usage' => :'Float',
    :'cspm_container_percentage' => :'Float',
    :'cspm_container_usage' => :'Float',
    :'cspm_host_percentage' => :'Float',
    :'cspm_host_usage' => :'Float',
    :'custom_timeseries_percentage' => :'Float',
    :'custom_timeseries_usage' => :'Float',
    :'cws_container_percentage' => :'Float',
    :'cws_container_usage' => :'Float',
    :'cws_host_percentage' => :'Float',
    :'cws_host_usage' => :'Float',
    :'dbm_hosts_percentage' => :'Float',
    :'dbm_hosts_usage' => :'Float',
    :'dbm_queries_percentage' => :'Float',
    :'dbm_queries_usage' => :'Float',
    :'estimated_indexed_logs_percentage' => :'Float',
    :'estimated_indexed_logs_usage' => :'Float',
    :'infra_host_percentage' => :'Float',
    :'infra_host_usage' => :'Float',
    :'lambda_functions_percentage' => :'Float',
    :'lambda_functions_usage' => :'Float',
    :'lambda_invocations_percentage' => :'Float',
    :'lambda_invocations_usage' => :'Float',
    :'lambda_percentage' => :'Float',
    :'lambda_usage' => :'Float',
    :'npm_host_percentage' => :'Float',
    :'npm_host_usage' => :'Float',
    :'profiled_container_percentage' => :'Float',
    :'profiled_container_usage' => :'Float',
    :'profiled_hosts_percentage' => :'Float',
    :'profiled_hosts_usage' => :'Float',
    :'snmp_percentage' => :'Float',
    :'snmp_usage' => :'Float'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 439

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      api_percentage == o.api_percentage &&
      api_usage == o.api_usage &&
      apm_host_percentage == o.apm_host_percentage &&
      apm_host_usage == o.apm_host_usage &&
      browser_percentage == o.browser_percentage &&
      browser_usage == o.browser_usage &&
      container_percentage == o.container_percentage &&
      container_usage == o.container_usage &&
      cspm_container_percentage == o.cspm_container_percentage &&
      cspm_container_usage == o.cspm_container_usage &&
      cspm_host_percentage == o.cspm_host_percentage &&
      cspm_host_usage == o.cspm_host_usage &&
      custom_timeseries_percentage == o.custom_timeseries_percentage &&
      custom_timeseries_usage == o.custom_timeseries_usage &&
      cws_container_percentage == o.cws_container_percentage &&
      cws_container_usage == o.cws_container_usage &&
      cws_host_percentage == o.cws_host_percentage &&
      cws_host_usage == o.cws_host_usage &&
      dbm_hosts_percentage == o.dbm_hosts_percentage &&
      dbm_hosts_usage == o.dbm_hosts_usage &&
      dbm_queries_percentage == o.dbm_queries_percentage &&
      dbm_queries_usage == o.dbm_queries_usage &&
      estimated_indexed_logs_percentage == o.estimated_indexed_logs_percentage &&
      estimated_indexed_logs_usage == o.estimated_indexed_logs_usage &&
      infra_host_percentage == o.infra_host_percentage &&
      infra_host_usage == o.infra_host_usage &&
      lambda_functions_percentage == o.lambda_functions_percentage &&
      lambda_functions_usage == o.lambda_functions_usage &&
      lambda_invocations_percentage == o.lambda_invocations_percentage &&
      lambda_invocations_usage == o.lambda_invocations_usage &&
      lambda_percentage == o.lambda_percentage &&
      lambda_usage == o.lambda_usage &&
      npm_host_percentage == o.npm_host_percentage &&
      npm_host_usage == o.npm_host_usage &&
      profiled_container_percentage == o.profiled_container_percentage &&
      profiled_container_usage == o.profiled_container_usage &&
      profiled_hosts_percentage == o.profiled_hosts_percentage &&
      profiled_hosts_usage == o.profiled_hosts_usage &&
      snmp_percentage == o.snmp_percentage &&
      snmp_usage == o.snmp_usage
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



529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 529

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 :Array
    # generic array, 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 = DatadogAPIClient::V1.const_get(type)
    res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
    if res.instance_of? DatadogAPIClient::V1::UnparsedObject
      self._unparsed = true
    end
    res
  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



607
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 607

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



506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 506

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.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
      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
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


486
487
488
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 486

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



492
493
494
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 492

def hash
  [api_percentage, api_usage, apm_host_percentage, apm_host_usage, browser_percentage, browser_usage, container_percentage, container_usage, cspm_container_percentage, cspm_container_usage, cspm_host_percentage, cspm_host_usage, custom_timeseries_percentage, custom_timeseries_usage, cws_container_percentage, cws_container_usage, cws_host_percentage, cws_host_usage, dbm_hosts_percentage, dbm_hosts_usage, dbm_queries_percentage, dbm_queries_usage, estimated_indexed_logs_percentage, estimated_indexed_logs_usage, infra_host_percentage, infra_host_usage, lambda_functions_percentage, lambda_functions_usage, lambda_invocations_percentage, lambda_invocations_usage, lambda_percentage, lambda_usage, npm_host_percentage, npm_host_usage, profiled_container_percentage, profiled_container_usage, profiled_hosts_percentage, profiled_hosts_usage, snmp_percentage, snmp_usage].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



426
427
428
429
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 426

def list_invalid_properties
  invalid_properties = Array.new
  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



583
584
585
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 583

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



589
590
591
592
593
594
595
596
597
598
599
600
601
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 589

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.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



577
578
579
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 577

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



433
434
435
# File 'lib/datadog_api_client/v1/models/usage_attribution_values.rb', line 433

def valid?
  true
end