class AsposeSlidesCloud::SlideModernComment

Represents modern comment of slide

Attributes

status[RW]

Returns or sets the status of the comment. Read/write ModernCommentStatus.

text_selection_length[RW]

Returns or sets text selection length in text frame if the comment associated with AutoShape. Read/write Int32.

text_selection_start[RW]

Returns or sets starting position of text selection in text frame if the comment associated with AutoShape. Read/write Int32.

Public Class Methods

attribute_map() click to toggle source

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

# File lib/aspose_slides_cloud/models/slide_modern_comment.rb, line 38
def self.attribute_map
  super.merge({
    :'text_selection_start' => :'TextSelectionStart',
    :'text_selection_length' => :'TextSelectionLength',
    :'status' => :'Status',
  })
end
new(attributes = {}) click to toggle source

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

# File lib/aspose_slides_cloud/models/slide_modern_comment.rb, line 57
def initialize(attributes = {})
  super

  if attributes.has_key?(:'TextSelectionStart')
    self.text_selection_start = attributes[:'TextSelectionStart']
  end

  if attributes.has_key?(:'TextSelectionLength')
    self.text_selection_length = attributes[:'TextSelectionLength']
  end

  if attributes.has_key?(:'Status')
    self.status = attributes[:'Status']
  end
  self.type = 'Modern'
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/aspose_slides_cloud/models/slide_modern_comment.rb, line 47
def self.swagger_types
  super.merge({
    :'text_selection_start' => :'Integer',
    :'text_selection_length' => :'Integer',
    :'status' => :'String',
  })
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/slide_modern_comment.rb, line 102
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      author == o.author &&
      text == o.text &&
      created_time == o.created_time &&
      child_comments == o.child_comments &&
      type == o.type &&
      text_selection_start == o.text_selection_start &&
      text_selection_length == o.text_selection_length &&
      status == o.status
end
eql?(o) click to toggle source

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

# File lib/aspose_slides_cloud/models/slide_modern_comment.rb, line 117
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/slide_modern_comment.rb, line 123
def hash
  [author, text, created_time, child_comments, type, text_selection_start, text_selection_length, status].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

# File lib/aspose_slides_cloud/models/slide_modern_comment.rb, line 76
def list_invalid_properties
  invalid_properties = super
  invalid_properties
end
status=(status) click to toggle source

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

# File lib/aspose_slides_cloud/models/slide_modern_comment.rb, line 92
def status=(status)
  validator = EnumAttributeValidator.new('String', ['NotDefined', 'Active', 'Resolved', 'Closed'])
  unless validator.valid?(status)
    fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
  end
  @status = status
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

# File lib/aspose_slides_cloud/models/slide_modern_comment.rb, line 83
def valid?
  return false if !super
  status_validator = EnumAttributeValidator.new('String', ['NotDefined', 'Active', 'Resolved', 'Closed'])
  return false unless status_validator.valid?(@status)
  true
end