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

namespace MyTelegram.Schema;

///<summary>
/// Send <a href="https://corefork.telegram.org/api/business#away-messages">Telegram Business away messages</a> to users writing to us in private in the specified time span.
/// See <a href="https://corefork.telegram.org/constructor/businessAwayMessageScheduleCustom" />
///</summary>
[TlObject(0xcc4d9ecc)]
public sealed class TBusinessAwayMessageScheduleCustom : IBusinessAwayMessageSchedule
{
    public uint ConstructorId => 0xcc4d9ecc;
    ///<summary>
    /// Start date (UNIX timestamp).
    ///</summary>
    public int StartDate { get; set; }

    ///<summary>
    /// End date (UNIX timestamp).
    ///</summary>
    public int EndDate { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        StartDate = buffer.ReadInt32();
        EndDate = buffer.ReadInt32();
    }
}