Class: MicrosoftGraph::Models::AuthoredNote

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/authored_note.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 authoredNote and sets the default values.



38
39
40
# File 'lib/models/authored_note.rb', line 38

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 authored_note

Raises:

  • (StandardError)


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

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

Instance Method Details

#authorObject

Gets the author property value. Identity information about the note’s author.

Returns:

  • a identity



23
24
25
# File 'lib/models/authored_note.rb', line 23

def author
    return @author
end

#author=(value) ⇒ Object

Sets the author property value. Identity information about the note’s author.

Parameters:

  • value

    Value to set for the author property.

Returns:

  • a void



31
32
33
# File 'lib/models/authored_note.rb', line 31

def author=(value)
    @author = value
end

#contentObject

Gets the content property value. The content of the note.

Returns:

  • a item_body



45
46
47
# File 'lib/models/authored_note.rb', line 45

def content
    return @content
end

#content=(value) ⇒ Object

Sets the content property value. The content of the note.

Parameters:

  • value

    Value to set for the content property.

Returns:

  • a void



53
54
55
# File 'lib/models/authored_note.rb', line 53

def content=(value)
    @content = value
end

#created_date_timeObject

Gets the createdDateTime property value. The date and time when the entity was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Returns:

  • a date_time



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

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The date and time when the entity was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



68
69
70
# File 'lib/models/authored_note.rb', line 68

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



84
85
86
87
88
89
90
# File 'lib/models/authored_note.rb', line 84

def get_field_deserializers()
    return super.merge({
        "author" => lambda {|n| @author = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Identity.create_from_discriminator_value(pn) }) },
        "content" => lambda {|n| @content = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemBody.create_from_discriminator_value(pn) }) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_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)


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("author", @author)
    writer.write_object_value("content", @content)
    writer.write_date_time_value("createdDateTime", @created_date_time)
end