// Code generated by gotdgen, DO NOT EDIT.

package tg

import (
	
	
	
	
	

	

	
	
	
	
)

// No-op definition for keeping imports.
var (
	_ = bin.Buffer{}
	_ = context.Background()
	_ = fmt.Stringer(nil)
	_ = strings.Builder{}
	_ = errors.Is
	_ = multierr.AppendInto
	_ = sort.Ints
	_ = tdp.Format
	_ = tgerr.Error{}
	_ = tdjson.Encoder{}
)

// RecentMeURLUnknown represents TL type `recentMeUrlUnknown#46e1d13d`.
// Unknown t.me url
//
// See https://core.telegram.org/constructor/recentMeUrlUnknown for reference.
type RecentMeURLUnknown struct {
	// URL
	URL string
}

// RecentMeURLUnknownTypeID is TL type id of RecentMeURLUnknown.
const RecentMeURLUnknownTypeID = 0x46e1d13d

// construct implements constructor of RecentMeURLClass.
func ( RecentMeURLUnknown) () RecentMeURLClass { return & }

// Ensuring interfaces in compile-time for RecentMeURLUnknown.
var (
	_ bin.Encoder     = &RecentMeURLUnknown{}
	_ bin.Decoder     = &RecentMeURLUnknown{}
	_ bin.BareEncoder = &RecentMeURLUnknown{}
	_ bin.BareDecoder = &RecentMeURLUnknown{}

	_ RecentMeURLClass = &RecentMeURLUnknown{}
)

func ( *RecentMeURLUnknown) () bool {
	if  == nil {
		return true
	}
	if !(.URL == "") {
		return false
	}

	return true
}

// String implements fmt.Stringer.
func ( *RecentMeURLUnknown) () string {
	if  == nil {
		return "RecentMeURLUnknown(nil)"
	}
	type  RecentMeURLUnknown
	return fmt.Sprintf("RecentMeURLUnknown%+v", (*))
}

// FillFrom fills RecentMeURLUnknown from given interface.
func ( *RecentMeURLUnknown) ( interface {
	() ( string)
}) {
	.URL = .()
}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*RecentMeURLUnknown) () uint32 {
	return RecentMeURLUnknownTypeID
}

// TypeName returns name of type in TL schema.
func (*RecentMeURLUnknown) () string {
	return "recentMeUrlUnknown"
}

// TypeInfo returns info about TL type.
func ( *RecentMeURLUnknown) () tdp.Type {
	 := tdp.Type{
		Name: "recentMeUrlUnknown",
		ID:   RecentMeURLUnknownTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "URL",
			SchemaName: "url",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *RecentMeURLUnknown) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode recentMeUrlUnknown#46e1d13d as nil")
	}
	.PutID(RecentMeURLUnknownTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *RecentMeURLUnknown) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode recentMeUrlUnknown#46e1d13d as nil")
	}
	.PutString(.URL)
	return nil
}

// Decode implements bin.Decoder.
func ( *RecentMeURLUnknown) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode recentMeUrlUnknown#46e1d13d to nil")
	}
	if  := .ConsumeID(RecentMeURLUnknownTypeID);  != nil {
		return fmt.Errorf("unable to decode recentMeUrlUnknown#46e1d13d: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *RecentMeURLUnknown) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode recentMeUrlUnknown#46e1d13d to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode recentMeUrlUnknown#46e1d13d: field url: %w", )
		}
		.URL = 
	}
	return nil
}

// GetURL returns value of URL field.
func ( *RecentMeURLUnknown) () ( string) {
	if  == nil {
		return
	}
	return .URL
}

// RecentMeURLUser represents TL type `recentMeUrlUser#b92c09e2`.
// Recent t.me link to a user
//
// See https://core.telegram.org/constructor/recentMeUrlUser for reference.
type RecentMeURLUser struct {
	// URL
	URL string
	// User ID
	UserID int64
}

// RecentMeURLUserTypeID is TL type id of RecentMeURLUser.
const RecentMeURLUserTypeID = 0xb92c09e2

// construct implements constructor of RecentMeURLClass.
func ( RecentMeURLUser) () RecentMeURLClass { return & }

// Ensuring interfaces in compile-time for RecentMeURLUser.
var (
	_ bin.Encoder     = &RecentMeURLUser{}
	_ bin.Decoder     = &RecentMeURLUser{}
	_ bin.BareEncoder = &RecentMeURLUser{}
	_ bin.BareDecoder = &RecentMeURLUser{}

	_ RecentMeURLClass = &RecentMeURLUser{}
)

