// <auto-generated/>
// ReSharper disable All

namespace MyTelegram.Schema;

///<summary>
/// Shipping option
/// See <a href="https://corefork.telegram.org/constructor/shippingOption" />
///</summary>
[TlObject(0xb6213cdf)]
public sealed class TShippingOption : IShippingOption
{
    public uint ConstructorId => 0xb6213cdf;
    ///<summary>
    /// Option ID
    ///</summary>
    public string Id { get; set; }

    ///<summary>
    /// Title
    ///</summary>
    public string Title { get; set; }

    ///<summary>
    /// List of price portions
    ///</summary>
    public TVector<MyTelegram.Schema.ILabeledPrice> Prices { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Id);
        writer.Write(Title);
        writer.Write(Prices);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Id = buffer.ReadString();
        Title = buffer.ReadString();
        Prices = buffer.Read<TVector<MyTelegram.Schema.ILabeledPrice>>();
    }
}