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

namespace MyTelegram.Schema;

///<summary>
/// Configuration for <a href="https://corefork.telegram.org/cdn">CDN</a> file downloads.
/// See <a href="https://corefork.telegram.org/constructor/cdnConfig" />
///</summary>
[TlObject(0x5725e40a)]
public sealed class TCdnConfig : ICdnConfig
{
    public uint ConstructorId => 0x5725e40a;
    ///<summary>
    /// Vector of public keys to use <strong>only</strong> during handshakes to <a href="https://corefork.telegram.org/cdn">CDN</a> DCs.
    ///</summary>
    public TVector<MyTelegram.Schema.ICdnPublicKey> PublicKeys { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PublicKeys = buffer.Read<TVector<MyTelegram.Schema.ICdnPublicKey>>();
    }
}