Class: MicrosoftGraph::Models::Audio

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new audio and sets the default values.



157
158
159
# File 'lib/models/audio.rb', line 157

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 audio

Raises:

  • (StandardError)


180
181
182
183
# File 'lib/models/audio.rb', line 180

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



67
68
69
# File 'lib/models/audio.rb', line 67

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



75
76
77
# File 'lib/models/audio.rb', line 75

def additional_data=(value)
    @additional_data = value
end

#albumObject

Gets the album property value. The title of the album for this audio file.

Returns:

  • a string



82
83
84
# File 'lib/models/audio.rb', line 82

def album
    return @album
end

#album=(value) ⇒ Object

Sets the album property value. The title of the album for this audio file.

Parameters:

  • value

    Value to set for the album property.

Returns:

  • a void



90
91
92
# File 'lib/models/audio.rb', line 90

def album=(value)
    @album = value
end

#album_artistObject

Gets the albumArtist property value. The artist named on the album for the audio file.

Returns:

  • a string



97
98
99
# File 'lib/models/audio.rb', line 97

def album_artist
    return @album_artist
end

#album_artist=(value) ⇒ Object

Sets the albumArtist property value. The artist named on the album for the audio file.

Parameters:

  • value

    Value to set for the albumArtist property.

Returns:

  • a void



105
106
107
# File 'lib/models/audio.rb', line 105

def album_artist=(value)
    @album_artist = value
end

#artistObject

Gets the artist property value. The performing artist for the audio file.

Returns:

  • a string



112
113
114
# File 'lib/models/audio.rb', line 112

def artist
    return @artist
end

#artist=(value) ⇒ Object

Sets the artist property value. The performing artist for the audio file.

Parameters:

  • value

    Value to set for the artist property.

Returns:

  • a void



120
121
122
# File 'lib/models/audio.rb', line 120

def artist=(value)
    @artist = value
end

#bitrateObject

Gets the bitrate property value. Bitrate expressed in kbps.

Returns:

  • a int64



127
128
129
# File 'lib/models/audio.rb', line 127

def bitrate
    return @bitrate
end

#bitrate=(value) ⇒ Object

Sets the bitrate property value. Bitrate expressed in kbps.

Parameters:

  • value

    Value to set for the bitrate property.

Returns:

  • a void



135
136
137
# File 'lib/models/audio.rb', line 135

def bitrate=(value)
    @bitrate = value
end

#composersObject

Gets the composers property value. The name of the composer of the audio file.

Returns:

  • a string



142
143
144
# File 'lib/models/audio.rb', line 142

def composers
    return @composers
end

#composers=(value) ⇒ Object

Sets the composers property value. The name of the composer of the audio file.

Parameters:

  • value

    Value to set for the composers property.

Returns:

  • a void



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

def composers=(value)
    @composers = value
end

Gets the copyright property value. Copyright information for the audio file.

Returns:

  • a string



164
165
166
# File 'lib/models/audio.rb', line 164

def copyright
    return @copyright
end

#copyright=(value) ⇒ Object

Sets the copyright property value. Copyright information for the audio file.

Parameters:

  • value

    Value to set for the copyright property.

Returns:

  • a void



172
173
174
# File 'lib/models/audio.rb', line 172

def copyright=(value)
    @copyright = value
end

#discObject

Gets the disc property value. The number of the disc this audio file came from.

Returns:

  • a integer



188
189
190
# File 'lib/models/audio.rb', line 188

def disc
    return @disc
end

#disc=(value) ⇒ Object

Sets the disc property value. The number of the disc this audio file came from.

Parameters:

  • value

    Value to set for the disc property.

Returns:

  • a void



196
197
198
# File 'lib/models/audio.rb', line 196

def disc=(value)
    @disc = value
end

#disc_countObject

Gets the discCount property value. The total number of discs in this album.

Returns:

  • a integer



203
204
205
# File 'lib/models/audio.rb', line 203

def disc_count
    return @disc_count
end

#disc_count=(value) ⇒ Object

Sets the discCount property value. The total number of discs in this album.

Parameters:

  • value

    Value to set for the discCount property.

Returns:

  • a void



211
212
213
# File 'lib/models/audio.rb', line 211

def disc_count=(value)
    @disc_count = value
end

#durationObject

Gets the duration property value. Duration of the audio file, expressed in milliseconds

Returns:

  • a int64



218
219
220
# File 'lib/models/audio.rb', line 218

def duration
    return @duration
end

#duration=(value) ⇒ Object

Sets the duration property value. Duration of the audio file, expressed in milliseconds

Parameters:

  • value

    Value to set for the duration property.

Returns:

  • a void



226
227
228
# File 'lib/models/audio.rb', line 226

def duration=(value)
    @duration = value
end

#genreObject

Gets the genre property value. The genre of this audio file.

Returns:

  • a string



233
234
235
# File 'lib/models/audio.rb', line 233

def genre
    return @genre
end

#genre=(value) ⇒ Object

Sets the genre property value. The genre of this audio file.

Parameters:

  • value

    Value to set for the genre property.

Returns:

  • a void



241
242
243
# File 'lib/models/audio.rb', line 241

def genre=(value)
    @genre = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/models/audio.rb', line 248

