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

namespace MyTelegram.Schema;

///<summary>
/// Can be used to send a venue geolocation.
/// See <a href="https://corefork.telegram.org/constructor/inputMediaVenue" />
///</summary>
[TlObject(0xc13d1c11)]
public sealed class TInputMediaVenue : IInputMedia
{
    public uint ConstructorId => 0xc13d1c11;
    ///<summary>
    /// Geolocation
    /// See <a href="https://corefork.telegram.org/type/InputGeoPoint" />
    ///</summary>
    public MyTelegram.Schema.IInputGeoPoint GeoPoint { get; set; }

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

    ///<summary>
    /// Physical address of the venue
    ///</summary>
    public string Address { get; set; }

    ///<summary>
    /// Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported
    ///</summary>
    public string Provider { get; set; }

    ///<summary>
    /// Venue ID in the provider's database
    ///</summary>
    public string VenueId { get; set; }

    ///<summary>
    /// Venue type in the provider's database
    ///</summary>
    public string VenueType { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(GeoPoint);
        writer.Write(Title);
        writer.Write(Address);
        writer.Write(Provider);
        writer.Write(VenueId);
        writer.Write(VenueType);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        GeoPoint = buffer.Read<MyTelegram.Schema.IInputGeoPoint>();
        Title = buffer.ReadString();
        Address = buffer.ReadString();
        Provider = buffer.ReadString();
        VenueId = buffer.ReadString();
        VenueType = buffer.ReadString();
    }
}