Class: AsposeSlidesCloud::Document

Inherits:
ResourceBase show all
Defined in:
lib/aspose_slides_cloud/models/document.rb

Overview

Represents document DTO.

Direct Known Subclasses

DocumentReplaceResult

Instance Attribute Summary collapse

Attributes inherited from ResourceBase

#alternate_links, #self_uri

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 = {}) ⇒ Document

Initializes the object

Parameters:

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

    Model attributes in the form of hash



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/aspose_slides_cloud/models/document.rb', line 72

def initialize(attributes = {})
  super

  if attributes.has_key?(:'DocumentProperties')
    self.document_properties = attributes[:'DocumentProperties']
  end

  if attributes.has_key?(:'ViewProperties')
    self.view_properties = attributes[:'ViewProperties']
  end

  if attributes.has_key?(:'Slides')
    self.slides = attributes[:'Slides']
  end

  if attributes.has_key?(:'Images')
    self.images = attributes[:'Images']
  end

  if attributes.has_key?(:'LayoutSlides')
    self.layout_slides = attributes[:'LayoutSlides']
  end

  if attributes.has_key?(:'MasterSlides')
    self.master_slides = attributes[:'MasterSlides']
  end
end

Instance Attribute Details

#document_propertiesObject

Link to Document properties.



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

def document_properties
  @document_properties
end

#imagesObject

Link to images collection.



38
39
40
# File 'lib/aspose_slides_cloud/models/document.rb', line 38

def images
  @images
end

#layout_slidesObject

Link to layout slides collection.



41
42
43
# File 'lib/aspose_slides_cloud/models/document.rb', line 41

def layout_slides
  @layout_slides
end

#master_slidesObject

Link to master slides collection.



44
45
46
# File 'lib/aspose_slides_cloud/models/document.rb', line 44

def master_slides
  @master_slides
end

#slidesObject

Link to slides collection.



35
36
37
# File 'lib/aspose_slides_cloud/models/document.rb', line 35

def slides
  @slides
end

#view_propertiesObject

Link to Document properties.



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

def view_properties
  @view_properties
end

Class Method Details

.attribute_mapObject

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



47
48
49
50
51
52
53
54
55
56
# File 'lib/aspose_slides_cloud/models/document.rb', line 47

def self.attribute_map
  super.merge({
    :'document_properties' => :'DocumentProperties',
    :'view_properties' => :'ViewProperties',
    :'slides' => :'Slides',
    :'images' => :'Images',
    :'layout_slides' => :'LayoutSlides',
    :'master_slides' => :'MasterSlides',
  })
end

.swagger_typesObject

Attribute type mapping.



59
60
61
62
63
64
65
66
67
68
# File 'lib/aspose_slides_cloud/models/document.rb', line 59

def self.swagger_types
  super.merge({
    :'document_properties' => :'ResourceUri',
    :'view_properties' => :'ResourceUri',
    :'slides' => :'ResourceUri',
    :'images' => :'ResourceUri',
    :'layout_slides' => :'ResourceUri',
    :'master_slides' => :'ResourceUri',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/aspose_slides_cloud/models/document.rb', line 116

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      self_uri == o.self_uri &&
      alternate_links == o.alternate_links &&
      document_properties == o.document_properties &&
      view_properties == o.view_properties &&
      slides == o.slides &&
      images == o.images &&
      layout_slides == o.layout_slides &&
      master_slides == o.master_slides
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


131
132
133
# File 'lib/aspose_slides_cloud/models/document.rb', line 131

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



137
138
139
# File 'lib/aspose_slides_cloud/models/document.rb', line 137

def hash
  [self_uri, alternate_links, document_properties, view_properties, slides, images, layout_slides, master_slides].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



102
103
104
105
# File 'lib/aspose_slides_cloud/models/document.rb', line 102

def list_invalid_properties
  invalid_properties = super
  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



109
110
111
112
# File 'lib/aspose_slides_cloud/models/document.rb', line 109

def valid?
  return false if !super
  true
end