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



87
88
89
90
91
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
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 87

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
end

Instance Attribute Details

#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.



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

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',
  })
end

.swagger_typesObject

Attribute type mapping.



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 71

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',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 191

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
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


209
210
211
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 209

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



215
216
217
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 215

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].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



129
130
131
132
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 129

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



136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/aspose_slides_cloud/models/view_properties.rb', line 136

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