Class: MicrosoftGraph::Models::WorkbookComment

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/workbook_comment.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new workbookComment and sets the default values.



22
23
24
# File 'lib/models/workbook_comment.rb', line 22

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a workbook_comment

Raises:

  • (StandardError)


60
61
62
63
# File 'lib/models/workbook_comment.rb', line 60

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return WorkbookComment.new
end

Instance Method Details

#contentObject

Gets the content property value. The content of comment.

Returns:

  • a string



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

def content
    return @content
end

#content=(value) ⇒ Object

Sets the content property value. The content of comment.

Parameters:

  • value

    Value to set for the content property.

Returns:

  • a void



37
38
39
# File 'lib/models/workbook_comment.rb', line 37

def content=(value)
    @content = value
end

#content_typeObject

Gets the contentType property value. Indicates the type for the comment.

Returns:

  • a string



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

def content_type
    return @content_type
end

#content_type=(value) ⇒ Object

Sets the contentType property value. Indicates the type for the comment.

Parameters:

  • value

    Value to set for the contentType property.

Returns:

  • a void



52
53
54
# File 'lib/models/workbook_comment.rb', line 52

def content_type=(value)
    @content_type = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



68
69
70
71
72
73
74
# File 'lib/models/workbook_comment.rb', line 68

def get_field_deserializers()
    return super.merge({
        "content" => lambda {|n| @content = n.get_string_value() },
        "contentType" => lambda {|n| @content_type = n.get_string_value() },
        "replies" => lambda {|n| @replies = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookCommentReply.create_from_discriminator_value(pn) }) },
    })
end

#repliesObject

Gets the replies property value. The replies property

Returns:

  • a workbook_comment_reply



79
80
81
# File 'lib/models/workbook_comment.rb', line 79

def replies
    return @replies
end

#replies=(value) ⇒ Object

Sets the replies property value. The replies property

Parameters:

  • value

    Value to set for the replies property.

Returns:

  • a void



87
88
89
# File 'lib/models/workbook_comment.rb', line 87

def replies=(value)
    @replies = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


95
96
97
98
99
100
101
# File 'lib/models/workbook_comment.rb', line 95

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("content", @content)
    writer.write_string_value("contentType", @content_type)
    writer.write_collection_of_object_values("replies", @replies)
end