// #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 #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? Id { get; set; } #nullable restore #else public UntypedNode Id { get; set; } #endif /// The last_sequence property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? LastSequence { get; set; } #nullable restore #else public UntypedNode LastSequence { get; set; } #endif /// The layers property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? Layers { get; set; } #nullable restore #else public UntypedNode Layers { get; set; } #endif /// The logical_block_size property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? LogicalBlockSize { get; set; } #nullable restore #else public UntypedNode LogicalBlockSize { get; set; } #endif /// 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 #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? PhysicalBlockSize { get; set; } #nullable restore #else public UntypedNode PhysicalBlockSize { get; set; } #endif /// 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 #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? Sectors { get; set; } #nullable restore #else public UntypedNode Sectors { get; set; } #endif /// The sequence property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? Sequence { get; set; } #nullable restore #else public UntypedNode Sequence { get; set; } #endif /// 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 #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? Sessions { get; set; } #nullable restore #else public UntypedNode Sessions { get; set; } #endif /// The sides property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? Sides { get; set; } #nullable restore #else public UntypedNode Sides { get; set; } #endif /// The size property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? Size { get; set; } #nullable restore #else public UntypedNode Size { get; set; } #endif /// The storage_interface property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::Marechai.App.Models.MediaDto.MediaDto_storage_interface? StorageInterface { get; set; } #nullable restore #else public global::Marechai.App.Models.MediaDto.MediaDto_storage_interface StorageInterface { get; set; } #endif /// 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 #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? Tracks { get; set; } #nullable restore #else public UntypedNode Tracks { get; set; } #endif /// The type property public int? Type { get; set; } /// The write_offset property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? WriteOffset { get; set; } #nullable restore #else public UntypedNode WriteOffset { get; set; } #endif /// /// 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.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "last_sequence", n => { LastSequence = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "layers", n => { Layers = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "logical_block_size", n => { LogicalBlockSize = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "manufacturer", n => { Manufacturer = n.GetStringValue(); } }, { "model", n => { Model = n.GetStringValue(); } }, { "part_number", n => { PartNumber = n.GetStringValue(); } }, { "physical_block_size", n => { PhysicalBlockSize = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "revision", n => { Revision = n.GetStringValue(); } }, { "sectors", n => { Sectors = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "sequence", n => { Sequence = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "serial_number", n => { SerialNumber = n.GetStringValue(); } }, { "sessions", n => { Sessions = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "sides", n => { Sides = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "size", n => { Size = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "storage_interface", n => { StorageInterface = n.GetObjectValue(global::Marechai.App.Models.MediaDto.MediaDto_storage_interface.CreateFromDiscriminatorValue); } }, { "table_of_contents", n => { TableOfContents = n.GetCollectionOfObjectValues(global::Marechai.App.Models.OpticalDiscTrack.CreateFromDiscriminatorValue)?.AsList(); } }, { "title", n => { Title = n.GetStringValue(); } }, { "tracks", n => { Tracks = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "type", n => { Type = n.GetIntValue(); } }, { "write_offset", n => { WriteOffset = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, }; } /// /// 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.WriteObjectValue("id", Id); writer.WriteObjectValue("last_sequence", LastSequence); writer.WriteObjectValue("layers", Layers); writer.WriteObjectValue("logical_block_size", LogicalBlockSize); writer.WriteStringValue("manufacturer", Manufacturer); writer.WriteStringValue("model", Model); writer.WriteStringValue("part_number", PartNumber); writer.WriteObjectValue("physical_block_size", PhysicalBlockSize); writer.WriteStringValue("revision", Revision); writer.WriteObjectValue("sectors", Sectors); writer.WriteObjectValue("sequence", Sequence); writer.WriteStringValue("serial_number", SerialNumber); writer.WriteObjectValue("sessions", Sessions); writer.WriteObjectValue("sides", Sides); writer.WriteObjectValue("size", Size); writer.WriteObjectValue("storage_interface", StorageInterface); writer.WriteCollectionOfObjectValues("table_of_contents", TableOfContents); writer.WriteStringValue("title", Title); writer.WriteObjectValue("tracks", Tracks); writer.WriteIntValue("type", Type); writer.WriteObjectValue("write_offset", WriteOffset); writer.WriteAdditionalData(AdditionalData); } /// /// Composed type wrapper for classes , /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MediaDto_storage_interface : IComposedTypeWrapper, IParsable { /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::Marechai.App.Models.MediaDto_storage_interfaceMember1? MediaDtoStorageInterfaceMember1 { get; set; } #nullable restore #else public global::Marechai.App.Models.MediaDto_storage_interfaceMember1 MediaDtoStorageInterfaceMember1 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::Marechai.App.Models.StorageInterface? StorageInterface { get; set; } #nullable restore #else public global::Marechai.App.Models.StorageInterface StorageInterface { get; set; } #endif /// /// 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.MediaDto_storage_interface CreateFromDiscriminatorValue(IParseNode parseNode) { if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); var result = new global::Marechai.App.Models.MediaDto.MediaDto_storage_interface(); if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.MediaDtoStorageInterfaceMember1 = new global::Marechai.App.Models.MediaDto_storage_interfaceMember1(); } else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.StorageInterface = new global::Marechai.App.Models.StorageInterface(); } return result; } /// /// The deserialization information for the current model /// /// A IDictionary<string, Action<IParseNode>> public virtual IDictionary> GetFieldDeserializers() { if(MediaDtoStorageInterfaceMember1 != null) { return MediaDtoStorageInterfaceMember1.GetFieldDeserializers(); } else if(StorageInterface != null) { return StorageInterface.GetFieldDeserializers(); } return new Dictionary>(); } /// /// 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)); if(MediaDtoStorageInterfaceMember1 != null) { writer.WriteObjectValue(null, MediaDtoStorageInterfaceMember1); } else if(StorageInterface != null) { writer.WriteObjectValue(null, StorageInterface); } } } } } #pragma warning restore CS0618