Class: IntersightClient::HyperflexDatastoreStatisticAllOf

Inherits:
Object
  • Object
show all
Defined in:
lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb

Overview

Definition of the list of properties defined in ‘hyperflex.DatastoreStatistic’, excluding properties defined in parent classes.

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ HyperflexDatastoreStatisticAllOf

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 178

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::HyperflexDatastoreStatisticAllOf` 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.acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `#{self.class.name}`. Please check the name to make sure it's valid. List of attributes: " + self.class.acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'class_id')
    self.class_id = attributes[:'class_id']
  else
    self.class_id = 'hyperflex.DatastoreStatistic'
  end

  if attributes.key?(:'object_type')
    self.object_type = attributes[:'object_type']
  else
    self.object_type = 'hyperflex.DatastoreStatistic'
  end

  if attributes.key?(:'accessibility_summary')
    self.accessibility_summary = attributes[:'accessibility_summary']
  else
    self.accessibility_summary = 'ACCESSIBLE'
  end

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

  if attributes.key?(:'datastore_kind')
    self.datastore_kind = attributes[:'datastore_kind']
  else
    self.datastore_kind = 'UNKNOWN'
  end

  if attributes.key?(:'datastore_status')
    self.datastore_status = attributes[:'datastore_status']
  else
    self.datastore_status = 'NORMAL'
  end

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

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

  if attributes.key?(:'host_mount_status')
    if (value = attributes[:'host_mount_status']).is_a?(Array)
      self.host_mount_status = value
    end
  end

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

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

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

  if attributes.key?(:'mount_summary')
    self.mount_summary = attributes[:'mount_summary']
  else
    self.mount_summary = 'MOUNTED'
  end

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#accessibility_summaryObject

HyperFlex datastore accessibility summary. * ‘ACCESSIBLE` - The HyperFlex Accessibility Summary is Accessible. * `NOT_ACCESSIBLE` - The HyperFlex Accessibility Summary is Not Accessible. * `PARTIALLY_ACCESSIBLE` - The HyperFlex Accessibility Summary is Partially Accessible.



26
27
28
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 26

def accessibility_summary
  @accessibility_summary
end

#class_idObject

The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.



20
21
22
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 20

def class_id
  @class_id
end

#creation_timeObject

Timestamp the datastore object was created.



29
30
31
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 29

def creation_time
  @creation_time
end

#data_protection_peerObject

Returns the value of attribute data_protection_peer.



73
74
75
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 73

def data_protection_peer
  @data_protection_peer
end

#datastore_kindObject

HyperFlex Datastore Kind. * ‘UNKNOWN` - HyperFlex datastore kind is unknown. * `USER_CREATED` - HyperFlex datastore kind is user created. * `INTERNAL` - HyperFlex datastore kind is internal.



32
33
34
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 32

def datastore_kind
  @datastore_kind
end

#datastore_statusObject

HyperFlex datastore status. * ‘NORMAL` - The HyperFlex datastore status is normal. * `ALERT` - The HyperFlex datastore status is alert. * `FAILED` - The HyperFlex datastore status is failed.



35
36
37
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 35

def datastore_status
  @datastore_status
end

#dsconfigObject

Returns the value of attribute dsconfig.



37
38
39
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 37

def dsconfig
  @dsconfig
end

#free_capacity_in_bytesObject

Free capacity of the datastore in bytes.



40
41
42
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 40

def free_capacity_in_bytes
  @free_capacity_in_bytes
end

#host_mount_statusObject

Returns the value of attribute host_mount_status.



42
43
44
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 42

def host_mount_status
  @host_mount_status
end

#is_encryptedObject

Indicates if the datastore is encrypted or un-encrypted.



45
46
47
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 45

def is_encrypted
  @is_encrypted
end

#last_access_timeObject

Timestamp the datastore object was last accessed.



48
49
50
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 48

def last_access_time
  @last_access_time
end

#last_modified_timeObject

Timestamp the datastore object was last modified.



51
52
53
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 51

def last_modified_time
  @last_modified_time
end

#mount_summaryObject

HyperFlex datastore mount summary. * ‘MOUNTED` - The HyperFlex mount summary is mounted. * `UNMOUNTED` - The HyperFlex mount summary is unmounted. * `MOUNT_FAILURE` - The HyperFlex mount summary is mount failure. * `UNMOUNT_FAILURE` - The HyperFlex mount summary is unmount failure.



