Class: Rixl::Models::Image

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new Image and sets the default values.



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

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 image

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Image.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/image.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/image.rb', line 42

def additional_data=(value)
    @additional_data = value
end

#attached_to_videoObject

Gets the attached_to_video property value. The attached_to_video property

Returns:

  • a boolean



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

def attached_to_video
    return @attached_to_video
end

#attached_to_video=(value) ⇒ Object

Sets the attached_to_video property value. The attached_to_video property

Parameters:

  • value

    Value to set for the attached_to_video property.

Returns:

  • a void



57
58
59
# File 'lib/models/image.rb', line 57

def attached_to_video=(value)
    @attached_to_video = value
end

#fileObject

Gets the file property value. The file property

Returns:

  • a file



80
81
82
# File 'lib/models/image.rb', line 80

def file
    return @file
end

#file=(value) ⇒ Object

Sets the file property value. The file property

Parameters:

  • value

    Value to set for the file property.

Returns:

  • a void



88
89
90
# File 'lib/models/image.rb', line 88

def file=(value)
    @file = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



95
96
97
98
99
100
101
102
103
104
# File 'lib/models/image.rb', line 95

def get_field_deserializers()
    return {
        "attached_to_video" => lambda {|n| @attached_to_video = n.get_boolean_value() },
        "file" => lambda {|n| @file = n.get_object_value(lambda {|pn| Rixl::Models::File.create_from_discriminator_value(pn) }) },
        "height" => lambda {|n| @height = n.get_number_value() },
        "id" => lambda {|n| @id = n.get_string_value() },
        "thumbhash" => lambda {|n| @thumbhash = n.get_string_value() },
        "width" => lambda {|n| @width = n.get_number_value() },
    }
end

#heightObject

Gets the height property value. The height property

Returns:

  • a integer



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

def height
    return @height
end

#height=(value) ⇒ Object

Sets the height property value. The height property

Parameters:

  • value

    Value to set for the height property.

Returns:

  • a void



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

def height=(value)
    @height = value
end

#idObject

Gets the id property value. The id property

Returns:

  • a string



124
125
126
# File 'lib/models/image.rb', line 124

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. The id property

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



132
133
134
# File 'lib/models/image.rb', line 132

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


140
141
142
143
144
145
146
147
148
149
# File 'lib/models/image.rb', line 140

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("attached_to_video", @attached_to_video)
    writer.write_object_value("file", @file)
    writer.write_number_value("height", @height)
    writer.write_string_value("id", @id)
    writer.write_string_value("thumbhash", @thumbhash)
    writer.write_number_value("width", @width)
    writer.write_additional_data(@additional_data)
end

#thumbhashObject

Gets the thumbhash property value. The thumbhash property

Returns:

  • a string



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

def thumbhash
    return @thumbhash
end

#thumbhash=(value) ⇒ Object

Sets the thumbhash property value. The thumbhash property

Parameters:

  • value

    Value to set for the thumbhash property.

Returns:

  • a void



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

def thumbhash=(value)
    @thumbhash = value
end

#widthObject

Gets the width property value. The width property

Returns:

  • a integer



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

def width
    return @width
end

#width=(value) ⇒ Object

Sets the width property value. The width property

Parameters:

  • value

    Value to set for the width property.

Returns:

  • a void



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

def width=(value)
    @width = value
end