func ( *RecentMeURLUser) () bool {
	if  == nil {
		return true
	}
	if !(.URL == "") {
		return false
	}
	if !(.UserID == 0) {
		return false
	}

	return true
}

// String implements fmt.Stringer.
func ( *RecentMeURLUser) () string {
	if  == nil {
		return "RecentMeURLUser(nil)"
	}
	type  RecentMeURLUser
	return fmt.Sprintf("RecentMeURLUser%+v", (*))
}

// FillFrom fills RecentMeURLUser from given interface.
func ( *RecentMeURLUser) ( interface {
	() ( string)
	() ( int64)
}) {
	.URL = .()
	.UserID = .()
}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*RecentMeURLUser) () uint32 {
	return RecentMeURLUserTypeID
}

// TypeName returns name of type in TL schema.
func (*RecentMeURLUser) () string {
	return "recentMeUrlUser"
}

// TypeInfo returns info about TL type.
func ( *RecentMeURLUser) () tdp.Type {
	 := tdp.Type{
		Name: "recentMeUrlUser",
		ID:   RecentMeURLUserTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "URL",
			SchemaName: "url",
		},
		{
			Name:       "UserID",
			SchemaName: "user_id",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *RecentMeURLUser) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode recentMeUrlUser#b92c09e2 as nil")
	}
	.PutID(RecentMeURLUserTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *RecentMeURLUser) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode recentMeUrlUser#b92c09e2 as nil")
	}
	.PutString(.URL)
	.PutLong(.UserID)
	return nil
}

// Decode implements bin.Decoder.
func ( *RecentMeURLUser) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode recentMeUrlUser#b92c09e2 to nil")
	}
	if  := .ConsumeID(RecentMeURLUserTypeID);  != nil {
		return fmt.Errorf("unable to decode recentMeUrlUser#b92c09e2: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *RecentMeURLUser) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode recentMeUrlUser#b92c09e2 to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode recentMeUrlUser#b92c09e2: field url: %w", )
		}
		.URL = 
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode recentMeUrlUser#b92c09e2: field user_id: %w", )
		}
		.UserID = 
	}
	return nil
}

// GetURL returns value of URL field.
func ( *RecentMeURLUser) () ( string) {
	if  == nil {
		return
	}
	return .URL
}

// GetUserID returns value of UserID field.
func ( *RecentMeURLUser) () ( int64) {
	if  == nil {
		return
	}
	return .UserID
}

// RecentMeURLChat represents TL type `recentMeUrlChat#b2da71d2`.
// Recent t.me link to a chat
//
// See https://core.telegram.org/constructor/recentMeUrlChat for reference.
type RecentMeURLChat struct {
	// t.me URL
	URL string
	// Chat ID
	ChatID int64
}

// RecentMeURLChatTypeID is TL type id of RecentMeURLChat.
const RecentMeURLChatTypeID = 0xb2da71d2

// construct implements constructor of RecentMeURLClass.
func ( RecentMeURLChat) () RecentMeURLClass { return & }

// Ensuring interfaces in compile-time for RecentMeURLChat.
var (
	_ bin.Encoder     = &RecentMeURLChat{}
	_ bin.Decoder     = &RecentMeURLChat{}
	_ bin.BareEncoder = &RecentMeURLChat{}
	_ bin.BareDecoder = &RecentMeURLChat{}

	_ RecentMeURLClass = &RecentMeURLChat{}
)

func ( *RecentMeURLChat) () bool {
	if  == nil {
		return true
	}
	if !(.URL == "") {
		return false
	}
	if !(.ChatID == 0) {
		return false
	}

	return true
}

// String implements fmt.Stringer.
func ( *RecentMeURLChat) () string {
	if  == nil {
		return "RecentMeURLChat(nil)"
	}
	type  RecentMeURLChat
	return fmt.Sprintf("RecentMeURLChat%+v", (*))
}

// FillFrom fills RecentMeURLChat from given interface.
func ( *RecentMeURLChat) ( interface {
	() ( string)
	() ( int64)
}) {
	.URL = .()
	.ChatID = .()
}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*RecentMeURLChat) () uint32 {
	return RecentMeURLChatTypeID
}

// TypeName returns name of type in TL schema.
func (*RecentMeURLChat) () string {
	return "recentMeUrlChat"
}