54
55
56
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 54

def mount_summary
  @mount_summary
end

#object_typeObject

The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property.



23
24
25
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 23

def object_type
  @object_type
end

#parent_uuidObject

UUID of the parent datastore object.



57
58
59
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 57

def parent_uuid
  @parent_uuid
end

#siteObject

Returns the value of attribute site.



59
60
61
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 59

def site
  @site
end

#src_clusterObject

Returns the value of attribute src_cluster.



75
76
77
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 75

def src_cluster
  @src_cluster
end

#tgt_clusterObject

Returns the value of attribute tgt_cluster.



77
78
79
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 77

def tgt_cluster
  @tgt_cluster
end

#total_capacity_in_bytesObject

Total capacity of the datastore object.



62
63
64
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 62

def total_capacity_in_bytes
  @total_capacity_in_bytes
end

#un_compressed_used_bytesObject

Number of uncompressed used bytes in the datastore.



65
66
67
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 65

def un_compressed_used_bytes
  @un_compressed_used_bytes
end

#unshared_used_bytesObject

Unshared used capacity of the datastore in bytes.



68
69
70
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 68

def unshared_used_bytes
  @unshared_used_bytes
end

#uuidObject

UUID for the datastore object.



71
72
73
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 71

def uuid
  @uuid
end

Class Method Details

.acceptable_attribute_mapObject

Returns the key-value map of all the JSON attributes this model knows about



135
136
137
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 135

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



130
131
132
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 130

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 102

def self.attribute_map
  {
    :'class_id' => :'ClassId',
    :'object_type' => :'ObjectType',
    :'accessibility_summary' => :'AccessibilitySummary',
    :'creation_time' => :'CreationTime',
    :'datastore_kind' => :'DatastoreKind',
    :'datastore_status' => :'DatastoreStatus',
    :'dsconfig' => :'Dsconfig',
    :'free_capacity_in_bytes' => :'FreeCapacityInBytes',
    :'host_mount_status' => :'HostMountStatus',
    :'is_encrypted' => :'IsEncrypted',
    :'last_access_time' => :'LastAccessTime',
    :'last_modified_time' => :'LastModifiedTime',
    :'mount_summary' => :'MountSummary',
    :'parent_uuid' => :'ParentUuid',
    :'site' => :'Site',
    :'total_capacity_in_bytes' => :'TotalCapacityInBytes',
    :'un_compressed_used_bytes' => :'UnCompressedUsedBytes',
    :'unshared_used_bytes' => :'UnsharedUsedBytes',
    :'uuid' => :'Uuid',
    :'data_protection_peer' => :'DataProtectionPeer',
    :'src_cluster' => :'SrcCluster',
    :'tgt_cluster' => :'TgtCluster'
  }
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



433
434
435
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 433

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

.openapi_nullableObject

List of attributes with nullable: true



168
169
170
171
172
173
174
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 168

