mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
232 lines
11 KiB
C#
232 lines
11 KiB
C#
// <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>
|
|
public int? Id { get; set; }
|
|
/// <summary>The last_sequence property</summary>
|
|
public int? LastSequence { get; set; }
|
|
/// <summary>The layers property</summary>
|
|
public int? Layers { get; set; }
|
|
/// <summary>The logical_block_size property</summary>
|
|
public int? LogicalBlockSize { get; set; }
|
|
/// <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>
|
|
public int? PhysicalBlockSize { get; set; }
|
|
/// <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>
|
|
public int? Sectors { get; set; }
|
|
/// <summary>The sequence property</summary>
|
|
public int? Sequence { get; set; }
|
|
/// <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>
|
|
public int? Sessions { get; set; }
|
|
/// <summary>The sides property</summary>
|
|
public int? Sides { get; set; }
|
|
/// <summary>The size property</summary>
|
|
public int? Size { get; set; }
|
|
/// <summary>The storage_interface property</summary>
|
|
public int? StorageInterface { get; set; }
|
|
/// <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>
|
|
public int? Tracks { get; set; }
|
|
/// <summary>The type property</summary>
|
|
public int? Type { get; set; }
|
|
/// <summary>The write_offset property</summary>
|
|
public int? WriteOffset { get; set; }
|
|
/// <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(); } },
|
|
{ "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>(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(); } },
|
|
};
|
|
}
|
|
/// <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.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<global::Marechai.App.Models.OpticalDiscTrack>("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
|