//
#pragma warning disable CS0618
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System;
namespace Marechai.App.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
#pragma warning disable CS1591
public partial class MediaDto : IAdditionalDataHolder, IParsable
#pragma warning restore CS1591
{
/// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
public IDictionary AdditionalData { get; set; }
/// The barcode property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Barcode { get; set; }
#nullable restore
#else
public string Barcode { get; set; }
#endif
/// The block_sizes property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List? BlockSizes { get; set; }
#nullable restore
#else
public List BlockSizes { get; set; }
#endif
/// The catalogue_number property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? CatalogueNumber { get; set; }
#nullable restore
#else
public string CatalogueNumber { get; set; }
#endif
/// The copy_protection property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? CopyProtection { get; set; }
#nullable restore
#else
public string CopyProtection { get; set; }
#endif
/// The firmware property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Firmware { get; set; }
#nullable restore
#else
public string Firmware { get; set; }
#endif
/// The id property
public int? Id { get; set; }
/// The last_sequence property
public int? LastSequence { get; set; }
/// The layers property
public int? Layers { get; set; }
/// The logical_block_size property
public int? LogicalBlockSize { get; set; }
/// The manufacturer property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Manufacturer { get; set; }
#nullable restore
#else
public string Manufacturer { get; set; }
#endif
/// The model property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Model { get; set; }
#nullable restore
#else
public string Model { get; set; }
#endif
/// The part_number property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? PartNumber { get; set; }
#nullable restore
#else
public string PartNumber { get; set; }
#endif
/// The physical_block_size property
public int? PhysicalBlockSize { get; set; }
/// The revision property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Revision { get; set; }
#nullable restore
#else
public string Revision { get; set; }
#endif
/// The sectors property
public int? Sectors { get; set; }
/// The sequence property
public int? Sequence { get; set; }
/// The serial_number property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? SerialNumber { get; set; }
#nullable restore
#else
public string SerialNumber { get; set; }
#endif
/// The sessions property
public int? Sessions { get; set; }
/// The sides property
public int? Sides { get; set; }
/// The size property
public int? Size { get; set; }
/// The storage_interface property
public int? StorageInterface { get; set; }
/// The table_of_contents property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List? TableOfContents { get; set; }
#nullable restore
#else
public List TableOfContents { get; set; }
#endif
/// The title property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Title { get; set; }
#nullable restore
#else
public string Title { get; set; }
#endif
/// The tracks property
public int? Tracks { get; set; }
/// The type property
public int? Type { get; set; }
/// The write_offset property
public int? WriteOffset { get; set; }
///
/// Instantiates a new and sets the default values.
///
public MediaDto()
{
AdditionalData = new Dictionary();
}
///
/// Creates a new instance of the appropriate class based on discriminator value
///
/// A
/// The parse node to use to read the discriminator value and create the object
public static global::Marechai.App.Models.MediaDto CreateFromDiscriminatorValue(IParseNode parseNode)
{
if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode));
return new global::Marechai.App.Models.MediaDto();
}
///
/// The deserialization information for the current model
///
/// A IDictionary<string, Action<IParseNode>>
public virtual IDictionary> GetFieldDeserializers()
{
return new Dictionary>
{
{ "barcode", n => { Barcode = n.GetStringValue(); } },
{ "block_sizes", n => { BlockSizes = n.GetCollectionOfObjectValues(global::Marechai.App.Models.VariableBlockSize.CreateFromDiscriminatorValue)?.AsList(); } },
{ "catalogue_number", n => { CatalogueNumber = n.GetStringValue(); } },
{ "copy_protection", n => { CopyProtection = n.GetStringValue(); } },
{ "firmware", n => { Firmware = n.GetStringValue(); } },
{ "id", n => { Id = n.GetIntValue(); } },
{ "last_sequence", n => { LastSequence = n.GetIntValue(); } },
{ "layers", n => { Layers = n.GetIntValue(); } },
{ "logical_block_size", n => { LogicalBlockSize = n.GetIntValue(); } },
{ "manufacturer", n => { Manufacturer = n.GetStringValue(); } },
{ "model", n => { Model = n.GetStringValue(); } },
{ "part_number", n => { PartNumber = n.GetStringValue(); } },
{ "physical_block_size", n => { PhysicalBlockSize = n.GetIntValue(); } },
{ "revision", n => { Revision = n.GetStringValue(); } },
{ "sectors", n => { Sectors = n.GetIntValue(); } },
{ "sequence", n => { Sequence = n.GetIntValue(); } },
{ "serial_number", n => { SerialNumber = n.GetStringValue(); } },
{ "sessions", n => { Sessions = n.GetIntValue(); } },
{ "sides", n => { Sides = n.GetIntValue(); } },
{ "size", n => { Size = n.GetIntValue(); } },
{ "storage_interface", n => { StorageInterface = n.GetIntValue(); } },
{ "table_of_contents", n => { TableOfContents = n.GetCollectionOfObjectValues(global::Marechai.App.Models.OpticalDiscTrack.CreateFromDiscriminatorValue)?.AsList(); } },
{ "title", n => { Title = n.GetStringValue(); } },
{ "tracks", n => { Tracks = n.GetIntValue(); } },
{ "type", n => { Type = n.GetIntValue(); } },
{ "write_offset", n => { WriteOffset = n.GetIntValue(); } },
};
}
///
/// Serializes information the current object
///
/// Serialization writer to use to serialize this model
public virtual void Serialize(ISerializationWriter writer)
{
if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("barcode", Barcode);
writer.WriteCollectionOfObjectValues("block_sizes", BlockSizes);
writer.WriteStringValue("catalogue_number", CatalogueNumber);
writer.WriteStringValue("copy_protection", CopyProtection);
writer.WriteStringValue("firmware", Firmware);
writer.WriteIntValue("id", Id);
writer.WriteIntValue("last_sequence", LastSequence);
writer.WriteIntValue("layers", Layers);
writer.WriteIntValue("logical_block_size", LogicalBlockSize);
writer.WriteStringValue("manufacturer", Manufacturer);
writer.WriteStringValue("model", Model);
writer.WriteStringValue("part_number", PartNumber);
writer.WriteIntValue("physical_block_size", PhysicalBlockSize);
writer.WriteStringValue("revision", Revision);
writer.WriteIntValue("sectors", Sectors);
writer.WriteIntValue("sequence", Sequence);
writer.WriteStringValue("serial_number", SerialNumber);
writer.WriteIntValue("sessions", Sessions);
writer.WriteIntValue("sides", Sides);
writer.WriteIntValue("size", Size);
writer.WriteIntValue("storage_interface", StorageInterface);
writer.WriteCollectionOfObjectValues("table_of_contents", TableOfContents);
writer.WriteStringValue("title", Title);
writer.WriteIntValue("tracks", Tracks);
writer.WriteIntValue("type", Type);
writer.WriteIntValue("write_offset", WriteOffset);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618