class AsposeHtml::DiscUsage

Class for disc space information.

Attributes

total_size[RW]

Total disc space.

used_size[RW]

Application used disc space.

Public Class Methods

attribute_map() click to toggle source

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

# File lib/aspose_html_cloud/models/disc_usage.rb, line 41
def self.attribute_map
  {
    :'used_size' => :'usedSize',
    :'total_size' => :'totalSize'
  }
end
model_types() click to toggle source

Attribute type mapping.

# File lib/aspose_html_cloud/models/disc_usage.rb, line 49
def self.model_types
  {
    :'used_size' => :'Integer',
    :'total_size' => :'Integer'
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/aspose_html_cloud/models/disc_usage.rb, line 58
def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'usedSize')
    self.used_size = attributes[:'usedSize']
  end

  if attributes.has_key?(:'totalSize')
    self.total_size = attributes[:'totalSize']
  end
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/aspose_html_cloud/models/disc_usage.rb, line 98
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      used_size == o.used_size &&
      total_size == o.total_size
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/aspose_html_cloud/models/disc_usage.rb, line 107
def hash
  [used_size, total_size].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/aspose_html_cloud/models/disc_usage.rb, line 75
def list_invalid_properties
  invalid_properties = Array.new
  if @used_size.nil?
    invalid_properties.push('invalid value for "used_size", used_size cannot be nil.')
  end

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

  invalid_properties
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/aspose_html_cloud/models/disc_usage.rb, line 90
def valid?
  return false if @used_size.nil?
  return false if @total_size.nil?
  true
end