def get_field_deserializers()
    return {
        "album" => lambda {|n| @album = n.get_string_value() },
        "albumArtist" => lambda {|n| @album_artist = n.get_string_value() },
        "artist" => lambda {|n| @artist = n.get_string_value() },
        "bitrate" => lambda {|n| @bitrate = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
        "composers" => lambda {|n| @composers = n.get_string_value() },
        "copyright" => lambda {|n| @copyright = n.get_string_value() },
        "disc" => lambda {|n| @disc = n.get_number_value() },
        "discCount" => lambda {|n| @disc_count = n.get_number_value() },
        "duration" => lambda {|n| @duration = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
        "genre" => lambda {|n| @genre = n.get_string_value() },
        "hasDrm" => lambda {|n| @has_drm = n.get_boolean_value() },
        "isVariableBitrate" => lambda {|n| @is_variable_bitrate = n.get_boolean_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "title" => lambda {|n| @title = n.get_string_value() },
        "track" => lambda {|n| @track = n.get_number_value() },
        "trackCount" => lambda {|n| @track_count = n.get_number_value() },
        "year" => lambda {|n| @year = n.get_number_value() },
    }
end

#has_drmObject

Gets the hasDrm property value. Indicates if the file is protected with digital rights management.

Returns:

  • a boolean



273
274
275
# File 'lib/models/audio.rb', line 273

def has_drm
    return @has_drm
end

#has_drm=(value) ⇒ Object

Sets the hasDrm property value. Indicates if the file is protected with digital rights management.

Parameters:

  • value

    Value to set for the hasDrm property.

Returns:

  • a void



281
282
283
# File 'lib/models/audio.rb', line 281

def has_drm=(value)
    @has_drm = value
end

#is_variable_bitrateObject

Gets the isVariableBitrate property value. Indicates if the file is encoded with a variable bitrate.

Returns:

  • a boolean



288
289
290
# File 'lib/models/audio.rb', line 288

def is_variable_bitrate
    return @is_variable_bitrate
end

#is_variable_bitrate=(value) ⇒ Object

Sets the isVariableBitrate property value. Indicates if the file is encoded with a variable bitrate.

Parameters:

  • value

    Value to set for the isVariableBitrate property.

Returns:

  • a void



296
297
298
# File 'lib/models/audio.rb', line 296

def is_variable_bitrate=(value)
    @is_variable_bitrate = value
end

#odata_typeObject

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

Returns:

  • a string



303
304
305
# File 'lib/models/audio.rb', line 303

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



311
312
313
# File 'lib/models/audio.rb', line 311

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)


319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/models/audio.rb', line 319

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("album", @album)
    writer.write_string_value("albumArtist", @album_artist)
    writer.write_string_value("artist", @artist)
    writer.write_object_value("bitrate", @bitrate)
    writer.write_string_value("composers", @composers)
    writer.write_string_value("copyright", @copyright)
    writer.write_number_value("disc", @disc)
    writer.write_number_value("discCount", @disc_count)
    writer.write_object_value("duration", @duration)
    writer.write_string_value("genre", @genre)
    writer.write_boolean_value("hasDrm", @has_drm)
    writer.write_boolean_value("isVariableBitrate", @is_variable_bitrate)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("title", @title)
    writer.write_number_value("track", @track)
    writer.write_number_value("trackCount", @track_count)
    writer.write_number_value("year", @year)
    writer.write_additional_data(@additional_data)
end

#titleObject

Gets the title property value. The title of the audio file.

Returns:

  • a string



344
345
346
# File 'lib/models/audio.rb', line 344

def title
    return @title
end

#title=(value) ⇒ Object

Sets the title property value. The title of the audio file.

Parameters:

  • value

    Value to set for the title property.

Returns:

  • a void



352
353
354
# File 'lib/models/audio.rb', line 352

def title=(value)
    @title = value
end

#trackObject

Gets the track property value. The number of the track on the original disc for this audio file.

Returns:

  • a integer



359
360
361
# File 'lib/models/audio.rb', line 359

def track
    return @track
end

#track=(value) ⇒ Object

Sets the track property value. The number of the track on the original disc for this audio file.

Parameters:

  • value

    Value to set for the track property.

Returns:

  • a void



367
368
369
# File 'lib/models/audio.rb', line 367

def track=(value)
    @track = value
end

#track_countObject

Gets the trackCount property value. The total number of tracks on the original disc for this audio file.

Returns:

  • a integer



374
375
376
# File 'lib/models/audio.rb', line 374

def track_count
    return @track_count
end

#track_count=(value) ⇒ Object

Sets the trackCount property value. The total number of tracks on the original disc for this audio file.

Parameters:

  • value

    Value to set for the trackCount property.

Returns:

  • a void



382
383
384
# File 'lib/models/audio.rb', line 382

def track_count=(value)
    @track_count = value
end

#yearObject

Gets the year property value. The year the audio file was recorded.

Returns:

  • a integer



389
390
391
# File 'lib/models/audio.rb', line 389

def year
    return @year
end

#year=(value) ⇒ Object

Sets the year property value. The year the audio file was recorded.

Parameters:

  • value

    Value to set for the year property.

Returns:

  • a void



397
398
399
# File 'lib/models/audio.rb', line 397

def year=(value)
    @year = value
end