Class: AsposeSlidesCloud::Slide

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

Overview

Presentation slide.

Direct Known Subclasses

SlideReplaceResult

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

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
# File 'lib/aspose_slides_cloud/models/slide.rb', line 102

def initialize(attributes = {})
  super

  if attributes.has_key?(:'Width')
    self.width = attributes[:'Width']
  end

  if attributes.has_key?(:'Height')
    self.height = attributes[:'Height']
  end

  if attributes.has_key?(:'ShowMasterShapes')
    self.show_master_shapes = attributes[:'ShowMasterShapes']
  end

  if attributes.has_key?(:'SlideShowTransition')
    self.slide_show_transition = attributes[:'SlideShowTransition']
  end

  if attributes.has_key?(:'LayoutSlide')
    self.layout_slide = attributes[:'LayoutSlide']
  end

  if attributes.has_key?(:'Shapes')
    self.shapes = attributes[:'Shapes']
  end

  if attributes.has_key?(:'Theme')
    self.theme = attributes[:'Theme']
  end

  if attributes.has_key?(:'Placeholders')
    self.placeholders = attributes[:'Placeholders']
  end

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

  if attributes.has_key?(:'Comments')
    self.comments = attributes[:'Comments']
  end

  if attributes.has_key?(:'Background')
    self.background = attributes[:'Background']
  end

  if attributes.has_key?(:'NotesSlide')
    self.notes_slide = attributes[:'NotesSlide']
  end
end

Instance Attribute Details

#backgroundObject

Get or sets the link to slide’s background



59
60
61
# File 'lib/aspose_slides_cloud/models/slide.rb', line 59

def background
  @background
end

#commentsObject

Gets or sets the link to comments.



56
57
58
# File 'lib/aspose_slides_cloud/models/slide.rb', line 56

def comments
  @comments
end

#heightObject

Gets or sets the height.



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

def height
  @height
end

#imagesObject

Gets or sets the link to images.



53
54
55
# File 'lib/aspose_slides_cloud/models/slide.rb', line 53

def images
  @images
end

#layout_slideObject

Gets or sets the link to the layout slide.



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

def layout_slide
  @layout_slide
end

#notes_slideObject

Get or sets the link to notes slide.



62
63
64
# File 'lib/aspose_slides_cloud/models/slide.rb', line 62

def notes_slide
  @notes_slide
end

#placeholdersObject

Gets or sets the link to placeholders.



50
51
52
# File 'lib/aspose_slides_cloud/models/slide.rb', line 50

def placeholders
  @placeholders
end

#shapesObject

Gets or sets the link to list of top-level shapes.



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

def shapes
  @shapes
end

#show_master_shapesObject

Specifies if shapes of the master slide should be shown on the slide. True by default.



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

def show_master_shapes
  @show_master_shapes
end

#slide_show_transitionObject

Specifies if shapes of the master slide should be shown on the slide. True by default.



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

def slide_show_transition
  @slide_show_transition
end

#themeObject

Gets or sets the link to theme.



47
48
49
# File 'lib/aspose_slides_cloud/models/slide.rb', line 47

def theme
  @theme
end

#widthObject

Gets or sets the width.



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

def width
  @width
end

Class Method Details

.attribute_mapObject

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



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/aspose_slides_cloud/models/slide.rb', line 65

def self.attribute_map
  super.merge({
    :'width' => :'Width',
    :'height' => :'Height',
    :'show_master_shapes' => :'ShowMasterShapes',
    :'slide_show_transition' => :'SlideShowTransition',
    :'layout_slide' => :'LayoutSlide',
    :'shapes' => :'Shapes',
    :'theme' => :'Theme',
    :'placeholders' => :'Placeholders',
    :'images' => :'Images',
    :'comments' => :'Comments',
    :'background' => :'Background',
    :'notes_slide' => :'NotesSlide',
  })
end

.swagger_typesObject

Attribute type mapping.



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/aspose_slides_cloud/models/slide.rb', line 83

def self.swagger_types
  super.merge({
    :'width' => :'Float',
    :'height' => :'Float',
    :'show_master_shapes' => :'BOOLEAN',
    :'slide_show_transition' => :'SlideShowTransition',
    :'layout_slide' => :'ResourceUri',
    :'shapes' => :'ResourceUri',
    :'theme' => :'ResourceUri',
    :'placeholders' => :'ResourceUri',
    :'images' => :'ResourceUri',
    :'comments' => :'ResourceUri',
    :'background' => :'ResourceUri',
    :'notes_slide' => :'ResourceUri',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/aspose_slides_cloud/models/slide.rb', line 180

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      self_uri == o.self_uri &&
      alternate_links == o.alternate_links &&
      width == o.width &&
      height == o.height &&
      show_master_shapes == o.show_master_shapes &&
      slide_show_transition == o.slide_show_transition &&
      layout_slide == o.layout_slide &&
      shapes == o.shapes &&
      theme == o.theme &&
      placeholders == o.placeholders &&
      images == o.images &&
      comments == o.comments &&
      background == o.background &&
      notes_slide == o.notes_slide
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


201
202
203
# File 'lib/aspose_slides_cloud/models/slide.rb', line 201

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



207
208
209
# File 'lib/aspose_slides_cloud/models/slide.rb', line 207

def hash
  [self_uri, alternate_links, width, height, show_master_shapes, slide_show_transition, layout_slide, shapes, theme, placeholders, images, comments, background, notes_slide].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/aspose_slides_cloud/models/slide.rb', line 156

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

  if @height.nil?
    invalid_properties.push('invalid value for "height", height 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



171
172
173
174
175
176
# File 'lib/aspose_slides_cloud/models/slide.rb', line 171

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