// TypeInfo returns info about TL type.
func ( *RecentMeURLChat) () tdp.Type {
	 := tdp.Type{
		Name: "recentMeUrlChat",
		ID:   RecentMeURLChatTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "URL",
			SchemaName: "url",
		},
		{
			Name:       "ChatID",
			SchemaName: "chat_id",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *RecentMeURLChat) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode recentMeUrlChat#b2da71d2 as nil")
	}
	.PutID(RecentMeURLChatTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *RecentMeURLChat) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode recentMeUrlChat#b2da71d2 as nil")
	}
	.PutString(.URL)
	.PutLong(.ChatID)
	return nil
}

// Decode implements bin.Decoder.
func ( *RecentMeURLChat) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode recentMeUrlChat#b2da71d2 to nil")
	}
	if  := .ConsumeID(RecentMeURLChatTypeID);  != nil {
		return fmt.Errorf("unable to decode recentMeUrlChat#b2da71d2: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *RecentMeURLChat) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode recentMeUrlChat#b2da71d2 to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode recentMeUrlChat#b2da71d2: field url: %w", )
		}
		.URL = 
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode recentMeUrlChat#b2da71d2: field chat_id: %w", )
		}
		.ChatID = 
	}
	return nil
}

// GetURL returns value of URL field.
func ( *RecentMeURLChat) () ( string) {
	if  == nil {
		return
	}
	return .URL
}

// GetChatID returns value of ChatID field.
func ( *RecentMeURLChat) () ( int64) {
	if  == nil {
		return
	}
	return .ChatID
}

// RecentMeURLChatInvite represents TL type `recentMeUrlChatInvite#eb49081d`.
// Recent t.me invite link to a chat
//
// See https://core.telegram.org/constructor/recentMeUrlChatInvite for reference.
type RecentMeURLChatInvite struct {
	// t.me URL
	URL string
	// Chat invitation
	ChatInvite ChatInviteClass
}

// RecentMeURLChatInviteTypeID is TL type id of RecentMeURLChatInvite.
const RecentMeURLChatInviteTypeID = 0xeb49081d

// construct implements constructor of RecentMeURLClass.
func ( RecentMeURLChatInvite) () RecentMeURLClass { return & }

// Ensuring interfaces in compile-time for RecentMeURLChatInvite.
var (
	_ bin.Encoder     = &RecentMeURLChatInvite{}
	_ bin.Decoder     = &RecentMeURLChatInvite{}
	_ bin.BareEncoder = &RecentMeURLChatInvite{}
	_ bin.BareDecoder = &RecentMeURLChatInvite{}

	_ RecentMeURLClass = &RecentMeURLChatInvite{}
)

func ( *RecentMeURLChatInvite) () bool {
	if  == nil {
		return true
	}
	if !(.URL == "") {
		return false
	}
	if !(.ChatInvite == nil) {
		return false
	}

	return true
}

// String implements fmt.Stringer.
func ( *RecentMeURLChatInvite) () string {
	if  == nil {
		return "RecentMeURLChatInvite(nil)"
	}
	type  RecentMeURLChatInvite
	return fmt.Sprintf("RecentMeURLChatInvite%+v", (*))
}

// FillFrom fills RecentMeURLChatInvite from given interface.
func ( *RecentMeURLChatInvite) ( interface {
	() ( string)
	() ( ChatInviteClass)
}) {
	.URL = .()
	.ChatInvite = .()
}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*RecentMeURLChatInvite) () uint32 {
	return RecentMeURLChatInviteTypeID
}

// TypeName returns name of type in TL schema.
func (*RecentMeURLChatInvite) () string {
	return "recentMeUrlChatInvite"
}

