Class: AsposeSlidesCloud::FileVersion

Inherits:
StorageFile show all
Defined in:
lib/aspose_slides_cloud/models/file_version.rb

Overview

File Version

Instance Attribute Summary collapse

Attributes inherited from StorageFile

#is_folder, #modified_date, #name, #path, #size

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ FileVersion

Initializes the object

Parameters:

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

    Model attributes in the form of hash



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/aspose_slides_cloud/models/file_version.rb', line 52

def initialize(attributes = {})
  super

  if attributes.has_key?(:'VersionId')
    self.version_id = attributes[:'VersionId']
  end

  if attributes.has_key?(:'IsLatest')
    self.is_latest = attributes[:'IsLatest']
  end
end

Instance Attribute Details

#is_latestObject

Specifies whether the file is (true) or is not (false) the latest version of an file.



32
33
34
# File 'lib/aspose_slides_cloud/models/file_version.rb', line 32

def is_latest
  @is_latest
end

#version_idObject

File Version ID.



29
30
31
# File 'lib/aspose_slides_cloud/models/file_version.rb', line 29

def version_id
  @version_id
end

Class Method Details

.attribute_mapObject

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



35
36
37
38
39
40
# File 'lib/aspose_slides_cloud/models/file_version.rb', line 35

def self.attribute_map
  super.merge({
    :'version_id' => :'VersionId',
    :'is_latest' => :'IsLatest',
  })
end

.swagger_typesObject

Attribute type mapping.



43
44
45
46
47
48
# File 'lib/aspose_slides_cloud/models/file_version.rb', line 43

def self.swagger_types
  super.merge({
    :'version_id' => :'String',
    :'is_latest' => :'BOOLEAN',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



85
86
87
88
89
90
91
92
93
94
95
# File 'lib/aspose_slides_cloud/models/file_version.rb', line 85

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      name == o.name &&
      is_folder == o.is_folder &&
      modified_date == o.modified_date &&
      size == o.size &&
      path == o.path &&
      version_id == o.version_id &&
      is_latest == o.is_latest
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


99
100
101
# File 'lib/aspose_slides_cloud/models/file_version.rb', line 99

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



105
106
107
# File 'lib/aspose_slides_cloud/models/file_version.rb', line 105

def hash
  [name, is_folder, modified_date, size, path, version_id, is_latest].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



66
67
68
69
70
71
72
73
# File 'lib/aspose_slides_cloud/models/file_version.rb', line 66

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

  invalid_properties
end

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



77
78
79
80
81
# File 'lib/aspose_slides_cloud/models/file_version.rb', line 77

def valid?
  return false if !super
  return false if @is_latest.nil?
  true
end