Class: MicrosoftGraph::Models::Thumbnail

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new thumbnail and sets the default values.



49
50
51
# File 'lib/models/thumbnail.rb', line 49

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 thumbnail

Raises:

  • (StandardError)


72
73
74
75
# File 'lib/models/thumbnail.rb', line 72

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Thumbnail.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



34
35
36
# File 'lib/models/thumbnail.rb', line 34

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



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

def additional_data=(value)
    @additional_data = value
end

#contentObject

Gets the content property value. The content stream for the thumbnail.

Returns:

  • a base64url



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

def content
    return @content
end

#content=(value) ⇒ Object

Sets the content property value. The content stream for the thumbnail.

Parameters:

  • value

    Value to set for the content property.

Returns:

  • a void



64
65
66
# File 'lib/models/thumbnail.rb', line 64

def content=(value)
    @content = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



80
81
82
83
84
85
86
87
88
89
# File 'lib/models/thumbnail.rb', line 80

def get_field_deserializers()
    return {
        "content" => lambda {|n| @content = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },
        "height" => lambda {|n| @height = n.get_number_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "sourceItemId" => lambda {|n| @source_item_id = n.get_string_value() },
        "url" => lambda {|n| @url = n.get_string_value() },
        "width" => lambda {|n| @width = n.get_number_value() },
    }
end

#heightObject

Gets the height property value. The height of the thumbnail, in pixels.

Returns:

  • a integer



94
95
96
# File 'lib/models/thumbnail.rb', line 94

def height
    return @height
end

#height=(value) ⇒ Object

Sets the height property value. The height of the thumbnail, in pixels.

Parameters:

  • value

    Value to set for the height property.

Returns:

  • a void



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

def height=(value)
    @height = value
end

#odata_typeObject

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

Returns:

  • a string



109
110
111
# File 'lib/models/thumbnail.rb', line 109

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



117
118
119
# File 'lib/models/thumbnail.rb', line 117

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)


125
126
127
128
129
130
131
132
133
134
# File 'lib/models/thumbnail.rb', line 125

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("content", @content)
    writer.write_number_value("height", @height)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("sourceItemId", @source_item_id)
    writer.write_string_value("url", @url)
    writer.write_number_value("width", @width)
    writer.write_additional_data(@additional_data)
end

#source_item_idObject

Gets the sourceItemId property value. The unique identifier of the item that provided the thumbnail. This is only available when a folder thumbnail is requested.

Returns:

  • a string



139
140
141
# File 'lib/models/thumbnail.rb', line 139

def source_item_id
    return @source_item_id
end

#source_item_id=(value) ⇒ Object

Sets the sourceItemId property value. The unique identifier of the item that provided the thumbnail. This is only available when a folder thumbnail is requested.

Parameters:

  • value

    Value to set for the sourceItemId property.

Returns:

  • a void



147
148
149
# File 'lib/models/thumbnail.rb', line 147

def source_item_id=(value)
    @source_item_id = value
end

#urlObject

Gets the url property value. The URL used to fetch the thumbnail content.

Returns:

  • a string



154
155
156
# File 'lib/models/thumbnail.rb', line 154

def url
    return @url
end

#url=(value) ⇒ Object

Sets the url property value. The URL used to fetch the thumbnail content.

Parameters:

  • value

    Value to set for the url property.

Returns:

  • a void



162
163
164
# File 'lib/models/thumbnail.rb', line 162

def url=(value)
    @url = value
end

#widthObject

Gets the width property value. The width of the thumbnail, in pixels.

Returns:

  • a integer



169
170
171
# File 'lib/models/thumbnail.rb', line 169

def width
    return @width
end

#width=(value) ⇒ Object

Sets the width property value. The width of the thumbnail, in pixels.

Parameters:

  • value

    Value to set for the width property.

Returns:

  • a void



177
178
179
# File 'lib/models/thumbnail.rb', line 177

def width=(value)
    @width = value
end