// TypeInfo returns info about TL type.
func ( *RecentMeURLChatInvite) () tdp.Type {
	 := tdp.Type{
		Name: "recentMeUrlChatInvite",
		ID:   RecentMeURLChatInviteTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "URL",
			SchemaName: "url",
		},
		{
			Name:       "ChatInvite",
			SchemaName: "chat_invite",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *RecentMeURLChatInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode recentMeUrlChatInvite#eb49081d as nil")
	}
	.PutID(RecentMeURLChatInviteTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *RecentMeURLChatInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode recentMeUrlChatInvite#eb49081d as nil")
	}
	.PutString(.URL)
	if .ChatInvite == nil {
		return fmt.Errorf("unable to encode recentMeUrlChatInvite#eb49081d: field chat_invite is nil")
	}
	if  := .ChatInvite.Encode();  != nil {
		return fmt.Errorf("unable to encode recentMeUrlChatInvite#eb49081d: field chat_invite: %w", )
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *RecentMeURLChatInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode recentMeUrlChatInvite#eb49081d to nil")
	}
	if  := .ConsumeID(RecentMeURLChatInviteTypeID);  != nil {
		return fmt.Errorf("unable to decode recentMeUrlChatInvite#eb49081d: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *RecentMeURLChatInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode recentMeUrlChatInvite#eb49081d to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode recentMeUrlChatInvite#eb49081d: field url: %w", )
		}
		.URL = 
	}
	{
		,  := DecodeChatInvite()
		if  != nil {
			return fmt.Errorf("unable to decode recentMeUrlChatInvite#eb49081d: field chat_invite: %w", )
		}
		.ChatInvite = 
	}
	return nil
}

// GetURL returns value of URL field.
func ( *RecentMeURLChatInvite) () ( string) {
	if  == nil {
		return
	}
	return .URL
}

// GetChatInvite returns value of ChatInvite field.
func ( *RecentMeURLChatInvite) () ( ChatInviteClass) {
	if  == nil {
		return
	}
	return .ChatInvite
}

// RecentMeURLStickerSet represents TL type `recentMeUrlStickerSet#bc0a57dc`.
// Recent t.me stickerset installation URL
//
// See https://core.telegram.org/constructor/recentMeUrlStickerSet for reference.
type RecentMeURLStickerSet struct {
	// t.me URL
	URL string
	// Stickerset
	Set StickerSetCoveredClass
}

// RecentMeURLStickerSetTypeID is TL type id of RecentMeURLStickerSet.
const RecentMeURLStickerSetTypeID = 0xbc0a57dc

// construct implements constructor of RecentMeURLClass.
func ( RecentMeURLStickerSet) () RecentMeURLClass { return & }

// Ensuring interfaces in compile-time for RecentMeURLStickerSet.
var (
	_ bin.Encoder     = &RecentMeURLStickerSet{}
	_ bin.Decoder     = &RecentMeURLStickerSet{}
	_ bin.BareEncoder = &RecentMeURLStickerSet{}
	_ bin.BareDecoder = &RecentMeURLStickerSet{}

	_ RecentMeURLClass = &RecentMeURLStickerSet{}
)

func ( *RecentMeURLStickerSet) () bool {
	if  == nil {
		return true
	}
	if !(.URL == "") {
		return false
	}
	if !(.Set == nil) {
		return false
	}

	return true
}

// String implements fmt.Stringer.
func ( *RecentMeURLStickerSet) () string {
	if  == nil {
		return "RecentMeURLStickerSet(nil)"
	}
	type  RecentMeURLStickerSet
	return fmt.Sprintf("RecentMeURLStickerSet%+v", (*))
}

// FillFrom fills RecentMeURLStickerSet from given interface.
func ( *RecentMeURLStickerSet) ( interface {
	() ( string)
	() ( StickerSetCoveredClass)
}) {
	.URL = .()
	.Set = .()
}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*RecentMeURLStickerSet) () uint32 {
	return RecentMeURLStickerSetTypeID
}

// TypeName returns name of type in TL schema.
func (*RecentMeURLStickerSet) () string {
	return "recentMeUrlStickerSet"
}

// TypeInfo returns info about TL type.
func ( *RecentMeURLStickerSet) () tdp.Type {
	 := tdp.Type{
		Name: "recentMeUrlStickerSet",
		ID:   RecentMeURLStickerSetTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "URL",
			SchemaName: "url",
		},
		{
			Name:       "Set",
			SchemaName: "set",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *RecentMeURLStickerSet) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode recentMeUrlStickerSet#bc0a57dc as nil")
	}
	.PutID(RecentMeURLStickerSetTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *RecentMeURLStickerSet) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode recentMeUrlStickerSet#bc0a57dc as nil")
	}
	.PutString(.URL)
	if .Set == nil {
		return fmt.Errorf("unable to encode recentMeUrlStickerSet#bc0a57dc: field set is nil")
	}
	if  := .Set.Encode();  != nil {
		return fmt.Errorf("unable to encode recentMeUrlStickerSet#bc0a57dc: field set: %w", )
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *RecentMeURLStickerSet) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode recentMeUrlStickerSet#bc0a57dc to nil")
	}
	if  := .ConsumeID(RecentMeURLStickerSetTypeID);  != nil {
		return fmt.Errorf("unable to decode recentMeUrlStickerSet#bc0a57dc: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *RecentMeURLStickerSet) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode recentMeUrlStickerSet#bc0a57dc to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode recentMeUrlStickerSet#bc0a57dc: field url: %w", )
		}
		.URL = 
	}
	{
		,  := DecodeStickerSetCovered()
		if  != nil {
			return fmt.Errorf("unable to decode recentMeUrlStickerSet#bc0a57dc: field set: %w", )
		}
		.Set = 
	}
	return nil
}

