Class: MicrosoftGraph::Models::Notebook
- Inherits:
-
OnenoteEntityHierarchyModel
- Object
- Entity
- OnenoteEntityBaseModel
- OnenoteEntitySchemaObjectModel
- OnenoteEntityHierarchyModel
- MicrosoftGraph::Models::Notebook
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/notebook.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new notebook and sets the default values.
-
#is_default ⇒ Object
Gets the isDefault property value.
-
#is_default=(value) ⇒ Object
Sets the isDefault property value.
-
#is_shared ⇒ Object
Gets the isShared property value.
-
#is_shared=(value) ⇒ Object
Sets the isShared property value.
-
#links ⇒ Object
Gets the links property value.
-
#links=(value) ⇒ Object
Sets the links property value.
-
#section_groups ⇒ Object
Gets the sectionGroups property value.
-
#section_groups=(value) ⇒ Object
Sets the sectionGroups property value.
-
#section_groups_url ⇒ Object
Gets the sectionGroupsUrl property value.
-
#section_groups_url=(value) ⇒ Object
Sets the sectionGroupsUrl property value.
-
#sections ⇒ Object
Gets the sections property value.
-
#sections=(value) ⇒ Object
Sets the sections property value.
-
#sections_url ⇒ Object
Gets the sectionsUrl property value.
-
#sections_url=(value) ⇒ Object
Sets the sectionsUrl property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#user_role ⇒ Object
Gets the userRole property value.
-
#user_role=(value) ⇒ Object
Sets the userRole property value.
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
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new notebook and sets the default values.
37 38 39 40 |
# File 'lib/models/notebook.rb', line 37 def initialize() super @odata_type = "#microsoft.graph.notebook" end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
46 47 48 49 |
# File 'lib/models/notebook.rb', line 46 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return Notebook.new end |
Instance Method Details
#get_field_deserializers ⇒ Object
The deserialization information for the current model
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/models/notebook.rb', line 54 def get_field_deserializers() return super.merge({ "isDefault" => lambda {|n| @is_default = n.get_boolean_value() }, "isShared" => lambda {|n| @is_shared = n.get_boolean_value() }, "links" => lambda {|n| @links = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::NotebookLinks.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() }, "userRole" => lambda {|n| @user_role = n.get_enum_value(MicrosoftGraph::Models::OnenoteUserRole) }, }) end |
#is_default ⇒ Object
Gets the isDefault property value. Indicates whether this is the user’s default notebook. Read-only.
70 71 72 |
# File 'lib/models/notebook.rb', line 70 def is_default return @is_default end |
#is_default=(value) ⇒ Object
Sets the isDefault property value. Indicates whether this is the user’s default notebook. Read-only.
78 79 80 |
# File 'lib/models/notebook.rb', line 78 def is_default=(value) @is_default = value end |
#is_shared ⇒ Object
Gets the isShared property value. Indicates whether the notebook is shared. If true, the contents of the notebook can be seen by people other than the owner. Read-only.
85 86 87 |
# File 'lib/models/notebook.rb', line 85 def is_shared return @is_shared end |
#is_shared=(value) ⇒ Object
Sets the isShared property value. Indicates whether the notebook is shared. If true, the contents of the notebook can be seen by people other than the owner. Read-only.
93 94 95 |
# File 'lib/models/notebook.rb', line 93 def is_shared=(value) @is_shared = value end |
#links ⇒ Object
Gets the links property value. Links for opening the notebook. The oneNoteClientURL link opens the notebook in the OneNote native client if it’s installed. The oneNoteWebURL link opens the notebook in OneNote on the web.
100 101 102 |
# File 'lib/models/notebook.rb', line 100 def links return @links end |
#links=(value) ⇒ Object
Sets the links property value. Links for opening the notebook. The oneNoteClientURL link opens the notebook in the OneNote native client if it’s installed. The oneNoteWebURL link opens the notebook in OneNote on the web.
108 109 110 |
# File 'lib/models/notebook.rb', line 108 def links=(value) @links = value end |
#section_groups ⇒ Object
Gets the sectionGroups property value. The section groups in the notebook. Read-only. Nullable.
115 116 117 |
# File 'lib/models/notebook.rb', line 115 def section_groups return @section_groups end |
#section_groups=(value) ⇒ Object
Sets the sectionGroups property value. The section groups in the notebook. Read-only. Nullable.
123 124 125 |
# File 'lib/models/notebook.rb', line 123 def section_groups=(value) @section_groups = value end |
#section_groups_url ⇒ Object
Gets the sectionGroupsUrl property value. The URL for the sectionGroups navigation property, which returns all the section groups in the notebook. Read-only.
130 131 132 |
# File 'lib/models/notebook.rb', line 130 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 notebook. Read-only.
138 139 140 |
# File 'lib/models/notebook.rb', line 138 def section_groups_url=(value) @section_groups_url = value end |
#sections ⇒ Object
Gets the sections property value. The sections in the notebook. Read-only. Nullable.
145 146 147 |
# File 'lib/models/notebook.rb', line 145 def sections return @sections end |
#sections=(value) ⇒ Object
Sets the sections property value. The sections in the notebook. Read-only. Nullable.
153 154 155 |
# File 'lib/models/notebook.rb', line 153 def sections=(value) @sections = value end |
#sections_url ⇒ Object
Gets the sectionsUrl property value. The URL for the sections navigation property, which returns all the sections in the notebook. Read-only.
160 161 162 |
# File 'lib/models/notebook.rb', line 160 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 notebook. Read-only.
168 169 170 |
# File 'lib/models/notebook.rb', line 168 def sections_url=(value) @sections_url = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/models/notebook.rb', line 176 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_boolean_value("isDefault", @is_default) writer.write_boolean_value("isShared", @is_shared) writer.write_object_value("links", @links) 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) writer.write_enum_value("userRole", @user_role) end |
#user_role ⇒ Object
Gets the userRole property value. Possible values are: Owner, Contributor, Reader, None. Owner represents owner-level access to the notebook. Contributor represents read/write access to the notebook. Reader represents read-only access to the notebook. Read-only.
192 193 194 |
# File 'lib/models/notebook.rb', line 192 def user_role return @user_role end |
#user_role=(value) ⇒ Object
Sets the userRole property value. Possible values are: Owner, Contributor, Reader, None. Owner represents owner-level access to the notebook. Contributor represents read/write access to the notebook. Reader represents read-only access to the notebook. Read-only.
200 201 202 |
# File 'lib/models/notebook.rb', line 200 def user_role=(value) @user_role = value end |