Class: AsposeSlidesCloud::ViewProperties

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

Overview

Slides document properties.

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

Initializes the object

Parameters:

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

    Model attributes in the form of hash



92
93
94
95
96
97
98
99
100
101
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
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 92

def initialize(attributes = {})
  super

  if attributes.has_key?(:'LastView')
    self.last_view = attributes[:'LastView']
  end

  if attributes.has_key?(:'HorizontalBarState')
    self.horizontal_bar_state = attributes[:'HorizontalBarState']
  end

  if attributes.has_key?(:'VerticalBarState')
    self.vertical_bar_state = attributes[:'VerticalBarState']
  end

  if attributes.has_key?(:'PreferSingleView')
    self.prefer_single_view = attributes[:'PreferSingleView']
  end

  if attributes.has_key?(:'RestoredLeft')
    self.restored_left = attributes[:'RestoredLeft']
  end

  if attributes.has_key?(:'RestoredTop')
    self.restored_top = attributes[:'RestoredTop']
  end

  if attributes.has_key?(:'SlideViewProperties')
    self.slide_view_properties = attributes[:'SlideViewProperties']
  end

  if attributes.has_key?(:'NotesViewProperties')
    self.notes_view_properties = attributes[:'NotesViewProperties']
  end

  if attributes.has_key?(:'ShowComments')
    self.show_comments = attributes[:'ShowComments']
  end

  if attributes.has_key?(:'GridSpacing')
    self.grid_spacing = attributes[:'GridSpacing']
  end
end

Instance Attribute Details

#grid_spacingObject

The grid spacing that should be used for the grid underlying the presentation document, in points.



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

def grid_spacing
  @grid_spacing
end

#horizontal_bar_stateObject

Horizontal bar state.



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

def horizontal_bar_state
  @horizontal_bar_state
end

#last_viewObject

Last used view mode.



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

def last_view
  @last_view
end

#notes_view_propertiesObject

Notes view mode properties.



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

def notes_view_properties
  @notes_view_properties
end

#prefer_single_viewObject

True to prefer single view.



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

def prefer_single_view
  @prefer_single_view
end

#restored_leftObject

The sizing of the side content region of the normal view, when the region is of a variable restored size.



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

def restored_left
  @restored_left
end

#restored_topObject

The sizing of the top slide region of the normal view, when the region is of a variable restored size.



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

def restored_top
  @restored_top
end

#show_commentsObject

True if the comments should be shown.



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

def show_comments
  @show_comments
end

#slide_view_propertiesObject

Slide view mode properties.



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

def slide_view_properties
  @slide_view_properties
end

#vertical_bar_stateObject

Vertical bar state.



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

def vertical_bar_state
  @vertical_bar_state
end

Class Method Details

.attribute_mapObject

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



59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 59

def self.attribute_map
  super.merge({
    :'last_view' => :'LastView',
    :'horizontal_bar_state' => :'HorizontalBarState',
    :'vertical_bar_state' => :'VerticalBarState',
    :'prefer_single_view' => :'PreferSingleView',
    :'restored_left' => :'RestoredLeft',
    :'restored_top' => :'RestoredTop',
    :'slide_view_properties' => :'SlideViewProperties',
    :'notes_view_properties' => :'NotesViewProperties',
    :'show_comments' => :'ShowComments',
    :'grid_spacing' => :'GridSpacing',
  })
end

.swagger_typesObject

Attribute type mapping.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 75

def self.swagger_types
  super.merge({
    :'last_view' => :'String',
    :'horizontal_bar_state' => :'String',
    :'vertical_bar_state' => :'String',
    :'prefer_single_view' => :'BOOLEAN',
    :'restored_left' => :'NormalViewRestoredProperties',
    :'restored_top' => :'NormalViewRestoredProperties',
    :'slide_view_properties' => :'CommonSlideViewProperties',
    :'notes_view_properties' => :'CommonSlideViewProperties',
    :'show_comments' => :'String',
    :'grid_spacing' => :'Float',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 200

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      self_uri == o.self_uri &&
      alternate_links == o.alternate_links &&
      last_view == o.last_view &&
      horizontal_bar_state == o.horizontal_bar_state &&
      vertical_bar_state == o.vertical_bar_state &&
      prefer_single_view == o.prefer_single_view &&
      restored_left == o.restored_left &&
      restored_top == o.restored_top &&
      slide_view_properties == o.slide_view_properties &&
      notes_view_properties == o.notes_view_properties &&
      show_comments == o.show_comments &&
      grid_spacing == o.grid_spacing
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


219
220
221
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 219

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



225
226
227
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 225

def hash
  [self_uri, alternate_links, last_view, horizontal_bar_state, vertical_bar_state, prefer_single_view, restored_left, restored_top, slide_view_properties, notes_view_properties, show_comments, grid_spacing].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



138
139
140
141
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 138

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



145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 145

def valid?
  return false if !super
  last_view_validator = EnumAttributeValidator.new('String', ['NotDefined', 'SlideView', 'SlideMasterView', 'NotesView', 'HandoutView', 'NotesMasterView', 'OutlineView', 'SlideSorterView', 'SlideThumbnailView'])
  return false unless last_view_validator.valid?(@last_view)
  horizontal_bar_state_validator = EnumAttributeValidator.new('String', ['Minimized', 'Restored', 'Maximized'])
  return false unless horizontal_bar_state_validator.valid?(@horizontal_bar_state)
  vertical_bar_state_validator = EnumAttributeValidator.new('String', ['Minimized', 'Restored', 'Maximized'])
  return false unless vertical_bar_state_validator.valid?(@vertical_bar_state)
  show_comments_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless show_comments_validator.valid?(@show_comments)
  true
end