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

namespace MyTelegram.Schema;

///<summary>
/// Saved credit card
/// See <a href="https://corefork.telegram.org/constructor/paymentSavedCredentialsCard" />
///</summary>
[TlObject(0xcdc27a1f)]
public sealed class TPaymentSavedCredentialsCard : IPaymentSavedCredentials
{
    public uint ConstructorId => 0xcdc27a1f;
    ///<summary>
    /// Card ID
    ///</summary>
    public string Id { get; set; }

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

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Id = buffer.ReadString();
        Title = buffer.ReadString();
    }
}