Class: MicrosoftGraph::Models::Onenote

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



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

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 onenote

Raises:

  • (StandardError)


39
40
41
42
# File 'lib/models/onenote.rb', line 39

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return super.merge({
        "notebooks" => lambda {|n| @notebooks = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Notebook.create_from_discriminator_value(pn) }) },
        "operations" => lambda {|n| @operations = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OnenoteOperation.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) }) },
        "resources" => lambda {|n| @resources = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OnenoteResource.create_from_discriminator_value(pn) }) },
        "sectionGroups" => lambda {|n| @section_groups = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SectionGroup.create_from_discriminator_value(pn) }) },
        "sections" => lambda {|n| @sections = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OnenoteSection.create_from_discriminator_value(pn) }) },
    })
end

#notebooksObject

Gets the notebooks property value. The collection of OneNote notebooks that are owned by the user or group. Read-only. Nullable.

Returns:

  • a notebook



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

def notebooks
    return @notebooks
end

#notebooks=(value) ⇒ Object

Sets the notebooks property value. The collection of OneNote notebooks that are owned by the user or group. Read-only. Nullable.

Parameters:

  • value

    Value to set for the notebooks property.

Returns:

  • a void



69
70
71
# File 'lib/models/onenote.rb', line 69

def notebooks=(value)
    @notebooks = value
end

#operationsObject

Gets the operations property value. The status of OneNote operations. Getting an operations collection is not supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable.

Returns:

  • a onenote_operation



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

def operations
    return @operations
end

#operations=(value) ⇒ Object

Sets the operations property value. The status of OneNote operations. Getting an operations collection is not supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable.

Parameters:

  • value

    Value to set for the operations property.

Returns:

  • a void



84
85
86
# File 'lib/models/onenote.rb', line 84

def operations=(value)
    @operations = value
end

#pagesObject

Gets the pages property value. The pages in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.

Returns:

  • a onenote_page



91
92
93
# File 'lib/models/onenote.rb', line 91

def pages
    return @pages
end

#pages=(value) ⇒ Object

Sets the pages property value. The pages in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.

Parameters:

  • value

    Value to set for the pages property.

Returns:

  • a void



99
100
101
# File 'lib/models/onenote.rb', line 99

def pages=(value)
    @pages = value
end

#resourcesObject

Gets the resources property value. The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable.

Returns:

  • a onenote_resource



106
107
108
# File 'lib/models/onenote.rb', line 106

def resources
    return @resources
end

#resources=(value) ⇒ Object

Sets the resources property value. The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable.

Parameters:

  • value

    Value to set for the resources property.

Returns:

  • a void



114
115
116
# File 'lib/models/onenote.rb', line 114

def resources=(value)
    @resources = value
end

#section_groupsObject

Gets the sectionGroups property value. The section groups in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.

Returns:

  • a section_group



121
122
123
# File 'lib/models/onenote.rb', line 121

def section_groups
    return @section_groups
end

#section_groups=(value) ⇒ Object

Sets the sectionGroups property value. The section groups in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.

Parameters:

  • value

    Value to set for the sectionGroups property.

Returns:

  • a void



129
130
131
# File 'lib/models/onenote.rb', line 129

def section_groups=(value)
    @section_groups = value
end

#sectionsObject

Gets the sections property value. The sections in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.

Returns:

  • a onenote_section



136
137
138
# File 'lib/models/onenote.rb', line 136

def sections
    return @sections
end

#sections=(value) ⇒ Object

Sets the sections property value. The sections in all OneNote notebooks that are owned by the user or group. Read-only. Nullable.

Parameters:

  • value

    Value to set for the sections property.

Returns:

  • a void



144
145
146
# File 'lib/models/onenote.rb', line 144

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


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("notebooks", @notebooks)
    writer.write_collection_of_object_values("operations", @operations)
    writer.write_collection_of_object_values("pages", @pages)
    writer.write_collection_of_object_values("resources", @resources)
    writer.write_collection_of_object_values("sectionGroups", @section_groups)
    writer.write_collection_of_object_values("sections", @sections)
end