class AsposeSlidesCloud::NotesCommentsLayoutingOptions

Notes & comments layouting options.

Attributes

comments_area_color[RW]

Gets or sets the color of comments area (Applies only if comments are displayed on the right).

comments_area_width[RW]

Gets or sets the width of the comment output area in pixels (Applies only if comments are displayed on the right).

comments_position[RW]

Gets or sets the position of the comments on the page.

notes_position[RW]

Gets or sets the position of the notes on the page.

show_comments_by_no_author[RW]

True if comments that have no author are displayed. (Applies only if comments are displayed).

Public Class Methods

attribute_map() click to toggle source

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

Calls superclass method
# File lib/aspose_slides_cloud/models/notes_comments_layouting_options.rb, line 44
def self.attribute_map
  super.merge({
    :'notes_position' => :'NotesPosition',
    :'comments_position' => :'CommentsPosition',
    :'comments_area_width' => :'CommentsAreaWidth',
    :'comments_area_color' => :'CommentsAreaColor',
    :'show_comments_by_no_author' => :'ShowCommentsByNoAuthor',
  })
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

Calls superclass method
# File lib/aspose_slides_cloud/models/notes_comments_layouting_options.rb, line 67
def initialize(attributes = {})
  super

  if attributes.has_key?(:'NotesPosition')
    self.notes_position = attributes[:'NotesPosition']
  end

  if attributes.has_key?(:'CommentsPosition')
    self.comments_position = attributes[:'CommentsPosition']
  end

  if attributes.has_key?(:'CommentsAreaWidth')
    self.comments_area_width = attributes[:'CommentsAreaWidth']
  end

  if attributes.has_key?(:'CommentsAreaColor')
    self.comments_area_color = attributes[:'CommentsAreaColor']
  end

  if attributes.has_key?(:'ShowCommentsByNoAuthor')
    self.show_comments_by_no_author = attributes[:'ShowCommentsByNoAuthor']
  end
  self.layout_type = 'NotesComments'
end
swagger_types() click to toggle source

Attribute type mapping.

Calls superclass method
# File lib/aspose_slides_cloud/models/notes_comments_layouting_options.rb, line 55
def self.swagger_types
  super.merge({
    :'notes_position' => :'String',
    :'comments_position' => :'String',
    :'comments_area_width' => :'Integer',
    :'comments_area_color' => :'String',
    :'show_comments_by_no_author' => :'BOOLEAN',
  })
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/aspose_slides_cloud/models/notes_comments_layouting_options.rb, line 132
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      layout_type == o.layout_type &&
      notes_position == o.notes_position &&
      comments_position == o.comments_position &&
      comments_area_width == o.comments_area_width &&
      comments_area_color == o.comments_area_color &&
      show_comments_by_no_author == o.show_comments_by_no_author
end
comments_position=(comments_position) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] comments_position Object to be assigned

# File lib/aspose_slides_cloud/models/notes_comments_layouting_options.rb, line 122
def comments_position=(comments_position)
  validator = EnumAttributeValidator.new('String', ['None', 'Bottom', 'Right'])
  unless validator.valid?(comments_position)
    fail ArgumentError, 'invalid value for "comments_position", must be one of #{validator.allowable_values}.'
  end
  @comments_position = comments_position
end
eql?(o) click to toggle source

@see the ‘==` method @param [Object] Object to be compared

# File lib/aspose_slides_cloud/models/notes_comments_layouting_options.rb, line 145
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/aspose_slides_cloud/models/notes_comments_layouting_options.rb, line 151
def hash
  [layout_type, notes_position, comments_position, comments_area_width, comments_area_color, show_comments_by_no_author].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

Calls superclass method
# File lib/aspose_slides_cloud/models/notes_comments_layouting_options.rb, line 94
def list_invalid_properties
  invalid_properties = super
  invalid_properties
end
notes_position=(notes_position) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] notes_position Object to be assigned

# File lib/aspose_slides_cloud/models/notes_comments_layouting_options.rb, line 112
def notes_position=(notes_position)
  validator = EnumAttributeValidator.new('String', ['None', 'BottomFull', 'BottomTruncated'])
  unless validator.valid?(notes_position)
    fail ArgumentError, 'invalid value for "notes_position", must be one of #{validator.allowable_values}.'
  end
  @notes_position = notes_position
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

Calls superclass method
# File lib/aspose_slides_cloud/models/notes_comments_layouting_options.rb, line 101
def valid?
  return false if !super
  notes_position_validator = EnumAttributeValidator.new('String', ['None', 'BottomFull', 'BottomTruncated'])
  return false unless notes_position_validator.valid?(@notes_position)
  comments_position_validator = EnumAttributeValidator.new('String', ['None', 'Bottom', 'Right'])
  return false unless comments_position_validator.valid?(@comments_position)
  true
end