Files
marechai/Marechai.App/Services/Client/Models/MediaDto.cs

385 lines
18 KiB
C#
Raw Normal View History

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>
#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
/// <summary>The last_sequence property</summary>
#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
/// <summary>The layers property</summary>
#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
/// <summary>The logical_block_size property</summary>
#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
/// <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>
#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
/// <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>
#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
/// <summary>The sequence property</summary>
#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
/// <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>
#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
/// <summary>The sides property</summary>
#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
/// <summary>The size property</summary>
#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
/// <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>
#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
/// <summary>The type property</summary>
public int? Type { get; set; }
/// <summary>The write_offset property</summary>
#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
/// <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&lt;string, Action&lt;IParseNode&gt;&gt;</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(); } },
{ "id", n => { Id = n.GetObjectValue<UntypedNode>(UntypedNode.CreateFromDiscriminatorValue); } },
{ "last_sequence", n => { LastSequence = n.GetObjectValue<UntypedNode>(UntypedNode.CreateFromDiscriminatorValue); } },
{ "layers", n => { Layers = n.GetObjectValue<UntypedNode>(UntypedNode.CreateFromDiscriminatorValue); } },
{ "logical_block_size", n => { LogicalBlockSize = n.GetObjectValue<UntypedNode>(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>(UntypedNode.CreateFromDiscriminatorValue); } },
{ "revision", n => { Revision = n.GetStringValue(); } },
{ "sectors", n => { Sectors = n.GetObjectValue<UntypedNode>(UntypedNode.CreateFromDiscriminatorValue); } },
{ "sequence", n => { Sequence = n.GetObjectValue<UntypedNode>(UntypedNode.CreateFromDiscriminatorValue); } },
{ "serial_number", n => { SerialNumber = n.GetStringValue(); } },
{ "sessions", n => { Sessions = n.GetObjectValue<UntypedNode>(UntypedNode.CreateFromDiscriminatorValue); } },
{ "sides", n => { Sides = n.GetObjectValue<UntypedNode>(UntypedNode.CreateFromDiscriminatorValue); } },
{ "size", n => { Size = n.GetObjectValue<UntypedNode>(UntypedNode.CreateFromDiscriminatorValue); } },
{ "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(); } },
{ "tracks", n => { Tracks = n.GetObjectValue<UntypedNode>(UntypedNode.CreateFromDiscriminatorValue); } },
{ "type", n => { Type = n.GetIntValue(); } },
{ "write_offset", n => { WriteOffset = n.GetObjectValue<UntypedNode>(UntypedNode.CreateFromDiscriminatorValue); } },
};
}
/// <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);
writer.WriteObjectValue<UntypedNode>("id", Id);
writer.WriteObjectValue<UntypedNode>("last_sequence", LastSequence);
writer.WriteObjectValue<UntypedNode>("layers", Layers);
writer.WriteObjectValue<UntypedNode>("logical_block_size", LogicalBlockSize);
writer.WriteStringValue("manufacturer", Manufacturer);
writer.WriteStringValue("model", Model);
writer.WriteStringValue("part_number", PartNumber);
writer.WriteObjectValue<UntypedNode>("physical_block_size", PhysicalBlockSize);
writer.WriteStringValue("revision", Revision);
writer.WriteObjectValue<UntypedNode>("sectors", Sectors);
writer.WriteObjectValue<UntypedNode>("sequence", Sequence);
writer.WriteStringValue("serial_number", SerialNumber);
writer.WriteObjectValue<UntypedNode>("sessions", Sessions);
writer.WriteObjectValue<UntypedNode>("sides", Sides);
writer.WriteObjectValue<UntypedNode>("size", Size);
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);
writer.WriteObjectValue<UntypedNode>("tracks", Tracks);
writer.WriteIntValue("type", Type);
writer.WriteObjectValue<UntypedNode>("write_offset", WriteOffset);
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&lt;string, Action&lt;IParseNode&gt;&gt;</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