Class: MicrosoftGraph::Models::OnenotePage

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

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



47
48
49
50
# File 'lib/models/onenote_page.rb', line 47

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

Raises:

  • (StandardError)


101
102
103
104
# File 'lib/models/onenote_page.rb', line 101

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

Instance Method Details

#contentObject

Gets the content property value. The page’s HTML content.

Returns:

  • a base64url



55
56
57
# File 'lib/models/onenote_page.rb', line 55

def content
    return @content
end

#content=(value) ⇒ Object

Sets the content property value. The page’s HTML content.

Parameters:

  • value

    Value to set for the content property.

Returns:

  • a void



63
64
65
# File 'lib/models/onenote_page.rb', line 63

def content=(value)
    @content = value
end

#content_urlObject

Gets the contentUrl property value. The URL for the page’s HTML content. Read-only.

Returns:

  • a string



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

def content_url
    return @content_url
end

#content_url=(value) ⇒ Object

Sets the contentUrl property value. The URL for the page’s HTML content. Read-only.

Parameters:

  • value

    Value to set for the contentUrl property.

Returns:

  • a void



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

def content_url=(value)
    @content_url = value
end

#created_by_app_idObject

Gets the createdByAppId property value. The unique identifier of the application that created the page. Read-only.

Returns:

  • a string



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

def created_by_app_id
    return @created_by_app_id
end

#created_by_app_id=(value) ⇒ Object

Sets the createdByAppId property value. The unique identifier of the application that created the page. Read-only.

Parameters:

  • value

    Value to set for the createdByAppId property.

Returns:

  • a void



93
94
95
# File 'lib/models/onenote_page.rb', line 93

def created_by_app_id=(value)
    @created_by_app_id = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/models/onenote_page.rb', line 109

def get_field_deserializers()
    return super.merge({
        "content" => lambda {|n| @content = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },
        "contentUrl" => lambda {|n| @content_url = n.get_string_value() },
        "createdByAppId" => lambda {|n| @created_by_app_id = n.get_string_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "level" => lambda {|n| @level = n.get_number_value() },
        "links" => lambda {|n| @links = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PageLinks.create_from_discriminator_value(pn) }) },
        "order" => lambda {|n| @order = n.get_number_value() },
        "parentNotebook" => lambda {|n| @parent_notebook = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Notebook.create_from_discriminator_value(pn) }) },
        "parentSection" => lambda {|n| @parent_section = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::OnenoteSection.create_from_discriminator_value(pn) }) },
        "title" => lambda {|n| @title = n.get_string_value() },
        "userTags" => lambda {|n| @user_tags = n.get_collection_of_primitive_values(String) },
    })
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. The date and time when the page 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



128
129
130
# File 'lib/models/onenote_page.rb', line 128

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 page 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



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

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#levelObject

Gets the level property value. The indentation level of the page. Read-only.

Returns:

  • a integer



143
144
145
# File 'lib/models/onenote_page.rb', line 143

def level
    return @level
end

#level=(value) ⇒ Object

Sets the level property value. The indentation level of the page. Read-only.

Parameters:

  • value

    Value to set for the level property.

Returns:

  • a void



151
152
153
# File 'lib/models/onenote_page.rb', line 151

def level=(value)
    @level = value
end

Gets the links property value. Links for opening the page. The oneNoteClientURL link opens the page in the OneNote native client if it ‘s installed. The oneNoteWebUrl link opens the page in OneNote on the web. Read-only.

Returns:

  • a page_links



158
159
160
# File 'lib/models/onenote_page.rb', line 158

def links
    return @links
end

#links=(value) ⇒ Object

Sets the links property value. Links for opening the page. The oneNoteClientURL link opens the page in the OneNote native client if it ‘s installed. The oneNoteWebUrl link opens the page in OneNote on the web. Read-only.

Parameters:

  • value

    Value to set for the links property.

Returns:

  • a void



166
167
168
# File 'lib/models/onenote_page.rb', line 166

def links=(value)
    @links = value
end

#orderObject

Gets the order property value. The order of the page within its parent section. Read-only.

Returns:

  • a integer



173
174
175
# File 'lib/models/onenote_page.rb', line 173

def order
    return @order
end

#order=(value) ⇒ Object

Sets the order property value. The order of the page within its parent section. Read-only.

Parameters:

  • value

    Value to set for the order property.

Returns:

  • a void



181
182
183
# File 'lib/models/onenote_page.rb', line 181

def order=(value)
    @order = value
end

#parent_notebookObject

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

Returns:

  • a notebook



188
189
190
# File 'lib/models/onenote_page.rb', line 188

def parent_notebook
    return @parent_notebook
end

#parent_notebook=(value) ⇒ Object

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

Parameters:

  • value

    Value to set for the parentNotebook property.

Returns:

  • a void



196
197
198
# File 'lib/models/onenote_page.rb', line 196

def parent_notebook=(value)
    @parent_notebook = value
end

#parent_sectionObject

Gets the parentSection property value. The section that contains the page. Read-only.

Returns:

  • a onenote_section



203
204
205
# File 'lib/models/onenote_page.rb', line 203

def parent_section
    return @parent_section
end

#parent_section=(value) ⇒ Object

Sets the parentSection property value. The section that contains the page. Read-only.

Parameters:

  • value

    Value to set for the parentSection property.

Returns:

  • a void



211
212
213
# File 'lib/models/onenote_page.rb', line 211

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


219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/models/onenote_page.rb', line 219

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("content", @content)
    writer.write_string_value("contentUrl", @content_url)
    writer.write_string_value("createdByAppId", @created_by_app_id)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_number_value("level", @level)
    writer.write_object_value("links", @links)
    writer.write_number_value("order", @order)
    writer.write_object_value("parentNotebook", @parent_notebook)
    writer.write_object_value("parentSection", @parent_section)
    writer.write_string_value("title", @title)
    writer.write_collection_of_primitive_values("userTags", @user_tags)
end

#titleObject

Gets the title property value. The title of the page.

Returns:

  • a string



238
239
240
# File 'lib/models/onenote_page.rb', line 238

def title
    return @title
end

#title=(value) ⇒ Object

Sets the title property value. The title of the page.

Parameters:

  • value

    Value to set for the title property.

Returns:

  • a void



246
247
248
# File 'lib/models/onenote_page.rb', line 246

def title=(value)
    @title = value
end

#user_tagsObject

Gets the userTags property value. The userTags property

Returns:

  • a string



253
254
255
# File 'lib/models/onenote_page.rb', line 253

def user_tags
    return @user_tags
end

#user_tags=(value) ⇒ Object

Sets the userTags property value. The userTags property

Parameters:

  • value

    Value to set for the userTags property.

Returns:

  • a void



261
262
263
# File 'lib/models/onenote_page.rb', line 261

def user_tags=(value)
    @user_tags = value
end