Class: MicrosoftGraph::Models::OnenoteEntityHierarchyModel

Inherits:
OnenoteEntitySchemaObjectModel show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/onenote_entity_hierarchy_model.rb

Direct Known Subclasses

Notebook, OnenoteSection, SectionGroup

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OnenoteEntitySchemaObjectModel

#created_date_time, #created_date_time=

Methods inherited from OnenoteEntityBaseModel

#self_escaped, #self_escaped=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new onenoteEntityHierarchyModel and sets the default values.



26
27
28
29
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 26

def initialize()
    super
    @odata_type = "#microsoft.graph.onenoteEntityHierarchyModel"
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 onenote_entity_hierarchy_model

Raises:

  • (StandardError)


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 50

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.notebook"
                return Notebook.new
            when "#microsoft.graph.onenoteSection"
                return OnenoteSection.new
            when "#microsoft.graph.sectionGroup"
                return SectionGroup.new
        end
    end
    return OnenoteEntityHierarchyModel.new
end

Instance Method Details

#created_byObject

Gets the createdBy property value. Identity of the user, device, and application which created the item. Read-only.

Returns:

  • a identity_set



34
35
36
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 34

def created_by
    return @created_by
end

#created_by=(value) ⇒ Object

Sets the createdBy property value. Identity of the user, device, and application which created the item. Read-only.

Parameters:

  • value

    Value to set for the createdBy property.

Returns:

  • a void



42
43
44
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 42

def created_by=(value)
    @created_by = value
end

#display_nameObject

Gets the displayName property value. The name of the notebook.

Returns:

  • a string



70
71
72
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 70

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The name of the notebook.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



78
79
80
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 78

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



85
86
87
88
89
90
91
92
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 85

def get_field_deserializers()
    return super.merge({
        "createdBy" => lambda {|n| @created_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "lastModifiedBy" => lambda {|n| @last_modified_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
    })
end

#last_modified_byObject

Gets the lastModifiedBy property value. Identity of the user, device, and application which created the item. Read-only.

Returns:

  • a identity_set



97
98
99
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 97

def last_modified_by
    return @last_modified_by
end

#last_modified_by=(value) ⇒ Object

Sets the lastModifiedBy property value. Identity of the user, device, and application which created the item. Read-only.

Parameters:

  • value

    Value to set for the lastModifiedBy property.

Returns:

  • a void



105
106
107
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 105

def last_modified_by=(value)
    @last_modified_by = value
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. The date and time when the notebook was last modified. The timestamp 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. Read-only.

Returns:

  • a date_time



112
113
114
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 112

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. The date and time when the notebook was last modified. The timestamp 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. Read-only.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



120
121
122
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 120

def last_modified_date_time=(value)
    @last_modified_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)


128
129
130
131
132
133
134
135
# File 'lib/models/onenote_entity_hierarchy_model.rb', line 128

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("createdBy", @created_by)
    writer.write_string_value("displayName", @display_name)
    writer.write_object_value("lastModifiedBy", @last_modified_by)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
end