Class: MicrosoftGraph::Models::SectionGroup

Inherits:
OnenoteEntityHierarchyModel show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/section_group.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 sectionGroup and sets the default values.



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

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

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return SectionGroup.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/section_group.rb', line 48

def get_field_deserializers()
    return super.merge({
        "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) }) },
        "sectionGroups" => lambda {|n| @section_groups = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SectionGroup.create_from_discriminator_value(pn) }) },
        "sectionGroupsUrl" => lambda {|n| @section_groups_url = n.get_string_value() },
        "sections" => lambda {|n| @sections = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OnenoteSection.create_from_discriminator_value(pn) }) },
        "sectionsUrl" => lambda {|n| @sections_url = n.get_string_value() },
    })
end

#parent_notebookObject

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

Returns:

  • a notebook



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

def parent_notebook
    return @parent_notebook
end

#parent_notebook=(value) ⇒ Object

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

Parameters:

  • value

    Value to set for the parentNotebook property.

Returns:

  • a void



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

def parent_notebook=(value)
    @parent_notebook = value
end

#parent_section_groupObject

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

Returns:

  • a section_group



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

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 group. Read-only.

Parameters:

  • value

    Value to set for the parentSectionGroup property.

Returns:

  • a void



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

def parent_section_group=(value)
    @parent_section_group = value
end

#section_groupsObject

Gets the sectionGroups property value. The section groups in the section. Read-only. Nullable.

Returns:

  • a section_group



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

def section_groups
    return @section_groups
end

#section_groups=(value) ⇒ Object

Sets the sectionGroups property value. The section groups in the section. Read-only. Nullable.

Parameters:

  • value

    Value to set for the sectionGroups property.

Returns:

  • a void



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

def section_groups=(value)
    @section_groups = value
end

#section_groups_urlObject

Gets the sectionGroupsUrl property value. The URL for the sectionGroups navigation property, which returns all the section groups in the section group. Read-only.

Returns:

  • a string



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

def section_groups_url
    return @section_groups_url
end

#section_groups_url=(value) ⇒ Object

Sets the sectionGroupsUrl property value. The URL for the sectionGroups navigation property, which returns all the section groups in the section group. Read-only.

Parameters:

  • value

    Value to set for the sectionGroupsUrl property.

Returns:

  • a void



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

def section_groups_url=(value)
    @section_groups_url = value
end

#sectionsObject

Gets the sections property value. The sections in the section group. Read-only. Nullable.

Returns:

  • a onenote_section



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

def sections
    return @sections
end

#sections=(value) ⇒ Object

Sets the sections property value. The sections in the section group. Read-only. Nullable.

Parameters:

  • value

    Value to set for the sections property.

Returns:

  • a void



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

def sections=(value)
    @sections = value
end

#sections_urlObject

Gets the sectionsUrl property value. The URL for the sections navigation property, which returns all the sections in the section group. Read-only.

Returns:

  • a string



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

def sections_url
    return @sections_url
end

#sections_url=(value) ⇒ Object

Sets the sectionsUrl property value. The URL for the sections navigation property, which returns all the sections in the section group. Read-only.

Parameters:

  • value

    Value to set for the sectionsUrl property.

Returns:

  • a void



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

def sections_url=(value)
    @sections_url = 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/section_group.rb', line 153

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("parentNotebook", @parent_notebook)
    writer.write_object_value("parentSectionGroup", @parent_section_group)
    writer.write_collection_of_object_values("sectionGroups", @section_groups)
    writer.write_string_value("sectionGroupsUrl", @section_groups_url)
    writer.write_collection_of_object_values("sections", @sections)
    writer.write_string_value("sectionsUrl", @sections_url)
end