2025-11-14 13:33:27 +00:00
// <auto-generated/>
#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
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary < string , object > AdditionalData { get ; set ; }
/// <summary>The barcode property</summary>
#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
/// <summary>The block_sizes property</summary>
#if NETSTANDARD2_1_OR_GREATER | | NETCOREAPP3_1_OR_GREATER
#nullable enable
public List < global :: Marechai . App . Models . VariableBlockSize > ? BlockSizes { get ; set ; }
#nullable restore
#else
public List < global :: Marechai . App . Models . VariableBlockSize > BlockSizes { get ; set ; }
#endif
/// <summary>The catalogue_number property</summary>
#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
/// <summary>The copy_protection property</summary>
#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
/// <summary>The firmware property</summary>
#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
/// <summary>The id property</summary>
2025-11-15 22:41:01 +00:00
public int? Id { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The last_sequence property</summary>
2025-11-15 22:41:01 +00:00
public int? LastSequence { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The layers property</summary>
2025-11-15 22:41:01 +00:00
public int? Layers { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The logical_block_size property</summary>
2025-11-15 22:41:01 +00:00
public int? LogicalBlockSize { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The manufacturer property</summary>
#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
/// <summary>The model property</summary>
#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
/// <summary>The part_number property</summary>
#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
/// <summary>The physical_block_size property</summary>
2025-11-15 22:41:01 +00:00
public int? PhysicalBlockSize { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The revision property</summary>
#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
/// <summary>The sectors property</summary>
2025-11-15 22:41:01 +00:00
public int? Sectors { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The sequence property</summary>
2025-11-15 22:41:01 +00:00
public int? Sequence { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The serial_number property</summary>
#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
/// <summary>The sessions property</summary>
2025-11-15 22:41:01 +00:00
public int? Sessions { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The sides property</summary>
2025-11-15 22:41:01 +00:00
public int? Sides { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The size property</summary>
2025-11-15 22:41:01 +00:00
public int? Size { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The storage_interface property</summary>
#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
/// <summary>The table_of_contents property</summary>
#if NETSTANDARD2_1_OR_GREATER | | NETCOREAPP3_1_OR_GREATER
#nullable enable
public List < global :: Marechai . App . Models . OpticalDiscTrack > ? TableOfContents { get ; set ; }
#nullable restore
#else
public List < global :: Marechai . App . Models . OpticalDiscTrack > TableOfContents { get ; set ; }
#endif
/// <summary>The title property</summary>
#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
/// <summary>The tracks property</summary>
2025-11-15 22:41:01 +00:00
public int? Tracks { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>The type property</summary>
public int? Type { get ; set ; }
/// <summary>The write_offset property</summary>
2025-11-15 22:41:01 +00:00
public int? WriteOffset { get ; set ; }
2025-11-14 13:33:27 +00:00
/// <summary>
/// Instantiates a new <see cref="global::Marechai.App.Models.MediaDto"/> and sets the default values.
/// </summary>
public MediaDto ( )
{
AdditionalData = new Dictionary < string , object > ( ) ;
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::Marechai.App.Models.MediaDto"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
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 ( ) ;
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
/// <returns>A IDictionary<string, Action<IParseNode>></returns>
public virtual IDictionary < string , Action < IParseNode > > GetFieldDeserializers ( )
{
return new Dictionary < string , Action < IParseNode > >
{
{ "barcode" , n = > { Barcode = n . GetStringValue ( ) ; } } ,
{ "block_sizes" , n = > { BlockSizes = n . GetCollectionOfObjectValues < global :: Marechai . App . Models . VariableBlockSize > ( global :: Marechai . App . Models . VariableBlockSize . CreateFromDiscriminatorValue ) ? . AsList ( ) ; } } ,
{ "catalogue_number" , n = > { CatalogueNumber = n . GetStringValue ( ) ; } } ,
{ "copy_protection" , n = > { CopyProtection = n . GetStringValue ( ) ; } } ,
{ "firmware" , n = > { Firmware = n . GetStringValue ( ) ; } } ,
2025-11-15 22:41:01 +00:00
{ "id" , n = > { Id = n . GetIntValue ( ) ; } } ,
{ "last_sequence" , n = > { LastSequence = n . GetIntValue ( ) ; } } ,
{ "layers" , n = > { Layers = n . GetIntValue ( ) ; } } ,
{ "logical_block_size" , n = > { LogicalBlockSize = n . GetIntValue ( ) ; } } ,
2025-11-14 13:33:27 +00:00
{ "manufacturer" , n = > { Manufacturer = n . GetStringValue ( ) ; } } ,
{ "model" , n = > { Model = n . GetStringValue ( ) ; } } ,
{ "part_number" , n = > { PartNumber = n . GetStringValue ( ) ; } } ,
2025-11-15 22:41:01 +00:00
{ "physical_block_size" , n = > { PhysicalBlockSize = n . GetIntValue ( ) ; } } ,
2025-11-14 13:33:27 +00:00
{ "revision" , n = > { Revision = n . GetStringValue ( ) ; } } ,
2025-11-15 22:41:01 +00:00
{ "sectors" , n = > { Sectors = n . GetIntValue ( ) ; } } ,
{ "sequence" , n = > { Sequence = n . GetIntValue ( ) ; } } ,
2025-11-14 13:33:27 +00:00
{ "serial_number" , n = > { SerialNumber = n . GetStringValue ( ) ; } } ,
2025-11-15 22:41:01 +00:00
{ "sessions" , n = > { Sessions = n . GetIntValue ( ) ; } } ,
{ "sides" , n = > { Sides = n . GetIntValue ( ) ; } } ,
{ "size" , n = > { Size = n . GetIntValue ( ) ; } } ,
2025-11-14 13:33:27 +00:00
{ "storage_interface" , n = > { StorageInterface = n . GetObjectValue < global :: Marechai . App . Models . MediaDto . MediaDto_storage_interface > ( global :: Marechai . App . Models . MediaDto . MediaDto_storage_interface . CreateFromDiscriminatorValue ) ; } } ,
{ "table_of_contents" , n = > { TableOfContents = n . GetCollectionOfObjectValues < global :: Marechai . App . Models . OpticalDiscTrack > ( global :: Marechai . App . Models . OpticalDiscTrack . CreateFromDiscriminatorValue ) ? . AsList ( ) ; } } ,
{ "title" , n = > { Title = n . GetStringValue ( ) ; } } ,
2025-11-15 22:41:01 +00:00
{ "tracks" , n = > { Tracks = n . GetIntValue ( ) ; } } ,
2025-11-14 13:33:27 +00:00
{ "type" , n = > { Type = n . GetIntValue ( ) ; } } ,
2025-11-15 22:41:01 +00:00
{ "write_offset" , n = > { WriteOffset = n . GetIntValue ( ) ; } } ,
2025-11-14 13:33:27 +00:00
} ;
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public virtual void Serialize ( ISerializationWriter writer )
{
if ( ReferenceEquals ( writer , null ) ) throw new ArgumentNullException ( nameof ( writer ) ) ;
writer . WriteStringValue ( "barcode" , Barcode ) ;
writer . WriteCollectionOfObjectValues < global :: Marechai . App . Models . VariableBlockSize > ( "block_sizes" , BlockSizes ) ;
writer . WriteStringValue ( "catalogue_number" , CatalogueNumber ) ;
writer . WriteStringValue ( "copy_protection" , CopyProtection ) ;
writer . WriteStringValue ( "firmware" , Firmware ) ;
2025-11-15 22:41:01 +00:00
writer . WriteIntValue ( "id" , Id ) ;
writer . WriteIntValue ( "last_sequence" , LastSequence ) ;
writer . WriteIntValue ( "layers" , Layers ) ;
writer . WriteIntValue ( "logical_block_size" , LogicalBlockSize ) ;
2025-11-14 13:33:27 +00:00
writer . WriteStringValue ( "manufacturer" , Manufacturer ) ;
writer . WriteStringValue ( "model" , Model ) ;
writer . WriteStringValue ( "part_number" , PartNumber ) ;
2025-11-15 22:41:01 +00:00
writer . WriteIntValue ( "physical_block_size" , PhysicalBlockSize ) ;
2025-11-14 13:33:27 +00:00
writer . WriteStringValue ( "revision" , Revision ) ;
2025-11-15 22:41:01 +00:00
writer . WriteIntValue ( "sectors" , Sectors ) ;
writer . WriteIntValue ( "sequence" , Sequence ) ;
2025-11-14 13:33:27 +00:00
writer . WriteStringValue ( "serial_number" , SerialNumber ) ;
2025-11-15 22:41:01 +00:00
writer . WriteIntValue ( "sessions" , Sessions ) ;
writer . WriteIntValue ( "sides" , Sides ) ;
writer . WriteIntValue ( "size" , Size ) ;
2025-11-14 13:33:27 +00:00
writer . WriteObjectValue < global :: Marechai . App . Models . MediaDto . MediaDto_storage_interface > ( "storage_interface" , StorageInterface ) ;
writer . WriteCollectionOfObjectValues < global :: Marechai . App . Models . OpticalDiscTrack > ( "table_of_contents" , TableOfContents ) ;
writer . WriteStringValue ( "title" , Title ) ;
2025-11-15 22:41:01 +00:00
writer . WriteIntValue ( "tracks" , Tracks ) ;
2025-11-14 13:33:27 +00:00
writer . WriteIntValue ( "type" , Type ) ;
2025-11-15 22:41:01 +00:00
writer . WriteIntValue ( "write_offset" , WriteOffset ) ;
2025-11-14 13:33:27 +00:00
writer . WriteAdditionalData ( AdditionalData ) ;
}
/// <summary>
/// Composed type wrapper for classes <see cref="global::Marechai.App.Models.MediaDto_storage_interfaceMember1"/>, <see cref="global::Marechai.App.Models.StorageInterface"/>
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class MediaDto_storage_interface : IComposedTypeWrapper , IParsable
{
/// <summary>Composed type representation for type <see cref="global::Marechai.App.Models.MediaDto_storage_interfaceMember1"/></summary>
#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
/// <summary>Composed type representation for type <see cref="global::Marechai.App.Models.StorageInterface"/></summary>
#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
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::Marechai.App.Models.MediaDto.MediaDto_storage_interface"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
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 ;
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
/// <returns>A IDictionary<string, Action<IParseNode>></returns>
public virtual IDictionary < string , Action < IParseNode > > GetFieldDeserializers ( )
{
if ( MediaDtoStorageInterfaceMember1 ! = null )
{
return MediaDtoStorageInterfaceMember1 . GetFieldDeserializers ( ) ;
}
else if ( StorageInterface ! = null )
{
return StorageInterface . GetFieldDeserializers ( ) ;
}
return new Dictionary < string , Action < IParseNode > > ( ) ;
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public virtual void Serialize ( ISerializationWriter writer )
{
if ( ReferenceEquals ( writer , null ) ) throw new ArgumentNullException ( nameof ( writer ) ) ;
if ( MediaDtoStorageInterfaceMember1 ! = null )
{
writer . WriteObjectValue < global :: Marechai . App . Models . MediaDto_storage_interfaceMember1 > ( null , MediaDtoStorageInterfaceMember1 ) ;
}
else if ( StorageInterface ! = null )
{
writer . WriteObjectValue < global :: Marechai . App . Models . StorageInterface > ( null , StorageInterface ) ;
}
}
}
}
}
#pragma warning restore CS0618