Class: AsposeSlidesCloud::SlideModernComment

Inherits:
SlideCommentBase show all
Defined in:
lib/aspose_slides_cloud/models/slide_modern_comment.rb

Overview

Represents modern comment of slide

Instance Attribute Summary collapse

Attributes inherited from SlideCommentBase

#author, #child_comments, #created_time, #text, #type

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

Initializes the object

Parameters:

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

    Model attributes in the form of hash



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# 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

Instance Attribute Details

#statusObject

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



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

def status
  @status
end

#text_selection_lengthObject

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



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

def text_selection_length
  @text_selection_length
end

#text_selection_startObject

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



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

def text_selection_start
  @text_selection_start
end

Class Method Details

.attribute_mapObject

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



38
39
40
41
42
43
44
# 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

.swagger_typesObject

Attribute type mapping.



47
48
49
50
51
52
53
# 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

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



102
103
104
105
106
107
108
109
110
111
112
113
# 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) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


117
118
119
# File 'lib/aspose_slides_cloud/models/slide_modern_comment.rb', line 117

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



123
124
125
# 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_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



76
77
78
79
# File 'lib/aspose_slides_cloud/models/slide_modern_comment.rb', line 76

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



83
84
85
86
87
88
# 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