// GetURL returns value of URL field.
func ( *RecentMeURLStickerSet) () ( string) {
	if  == nil {
		return
	}
	return .URL
}

// GetSet returns value of Set field.
func ( *RecentMeURLStickerSet) () ( StickerSetCoveredClass) {
	if  == nil {
		return
	}
	return .Set
}

// RecentMeURLClassName is schema name of RecentMeURLClass.
const RecentMeURLClassName = "RecentMeUrl"

// RecentMeURLClass represents RecentMeUrl generic type.
//
// See https://core.telegram.org/type/RecentMeUrl for reference.
//
// Example:
//
//	g, err := tg.DecodeRecentMeURL(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.RecentMeURLUnknown: // recentMeUrlUnknown#46e1d13d
//	case *tg.RecentMeURLUser: // recentMeUrlUser#b92c09e2
//	case *tg.RecentMeURLChat: // recentMeUrlChat#b2da71d2
//	case *tg.RecentMeURLChatInvite: // recentMeUrlChatInvite#eb49081d
//	case *tg.RecentMeURLStickerSet: // recentMeUrlStickerSet#bc0a57dc
//	default: panic(v)
//	}
type RecentMeURLClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() RecentMeURLClass

	// TypeID returns type id in TL schema.
	//
	// See https://core.telegram.org/mtproto/TL-tl#remarks.
	TypeID() uint32
	// TypeName returns name of type in TL schema.
	TypeName() string
	// String implements fmt.Stringer.
	String() string
	// Zero returns true if current object has a zero value.
	Zero() bool

	// URL
	GetURL() (value string)
}

// DecodeRecentMeURL implements binary de-serialization for RecentMeURLClass.
func ( *bin.Buffer) (RecentMeURLClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case RecentMeURLUnknownTypeID:
		// Decoding recentMeUrlUnknown#46e1d13d.
		 := RecentMeURLUnknown{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode RecentMeURLClass: %w", )
		}
		return &, nil
	case RecentMeURLUserTypeID:
		// Decoding recentMeUrlUser#b92c09e2.
		 := RecentMeURLUser{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode RecentMeURLClass: %w", )
		}
		return &, nil
	case RecentMeURLChatTypeID:
		// Decoding recentMeUrlChat#b2da71d2.
		 := RecentMeURLChat{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode RecentMeURLClass: %w", )
		}
		return &, nil
	case RecentMeURLChatInviteTypeID:
		// Decoding recentMeUrlChatInvite#eb49081d.
		 := RecentMeURLChatInvite{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode RecentMeURLClass: %w", )
		}
		return &, nil
	case RecentMeURLStickerSetTypeID:
		// Decoding recentMeUrlStickerSet#bc0a57dc.
		 := RecentMeURLStickerSet{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode RecentMeURLClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode RecentMeURLClass: %w", bin.NewUnexpectedID())
	}
}

// RecentMeURL boxes the RecentMeURLClass providing a helper.
type RecentMeURLBox struct {
	RecentMeUrl RecentMeURLClass
}

// Decode implements bin.Decoder for RecentMeURLBox.
func ( *RecentMeURLBox) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("unable to decode RecentMeURLBox to nil")
	}
	,  := DecodeRecentMeURL()
	if  != nil {
		return fmt.Errorf("unable to decode boxed value: %w", )
	}
	.RecentMeUrl = 
	return nil
}

// Encode implements bin.Encode for RecentMeURLBox.
func ( *RecentMeURLBox) ( *bin.Buffer) error {
	if  == nil || .RecentMeUrl == nil {
		return fmt.Errorf("unable to encode RecentMeURLClass as nil")
	}
	return .RecentMeUrl.Encode()
}