Class: MicrosoftGraph::Models::RecentNotebook

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/recent_notebook.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new recentNotebook and sets the default values.



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

def initialize()
    @additional_data = Hash.new
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 recent_notebook

Raises:

  • (StandardError)


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

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

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



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

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



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

def additional_data=(value)
    @additional_data = value
end

#display_nameObject

Gets the displayName property value. The name of the notebook.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The name of the notebook.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



71
72
73
# File 'lib/models/recent_notebook.rb', line 71

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



78
79
80
81
82
83
84
85
86
# File 'lib/models/recent_notebook.rb', line 78

def get_field_deserializers()
    return {
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "lastAccessedTime" => lambda {|n| @last_accessed_time = n.get_date_time_value() },
        "links" => lambda {|n| @links = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::RecentNotebookLinks.create_from_discriminator_value(pn) }) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "sourceService" => lambda {|n| @source_service = n.get_enum_value(MicrosoftGraph::Models::OnenoteSourceService) },
    }
end

#last_accessed_timeObject

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



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

def last_accessed_time
    return @last_accessed_time
end

#last_accessed_time=(value) ⇒ Object

Sets the lastAccessedTime property value. The date and time when the notebook 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 lastAccessedTime property.

Returns:

  • a void



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

def last_accessed_time=(value)
    @last_accessed_time = value
end

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

Returns:

  • a recent_notebook_links



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

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 client, if it’s installed. The oneNoteWebURL link opens the notebook in OneNote on the web.

Parameters:

  • value

    Value to set for the links property.

Returns:

  • a void



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

def links=(value)
    @links = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



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

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



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

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


137
138
139
140
141
142
143
144
145
# File 'lib/models/recent_notebook.rb', line 137

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("displayName", @display_name)
    writer.write_date_time_value("lastAccessedTime", @last_accessed_time)
    writer.write_object_value("links", @links)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_enum_value("sourceService", @source_service)
    writer.write_additional_data(@additional_data)
end

#source_serviceObject

Gets the sourceService property value. The backend store where the Notebook resides, either OneDriveForBusiness or OneDrive.

Returns:

  • a onenote_source_service



150
151
152
# File 'lib/models/recent_notebook.rb', line 150

def source_service
    return @source_service
end

#source_service=(value) ⇒ Object

Sets the sourceService property value. The backend store where the Notebook resides, either OneDriveForBusiness or OneDrive.

Parameters:

  • value

    Value to set for the sourceService property.

Returns:

  • a void



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

def source_service=(value)
    @source_service = value
end