Class: Nodeum::TapeStat

Inherits:
Object
  • Object
show all
Defined in:
lib/nodeum_sdk/models/tape_stat.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ TapeStat

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 237

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Nodeum::TapeStat` 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 `Nodeum::TapeStat`. 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?(:'log_time')
    self.log_time = attributes[:'log_time']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#barcodeObject

Returns the value of attribute barcode.



19
20
21
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 19

def barcode
  @barcode
end

#beginning_of_medium_passesObject

Returns the value of attribute beginning_of_medium_passes.



67
68
69
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 67

def beginning_of_medium_passes
  @beginning_of_medium_passes
end

#bytes_read_from_mediumObject

Returns the value of attribute bytes_read_from_medium.



81
82
83
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 81

def bytes_read_from_medium
  @bytes_read_from_medium
end

#bytes_transferred_from_app_clientObject

Returns the value of attribute bytes_transferred_from_app_client.



85
86
87
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 85

def bytes_transferred_from_app_client
  @bytes_transferred_from_app_client
end

#bytes_transferred_to_app_clientObject

Returns the value of attribute bytes_transferred_to_app_client.



77
78
79
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 77

def bytes_transferred_to_app_client
  @bytes_transferred_to_app_client
end

#bytes_written_to_mediumObject

Returns the value of attribute bytes_written_to_medium.



89
90
91
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 89

def bytes_written_to_medium
  @bytes_written_to_medium
end

#data_compression_enabledObject

Returns the value of attribute data_compression_enabled.



91
92
93
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 91

def data_compression_enabled
  @data_compression_enabled
end

#datasets_readObject

Returns the value of attribute datasets_read.



25
26
27
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 25

def datasets_read
  @datasets_read
end

#datasets_writtenObject

Returns the value of attribute datasets_written.



23
24
25
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 23

def datasets_written
  @datasets_written
end

#fatal_suspended_readsObject

Returns the value of attribute fatal_suspended_reads.



107
108
109
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 107

def fatal_suspended_reads
  @fatal_suspended_reads
end

#fatal_suspended_writesObject

Returns the value of attribute fatal_suspended_writes.



99
100
101
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 99

def fatal_suspended_writes
  @fatal_suspended_writes
end

#last_load_read_compression_ratioObject

Returns the value of attribute last_load_read_compression_ratio.



53
54
55
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 53

def last_load_read_compression_ratio
  @last_load_read_compression_ratio
end

#last_load_write_compression_ratioObject

Returns the value of attribute last_load_write_compression_ratio.



51
52
53
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 51

def last_load_write_compression_ratio
  @last_load_write_compression_ratio
end

#last_mount_mbytes_readObject

Returns the value of attribute last_mount_mbytes_read.



45
46
47
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 45

def last_mount_mbytes_read
  @last_mount_mbytes_read
end

#last_mount_mbytes_writtenObject

Returns the value of attribute last_mount_mbytes_written.



43
44
45
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 43

def last_mount_mbytes_written
  @last_mount_mbytes_written
end

#last_mount_unrecovered_read_errorsObject

Returns the value of attribute last_mount_unrecovered_read_errors.



41
42
43
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 41

def last_mount_unrecovered_read_errors
  @last_mount_unrecovered_read_errors
end

#last_mount_unrecovered_write_errorsObject

Returns the value of attribute last_mount_unrecovered_write_errors.



39
40
41
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 39

def last_mount_unrecovered_write_errors
  @last_mount_unrecovered_write_errors
end

#lifetime_mbytes_readObject

Returns the value of attribute lifetime_mbytes_read.



49
50
51
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 49

def lifetime_mbytes_read
  @lifetime_mbytes_read
end

#lifetime_mbytes_writtenObject

Returns the value of attribute lifetime_mbytes_written.



47
48
49
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 47

def lifetime_mbytes_written
  @lifetime_mbytes_written
end

#log_timeObject

Returns the value of attribute log_time.



17
18
19
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 17

def log_time
  @log_time
end

#mbytes_read_from_mediumObject

Returns the value of attribute mbytes_read_from_medium.



79
80
81
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 79

def mbytes_read_from_medium
  @mbytes_read_from_medium
end

#mbytes_transferred_from_app_clientObject

Returns the value of attribute mbytes_transferred_from_app_client.



83
84
85
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 83

def mbytes_transferred_from_app_client
  @mbytes_transferred_from_app_client
end

#mbytes_transferred_to_app_clientObject

Returns the value of attribute mbytes_transferred_to_app_client.



75
76
77
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 75

def mbytes_transferred_to_app_client
  @mbytes_transferred_to_app_client
end

#mbytes_written_to_mediumObject

Returns the value of attribute mbytes_written_to_medium.



87
88
89
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 87

def mbytes_written_to_medium
  @mbytes_written_to_medium
end

#medium_mount_timeObject

Returns the value of attribute medium_mount_time.



55
56
57
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 55

def medium_mount_time
  @medium_mount_time
end

#medium_ready_timeObject

Returns the value of attribute medium_ready_time.



57
58
59
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 57

def medium_ready_time
  @medium_ready_time
end

#middle_of_tape_passesObject

Returns the value of attribute middle_of_tape_passes.



69
70
71
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 69

def middle_of_tape_passes
  @middle_of_tape_passes
end

#mountsObject

Returns the value of attribute mounts.



21
22
23
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 21

def mounts
  @mounts
end

#partition_0_maximum_capacityObject

Returns the value of attribute partition_0_maximum_capacity.



113
114
115
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 113

def partition_0_maximum_capacity
  @partition_0_maximum_capacity
end

#partition_0_remaining_capacityObject

Returns the value of attribute partition_0_remaining_capacity.



109
110
111
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 109

def partition_0_remaining_capacity
  @partition_0_remaining_capacity
end

#partition_1_maximum_capacityObject

Returns the value of attribute partition_1_maximum_capacity.



115
116
117
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 115

def partition_1_maximum_capacity
  @partition_1_maximum_capacity
end

#partition_1_remaining_capacityObject

Returns the value of attribute partition_1_remaining_capacity.



111
112
113
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 111

def partition_1_remaining_capacity
  @partition_1_remaining_capacity
end

#read_compression_ratioObject

Returns the value of attribute read_compression_ratio.



71
72
73
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 71

def read_compression_ratio
  @read_compression_ratio
end

#read_permsObject

Returns the value of attribute read_perms.



103
104
105
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 103

def read_perms
  @read_perms
end

#read_retriesObject

Returns the value of attribute read_retries.



101
102
103
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 101

def read_retries
  @read_retries
end

#recovered_read_errorsObject

Returns the value of attribute recovered_read_errors.



35
36
37
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 35

def recovered_read_errors
  @recovered_read_errors
end

#recovered_write_data_errorsObject

Returns the value of attribute recovered_write_data_errors.



27
28
29
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 27

def recovered_write_data_errors
  @recovered_write_data_errors
end

#suspended_readsObject

Returns the value of attribute suspended_reads.



105
106
107
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 105

def suspended_reads
  @suspended_reads
end

#suspended_writesObject

Returns the value of attribute suspended_writes.



97
98
99
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 97

def suspended_writes
  @suspended_writes
end

#total_native_capacityObject

Returns the value of attribute total_native_capacity.



59
60
61
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 59

def total_native_capacity
  @total_native_capacity
end

#total_used_native_capacityObject

Returns the value of attribute total_used_native_capacity.



61
62
63
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 61

def total_used_native_capacity
  @total_used_native_capacity
end

#unrecovered_read_errorsObject

Returns the value of attribute unrecovered_read_errors.



37
38
39
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 37

def unrecovered_read_errors
  @unrecovered_read_errors
end

#unrecovered_write_data_errorsObject

Returns the value of attribute unrecovered_write_data_errors.



29
30
31
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 29

def unrecovered_write_data_errors
  @unrecovered_write_data_errors
end

#unrecovered_write_servo_errorsObject

Returns the value of attribute unrecovered_write_servo_errors.



33
34
35
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 33

def unrecovered_write_servo_errors
  @unrecovered_write_servo_errors
end

#wormObject

Returns the value of attribute worm.



65
66
67
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 65

def worm
  @worm
end

#write_compression_ratioObject

Returns the value of attribute write_compression_ratio.



73
74
75
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 73

def write_compression_ratio
  @write_compression_ratio
end

#write_permsObject

Returns the value of attribute write_perms.



95
96
97
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 95

def write_perms
  @write_perms
end

#write_protectObject

Returns the value of attribute write_protect.



63
64
65
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 63

def write_protect
  @write_protect
end

#write_retriesObject

Returns the value of attribute write_retries.



93
94
95
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 93

def write_retries
  @write_retries
end

#write_servo_errorsObject

Returns the value of attribute write_servo_errors.



31
32
33
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 31

def write_servo_errors
  @write_servo_errors
end

Class Method Details

.attribute_mapObject

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



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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
164
165
166
167
168
169
170
171
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 118

def self.attribute_map
  {
    :'log_time' => :'log_time',
    :'barcode' => :'barcode',
    :'mounts' => :'mounts',
    :'datasets_written' => :'datasets_written',
    :'datasets_read' => :'datasets_read',
    :'recovered_write_data_errors' => :'recovered_write_data_errors',
    :'unrecovered_write_data_errors' => :'unrecovered_write_data_errors',
    :'write_servo_errors' => :'write_servo_errors',
    :'unrecovered_write_servo_errors' => :'unrecovered_write_servo_errors',
    :'recovered_read_errors' => :'recovered_read_errors',
    :'unrecovered_read_errors' => :'unrecovered_read_errors',
    :'last_mount_unrecovered_write_errors' => :'last_mount_unrecovered_write_errors',
    :'last_mount_unrecovered_read_errors' => :'last_mount_unrecovered_read_errors',
    :'last_mount_mbytes_written' => :'last_mount_mbytes_written',
    :'last_mount_mbytes_read' => :'last_mount_mbytes_read',
    :'lifetime_mbytes_written' => :'lifetime_mbytes_written',
    :'lifetime_mbytes_read' => :'lifetime_mbytes_read',
    :'last_load_write_compression_ratio' => :'last_load_write_compression_ratio',
    :'last_load_read_compression_ratio' => :'last_load_read_compression_ratio',
    :'medium_mount_time' => :'medium_mount_time',
    :'medium_ready_time' => :'medium_ready_time',
    :'total_native_capacity' => :'total_native_capacity',
    :'total_used_native_capacity' => :'total_used_native_capacity',
    :'write_protect' => :'write_protect',
    :'worm' => :'worm',
    :'beginning_of_medium_passes' => :'beginning_of_medium_passes',
    :'middle_of_tape_passes' => :'middle_of_tape_passes',
    :'read_compression_ratio' => :'read_compression_ratio',
    :'write_compression_ratio' => :'write_compression_ratio',
    :'mbytes_transferred_to_app_client' => :'mbytes_transferred_to_app_client',
    :'bytes_transferred_to_app_client' => :'bytes_transferred_to_app_client',
    :'mbytes_read_from_medium' => :'mbytes_read_from_medium',
    :'bytes_read_from_medium' => :'bytes_read_from_medium',
    :'mbytes_transferred_from_app_client' => :'mbytes_transferred_from_app_client',
    :'bytes_transferred_from_app_client' => :'bytes_transferred_from_app_client',
    :'mbytes_written_to_medium' => :'mbytes_written_to_medium',
    :'bytes_written_to_medium' => :'bytes_written_to_medium',
    :'data_compression_enabled' => :'data_compression_enabled',
    :'write_retries' => :'write_retries',
    :'write_perms' => :'write_perms',
    :'suspended_writes' => :'suspended_writes',
    :'fatal_suspended_writes' => :'fatal_suspended_writes',
    :'read_retries' => :'read_retries',
    :'read_perms' => :'read_perms',
    :'suspended_reads' => :'suspended_reads',
    :'fatal_suspended_reads' => :'fatal_suspended_reads',
    :'partition_0_remaining_capacity' => :'partition_0_remaining_capacity',
    :'partition_1_remaining_capacity' => :'partition_1_remaining_capacity',
    :'partition_0_maximum_capacity' => :'partition_0_maximum_capacity',
    :'partition_1_maximum_capacity' => :'partition_1_maximum_capacity'
  }
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



536
537
538
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 536

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

.openapi_nullableObject

List of attributes with nullable: true



230
231
232
233
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 230

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

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 174

def self.openapi_types
  {
    :'log_time' => :'String',
    :'barcode' => :'String',
    :'mounts' => :'Integer',
    :'datasets_written' => :'Integer',
    :'datasets_read' => :'Integer',
    :'recovered_write_data_errors' => :'Integer',
    :'unrecovered_write_data_errors' => :'Integer',
    :'write_servo_errors' => :'Integer',
    :'unrecovered_write_servo_errors' => :'Integer',
    :'recovered_read_errors' => :'Integer',
    :'unrecovered_read_errors' => :'Integer',
    :'last_mount_unrecovered_write_errors' => :'Integer',
    :'last_mount_unrecovered_read_errors' => :'Integer',
    :'last_mount_mbytes_written' => :'Integer',
    :'last_mount_mbytes_read' => :'Integer',
    :'lifetime_mbytes_written' => :'Integer',
    :'lifetime_mbytes_read' => :'Integer',
    :'last_load_write_compression_ratio' => :'Integer',
    :'last_load_read_compression_ratio' => :'Integer',
    :'medium_mount_time' => :'Integer',
    :'medium_ready_time' => :'Integer',
    :'total_native_capacity' => :'Integer',
    :'total_used_native_capacity' => :'Integer',
    :'write_protect' => :'Integer',
    :'worm' => :'Integer',
    :'beginning_of_medium_passes' => :'Integer',
    :'middle_of_tape_passes' => :'Integer',
    :'read_compression_ratio' => :'Integer',
    :'write_compression_ratio' => :'Integer',
    :'mbytes_transferred_to_app_client' => :'Integer',
    :'bytes_transferred_to_app_client' => :'Integer',
    :'mbytes_read_from_medium' => :'Integer',
    :'bytes_read_from_medium' => :'Integer',
    :'mbytes_transferred_from_app_client' => :'Integer',
    :'bytes_transferred_from_app_client' => :'Integer',
    :'mbytes_written_to_medium' => :'Integer',
    :'bytes_written_to_medium' => :'Integer',
    :'data_compression_enabled' => :'Integer',
    :'write_retries' => :'Integer',
    :'write_perms' => :'Integer',
    :'suspended_writes' => :'Integer',
    :'fatal_suspended_writes' => :'Integer',
    :'read_retries' => :'Integer',
    :'read_perms' => :'Integer',
    :'suspended_reads' => :'Integer',
    :'fatal_suspended_reads' => :'Integer',
    :'partition_0_remaining_capacity' => :'Integer',
    :'partition_1_remaining_capacity' => :'Integer',
    :'partition_0_maximum_capacity' => :'Integer',
    :'partition_1_maximum_capacity' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 466

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      log_time == o.log_time &&
      barcode == o.barcode &&
      mounts == o.mounts &&
      datasets_written == o.datasets_written &&
      datasets_read == o.datasets_read &&
      recovered_write_data_errors == o.recovered_write_data_errors &&
      unrecovered_write_data_errors == o.unrecovered_write_data_errors &&
      write_servo_errors == o.write_servo_errors &&
      unrecovered_write_servo_errors == o.unrecovered_write_servo_errors &&
      recovered_read_errors == o.recovered_read_errors &&
      unrecovered_read_errors == o.unrecovered_read_errors &&
      last_mount_unrecovered_write_errors == o.last_mount_unrecovered_write_errors &&
      last_mount_unrecovered_read_errors == o.last_mount_unrecovered_read_errors &&
      last_mount_mbytes_written == o.last_mount_mbytes_written &&
      last_mount_mbytes_read == o.last_mount_mbytes_read &&
      lifetime_mbytes_written == o.lifetime_mbytes_written &&
      lifetime_mbytes_read == o.lifetime_mbytes_read &&
      last_load_write_compression_ratio == o.last_load_write_compression_ratio &&
      last_load_read_compression_ratio == o.last_load_read_compression_ratio &&
      medium_mount_time == o.medium_mount_time &&
      medium_ready_time == o.medium_ready_time &&
      total_native_capacity == o.total_native_capacity &&
      total_used_native_capacity == o.total_used_native_capacity &&
      write_protect == o.write_protect &&
      worm == o.worm &&
      beginning_of_medium_passes == o.beginning_of_medium_passes &&
      middle_of_tape_passes == o.middle_of_tape_passes &&
      read_compression_ratio == o.read_compression_ratio &&
      write_compression_ratio == o.write_compression_ratio &&
      mbytes_transferred_to_app_client == o.mbytes_transferred_to_app_client &&
      bytes_transferred_to_app_client == o.bytes_transferred_to_app_client &&
      mbytes_read_from_medium == o.mbytes_read_from_medium &&
      bytes_read_from_medium == o.bytes_read_from_medium &&
      mbytes_transferred_from_app_client == o.mbytes_transferred_from_app_client &&
      bytes_transferred_from_app_client == o.bytes_transferred_from_app_client &&
      mbytes_written_to_medium == o.mbytes_written_to_medium &&
      bytes_written_to_medium == o.bytes_written_to_medium &&
      data_compression_enabled == o.data_compression_enabled &&
      write_retries == o.write_retries &&
      write_perms == o.write_perms &&
      suspended_writes == o.suspended_writes &&
      fatal_suspended_writes == o.fatal_suspended_writes &&
      read_retries == o.read_retries &&
      read_perms == o.read_perms &&
      suspended_reads == o.suspended_reads &&
      fatal_suspended_reads == o.fatal_suspended_reads &&
      partition_0_remaining_capacity == o.partition_0_remaining_capacity &&
      partition_1_remaining_capacity == o.partition_1_remaining_capacity &&
      partition_0_maximum_capacity == o.partition_0_maximum_capacity &&
      partition_1_maximum_capacity == o.partition_1_maximum_capacity
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



564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 564

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
    Nodeum.const_get(type).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



633
634
635
636
637
638
639
640
641
642
643
644
645
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 633

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



543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 543

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if 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 # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


523
524
525
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 523

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



529
530
531
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 529

def hash
  [log_time, barcode, mounts, datasets_written, datasets_read, recovered_write_data_errors, unrecovered_write_data_errors, write_servo_errors, unrecovered_write_servo_errors, recovered_read_errors, unrecovered_read_errors, last_mount_unrecovered_write_errors, last_mount_unrecovered_read_errors, last_mount_mbytes_written, last_mount_mbytes_read, lifetime_mbytes_written, lifetime_mbytes_read, last_load_write_compression_ratio, last_load_read_compression_ratio, medium_mount_time, medium_ready_time, total_native_capacity, total_used_native_capacity, write_protect, worm, beginning_of_medium_passes, middle_of_tape_passes, read_compression_ratio, write_compression_ratio, mbytes_transferred_to_app_client, bytes_transferred_to_app_client, mbytes_read_from_medium, bytes_read_from_medium, mbytes_transferred_from_app_client, bytes_transferred_from_app_client, mbytes_written_to_medium, bytes_written_to_medium, data_compression_enabled, write_retries, write_perms, suspended_writes, fatal_suspended_writes, read_retries, read_perms, suspended_reads, fatal_suspended_reads, partition_0_remaining_capacity, partition_1_remaining_capacity, partition_0_maximum_capacity, partition_1_maximum_capacity].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



453
454
455
456
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 453

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



609
610
611
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 609

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



615
616
617
618
619
620
621
622
623
624
625
626
627
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 615

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



603
604
605
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 603

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



460
461
462
# File 'lib/nodeum_sdk/models/tape_stat.rb', line 460

def valid?
  true
end