def self.openapi_nullable
  Set.new([
    :'dsconfig',
    :'host_mount_status',
    :'site',
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 140

def self.openapi_types
  {
    :'class_id' => :'String',
    :'object_type' => :'String',
    :'accessibility_summary' => :'String',
    :'creation_time' => :'String',
    :'datastore_kind' => :'String',
    :'datastore_status' => :'String',
    :'dsconfig' => :'HyperflexHxPlatformDatastoreConfigDt',
    :'free_capacity_in_bytes' => :'Integer',
    :'host_mount_status' => :'Array<HyperflexHxHostMountStatusDt>',
    :'is_encrypted' => :'Boolean',
    :'last_access_time' => :'String',
    :'last_modified_time' => :'String',
    :'mount_summary' => :'String',
    :'parent_uuid' => :'String',
    :'site' => :'HyperflexHxSiteDt',
    :'total_capacity_in_bytes' => :'Integer',
    :'un_compressed_used_bytes' => :'Integer',
    :'unshared_used_bytes' => :'Integer',
    :'uuid' => :'String',
    :'data_protection_peer' => :'HyperflexDataProtectionPeerRelationship',
    :'src_cluster' => :'HyperflexClusterRelationship',
    :'tgt_cluster' => :'HyperflexClusterRelationship'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 391

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      class_id == o.class_id &&
      object_type == o.object_type &&
      accessibility_summary == o.accessibility_summary &&
      creation_time == o.creation_time &&
      datastore_kind == o.datastore_kind &&
      datastore_status == o.datastore_status &&
      dsconfig == o.dsconfig &&
      free_capacity_in_bytes == o.free_capacity_in_bytes &&
      host_mount_status == o.host_mount_status &&
      is_encrypted == o.is_encrypted &&
      last_access_time == o.last_access_time &&
      last_modified_time == o.last_modified_time &&
      mount_summary == o.mount_summary &&
      parent_uuid == o.parent_uuid &&
      site == o.site &&
      total_capacity_in_bytes == o.total_capacity_in_bytes &&
      un_compressed_used_bytes == o.un_compressed_used_bytes &&
      unshared_used_bytes == o.unshared_used_bytes &&
      uuid == o.uuid &&
      data_protection_peer == o.data_protection_peer &&
      src_cluster == o.src_cluster &&
      tgt_cluster == o.tgt_cluster
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



463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 463

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 = IntersightClient.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



534
535
536
537
538
539
540
541
542
543
544
545
546
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 534

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



440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 440

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  HyperflexDatastoreStatisticAllOf.openapi_types.each_pair do |key, type|
    if attributes[HyperflexDatastoreStatisticAllOf.attribute_map[key]].nil? && HyperflexDatastoreStatisticAllOf.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[HyperflexDatastoreStatisticAllOf.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[HyperflexDatastoreStatisticAllOf.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[HyperflexDatastoreStatisticAllOf.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[HyperflexDatastoreStatisticAllOf.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


420
421
422
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 420

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



426
427
428
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 426

def hash
  [class_id, object_type, accessibility_summary, creation_time, datastore_kind, datastore_status, dsconfig, free_capacity_in_bytes, host_mount_status, is_encrypted, last_access_time, last_modified_time, mount_summary, parent_uuid, site, total_capacity_in_bytes, un_compressed_used_bytes, unshared_used_bytes, uuid, data_protection_peer, src_cluster, tgt_cluster].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



296
297
298
299
300
301
302
303
304
305
306
307
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 296

def list_invalid_properties
  invalid_properties = Array.new
  if @class_id.nil?
    invalid_properties.push('invalid value for "class_id", class_id cannot be nil.')
  end

  if @object_type.nil?
    invalid_properties.push('invalid value for "object_type", object_type cannot be nil.')
  end

  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



510
511
512
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 510

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



516
517
518
519
520
521
522
523
524
525
526
527
528
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 516

def to_hash
  hash = {}
  HyperflexDatastoreStatisticAllOf.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = HyperflexDatastoreStatisticAllOf.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



504
505
506
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 504

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



311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'lib/intersight_client/models/hyperflex_datastore_statistic_all_of.rb', line 311

def valid?
  return false if @class_id.nil?
  class_id_validator = EnumAttributeValidator.new('String', ["hyperflex.DatastoreStatistic"])
  return false unless class_id_validator.valid?(@class_id)
  return false if @object_type.nil?
  object_type_validator = EnumAttributeValidator.new('String', ["hyperflex.DatastoreStatistic"])
  return false unless object_type_validator.valid?(@object_type)
  accessibility_summary_validator = EnumAttributeValidator.new('String', ["ACCESSIBLE", "NOT_ACCESSIBLE", "PARTIALLY_ACCESSIBLE"])
  return false unless accessibility_summary_validator.valid?(@accessibility_summary)
  datastore_kind_validator = EnumAttributeValidator.new('String', ["UNKNOWN", "USER_CREATED", "INTERNAL"])
  return false unless datastore_kind_validator.valid?(@datastore_kind)
  datastore_status_validator = EnumAttributeValidator.new('String', ["NORMAL", "ALERT", "FAILED"])
  return false unless datastore_status_validator.valid?(@datastore_status)
  mount_summary_validator = EnumAttributeValidator.new('String', ["MOUNTED", "UNMOUNTED", "MOUNT_FAILURE", "UNMOUNT_FAILURE"])
  return false unless mount_summary_validator.valid?(@mount_summary)
  true
end