Class: MicrosoftGraph::Models::Video

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new video and sets the default values.



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

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 video

Raises:

  • (StandardError)


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

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



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

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



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

def additional_data=(value)
    @additional_data = value
end

#audio_bits_per_sampleObject

Gets the audioBitsPerSample property value. Number of audio bits per sample.

Returns:

  • a integer



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

def audio_bits_per_sample
    return @audio_bits_per_sample
end

#audio_bits_per_sample=(value) ⇒ Object

Sets the audioBitsPerSample property value. Number of audio bits per sample.

Parameters:

  • value

    Value to set for the audioBitsPerSample property.

Returns:

  • a void



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

def audio_bits_per_sample=(value)
    @audio_bits_per_sample = value
end

#audio_channelsObject

Gets the audioChannels property value. Number of audio channels.

Returns:

  • a integer



79
80
81
# File 'lib/models/video.rb', line 79

def audio_channels
    return @audio_channels
end

#audio_channels=(value) ⇒ Object

Sets the audioChannels property value. Number of audio channels.

Parameters:

  • value

    Value to set for the audioChannels property.

Returns:

  • a void



87
88
89
# File 'lib/models/video.rb', line 87

def audio_channels=(value)
    @audio_channels = value
end

#audio_formatObject

Gets the audioFormat property value. Name of the audio format (AAC, MP3, etc.).

Returns:

  • a string



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

def audio_format
    return @audio_format
end

#audio_format=(value) ⇒ Object

Sets the audioFormat property value. Name of the audio format (AAC, MP3, etc.).

Parameters:

  • value

    Value to set for the audioFormat property.

Returns:

  • a void



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

def audio_format=(value)
    @audio_format = value
end

#audio_samples_per_secondObject

Gets the audioSamplesPerSecond property value. Number of audio samples per second.

Returns:

  • a integer



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

def audio_samples_per_second
    return @audio_samples_per_second
end

#audio_samples_per_second=(value) ⇒ Object

Sets the audioSamplesPerSecond property value. Number of audio samples per second.

Parameters:

  • value

    Value to set for the audioSamplesPerSecond property.

Returns:

  • a void



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

def audio_samples_per_second=(value)
    @audio_samples_per_second = value
end

#bitrateObject

Gets the bitrate property value. Bit rate of the video in bits per second.

Returns:

  • a integer



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

def bitrate
    return @bitrate
end

#bitrate=(value) ⇒ Object

Sets the bitrate property value. Bit rate of the video in bits per second.

Parameters:

  • value

    Value to set for the bitrate property.

Returns:

  • a void



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

def bitrate=(value)
    @bitrate = value
end

#durationObject

Gets the duration property value. Duration of the file in milliseconds.

Returns:

  • a int64



155
156
157
# File 'lib/models/video.rb', line 155

def duration
    return @duration
end

#duration=(value) ⇒ Object

Sets the duration property value. Duration of the file in milliseconds.

Parameters:

  • value

    Value to set for the duration property.

Returns:

  • a void



163
164
165
# File 'lib/models/video.rb', line 163

def duration=(value)
    @duration = value
end

#four_c_cObject

Gets the fourCC property value. ‘Four character code’ name of the video format.

Returns:

  • a string



170
171
172
# File 'lib/models/video.rb', line 170

def four_c_c
    return @four_c_c
end

#four_c_c=(value) ⇒ Object

Sets the fourCC property value. ‘Four character code’ name of the video format.

Parameters:

  • value

    Value to set for the fourCC property.

Returns:

  • a void



178
179
180
# File 'lib/models/video.rb', line 178

def four_c_c=(value)
    @four_c_c = value
end

#frame_rateObject

Gets the frameRate property value. Frame rate of the video.

Returns:

  • a double



185
186
187
# File 'lib/models/video.rb', line 185

def frame_rate
    return @frame_rate
end

#frame_rate=(value) ⇒ Object

Sets the frameRate property value. Frame rate of the video.

Parameters:

  • value

    Value to set for the frameRate property.

Returns:

  • a void



193
194
195
# File 'lib/models/video.rb', line 193

def frame_rate=(value)
    @frame_rate = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/models/video.rb', line 200

def get_field_deserializers()
    return {
        "audioBitsPerSample" => lambda {|n| @audio_bits_per_sample = n.get_number_value() },
        "audioChannels" => lambda {|n| @audio_channels = n.get_number_value() },
        "audioFormat" => lambda {|n| @audio_format = n.get_string_value() },
        "audioSamplesPerSecond" => lambda {|n| @audio_samples_per_second = n.get_number_value() },
        "bitrate" => lambda {|n| @bitrate = n.get_number_value() },
        "duration" => lambda {|n| @duration = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
        "fourCC" => lambda {|n| @four_c_c = n.get_string_value() },
        "frameRate" => lambda {|n| @frame_rate = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "height" => lambda {|n| @height = n.get_number_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "width" => lambda {|n| @width = n.get_number_value() },
    }
end

#heightObject

Gets the height property value. Height of the video, in pixels.

Returns:

  • a integer



219
220
221
# File 'lib/models/video.rb', line 219

def height
    return @height
end

#height=(value) ⇒ Object

Sets the height property value. Height of the video, in pixels.

Parameters:

  • value

    Value to set for the height property.

Returns:

  • a void



227
228
229
# File 'lib/models/video.rb', line 227

def height=(value)
    @height = value
end

#odata_typeObject

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

Returns:

  • a string



234
235
236
# File 'lib/models/video.rb', line 234

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



242
243
244
# File 'lib/models/video.rb', line 242

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)


250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/models/video.rb', line 250

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("audioBitsPerSample", @audio_bits_per_sample)
    writer.write_number_value("audioChannels", @audio_channels)
    writer.write_string_value("audioFormat", @audio_format)
    writer.write_number_value("audioSamplesPerSecond", @audio_samples_per_second)
    writer.write_number_value("bitrate", @bitrate)
    writer.write_object_value("duration", @duration)
    writer.write_string_value("fourCC", @four_c_c)
    writer.write_object_value("frameRate", @frame_rate)
    writer.write_number_value("height", @height)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_number_value("width", @width)
    writer.write_additional_data(@additional_data)
end

#widthObject

Gets the width property value. Width of the video, in pixels.

Returns:

  • a integer



269
270
271
# File 'lib/models/video.rb', line 269

def width
    return @width
end

#width=(value) ⇒ Object

Sets the width property value. Width of the video, in pixels.

Parameters:

  • value

    Value to set for the width property.

Returns:

  • a void



277
278
279
# File 'lib/models/video.rb', line 277

def width=(value)
    @width = value
end