Class: MicrosoftGraph::Models::OnenoteResource

Inherits:
OnenoteEntityBaseModel show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/onenote_resource.rb

Class Method Summary collapse

Instance Method Summary collapse

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



19
20
21
22
# File 'lib/models/onenote_resource.rb', line 19

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

Raises:

  • (StandardError)


58
59
60
61
# File 'lib/models/onenote_resource.rb', line 58

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

Instance Method Details

#contentObject

Gets the content property value. The content stream

Returns:

  • a base64url



27
28
29
# File 'lib/models/onenote_resource.rb', line 27

def content
    return @content
end

#content=(value) ⇒ Object

Sets the content property value. The content stream

Parameters:

  • value

    Value to set for the content property.

Returns:

  • a void



35
36
37
# File 'lib/models/onenote_resource.rb', line 35

def content=(value)
    @content = value
end

#content_urlObject

Gets the contentUrl property value. The URL for downloading the content

Returns:

  • a string



42
43
44
# File 'lib/models/onenote_resource.rb', line 42

def content_url
    return @content_url
end

#content_url=(value) ⇒ Object

Sets the contentUrl property value. The URL for downloading the content

Parameters:

  • value

    Value to set for the contentUrl property.

Returns:

  • a void



50
51
52
# File 'lib/models/onenote_resource.rb', line 50

def content_url=(value)
    @content_url = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



66
67
68
69
70
71
# File 'lib/models/onenote_resource.rb', line 66

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() },
    })
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


77
78
79
80
81
82
# File 'lib/models/onenote_resource.rb', line 77

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)
end