Class: MicrosoftGraph::Models::OnenoteSection

Inherits:
OnenoteEntityHierarchyModel show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/onenote_section.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OnenoteEntityHierarchyModel

#created_by, #created_by=, #display_name, #display_name=, #last_modified_by, #last_modified_by=, #last_modified_date_time, #last_modified_date_time=

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 onenoteSection and sets the default values.



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

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

Raises:

  • (StandardError)


40
41
42
43
# File 'lib/models/onenote_section.rb', line 40

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



48
49
50
51
52
53
54
55
56
57
# File 'lib/models/onenote_section.rb', line 48

def get_field_deserializers()
    return super.merge({
        "isDefault" => lambda {|n| @is_default = n.get_boolean_value() },
        "links" => lambda {|n| @links = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SectionLinks.create_from_discriminator_value(pn) }) },
        "pages" => lambda {|n| @pages = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OnenotePage.create_from_discriminator_value(pn) }) },
        "pagesUrl" => lambda {|n| @pages_url = n.get_string_value() },
        "parentNotebook" => lambda {|n| @parent_notebook = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Notebook.create_from_discriminator_value(pn) }) },
        "parentSectionGroup" => lambda {|n| @parent_section_group = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SectionGroup.create_from_discriminator_value(pn) }) },
    })
end

#is_defaultObject

Gets the isDefault property value. Indicates whether this is the user’s default section. Read-only.

Returns:

  • a boolean



62
63
64
# File 'lib/models/onenote_section.rb', line 62

def is_default
    return @is_default
end

#is_default=(value) ⇒ Object

Sets the isDefault property value. Indicates whether this is the user’s default section. Read-only.

Parameters:

  • value

    Value to set for the isDefault property.

Returns:

  • a void



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

def is_default=(value)
    @is_default = value
end

Gets the links property value. Links for opening the section. The oneNoteClientURL link opens the section in the OneNote native client if it’s installed. The oneNoteWebURL link opens the section in OneNote on the web.

Returns:

  • a section_links



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

def links
    return @links
end

#links=(value) ⇒ Object

Sets the links property value. Links for opening the section. The oneNoteClientURL link opens the section in the OneNote native client if it’s installed. The oneNoteWebURL link opens the section in OneNote on the web.

Parameters:

  • value

    Value to set for the links property.

Returns:

  • a void



85
86
87
# File 'lib/models/onenote_section.rb', line 85

def links=(value)
    @links = value
end

#pagesObject

Gets the pages property value. The collection of pages in the section. Read-only. Nullable.

Returns:

  • a onenote_page



92
93
94
# File 'lib/models/onenote_section.rb', line 92

def pages
    return @pages
end

#pages=(value) ⇒ Object

Sets the pages property value. The collection of pages in the section. Read-only. Nullable.

Parameters:

  • value

    Value to set for the pages property.

Returns:

  • a void



100
101
102
# File 'lib/models/onenote_section.rb', line 100

def pages=(value)
    @pages = value
end

#pages_urlObject

Gets the pagesUrl property value. The pages endpoint where you can get details for all the pages in the section. Read-only.

Returns:

  • a string



107
108
109
# File 'lib/models/onenote_section.rb', line 107

def pages_url
    return @pages_url
end

#pages_url=(value) ⇒ Object

Sets the pagesUrl property value. The pages endpoint where you can get details for all the pages in the section. Read-only.

Parameters:

  • value

    Value to set for the pagesUrl property.

Returns:

  • a void



115
116
117
# File 'lib/models/onenote_section.rb', line 115

def pages_url=(value)
    @pages_url = value
end

#parent_notebookObject

Gets the parentNotebook property value. The notebook that contains the section. Read-only.

Returns:

  • a notebook



122
123
124
# File 'lib/models/onenote_section.rb', line 122

def parent_notebook
    return @parent_notebook
end

#parent_notebook=(value) ⇒ Object

Sets the parentNotebook property value. The notebook that contains the section. Read-only.

Parameters:

  • value

    Value to set for the parentNotebook property.

Returns:

  • a void



130
131
132
# File 'lib/models/onenote_section.rb', line 130

def parent_notebook=(value)
    @parent_notebook = value
end

#parent_section_groupObject

Gets the parentSectionGroup property value. The section group that contains the section. Read-only.

Returns:

  • a section_group



137
138
139
# File 'lib/models/onenote_section.rb', line 137

def parent_section_group
    return @parent_section_group
end

#parent_section_group=(value) ⇒ Object

Sets the parentSectionGroup property value. The section group that contains the section. Read-only.

Parameters:

  • value

    Value to set for the parentSectionGroup property.

Returns:

  • a void



145
146
147
# File 'lib/models/onenote_section.rb', line 145

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


153
154
155
156
157
158
159
160
161
162
# File 'lib/models/onenote_section.rb', line 153

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("isDefault", @is_default)
    writer.write_object_value("links", @links)
    writer.write_collection_of_object_values("pages", @pages)
    writer.write_string_value("pagesUrl", @pages_url)
    writer.write_object_value("parentNotebook", @parent_notebook)
    writer.write_object_value("parentSectionGroup", @parent_section_group)
end