// 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{}
)

// TopPeerCategoryBotsPM represents TL type `topPeerCategoryBotsPM#ab661b5b`.
// Most used bots
//
// See https://core.telegram.org/constructor/topPeerCategoryBotsPM for reference.
type TopPeerCategoryBotsPM struct {
}

// TopPeerCategoryBotsPMTypeID is TL type id of TopPeerCategoryBotsPM.
const TopPeerCategoryBotsPMTypeID = 0xab661b5b

// construct implements constructor of TopPeerCategoryClass.
func ( TopPeerCategoryBotsPM) () TopPeerCategoryClass { return & }

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

	_ TopPeerCategoryClass = &TopPeerCategoryBotsPM{}
)

func ( *TopPeerCategoryBotsPM) () bool {
	if  == nil {
		return true
	}

	return true
}

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

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

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

// TypeInfo returns info about TL type.
func ( *TopPeerCategoryBotsPM) () tdp.Type {
	 := tdp.Type{
		Name: "topPeerCategoryBotsPM",
		ID:   TopPeerCategoryBotsPMTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *TopPeerCategoryBotsPM) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryBotsPM#ab661b5b as nil")
	}
	.PutID(TopPeerCategoryBotsPMTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *TopPeerCategoryBotsPM) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryBotsPM#ab661b5b as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *TopPeerCategoryBotsPM) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode topPeerCategoryBotsPM#ab661b5b to nil")
	}
	return nil
}

// TopPeerCategoryBotsInline represents TL type `topPeerCategoryBotsInline#148677e2`.
// Most used inline bots
//
// See https://core.telegram.org/constructor/topPeerCategoryBotsInline for reference.
type TopPeerCategoryBotsInline struct {
}

// TopPeerCategoryBotsInlineTypeID is TL type id of TopPeerCategoryBotsInline.
const TopPeerCategoryBotsInlineTypeID = 0x148677e2

// construct implements constructor of TopPeerCategoryClass.
func ( TopPeerCategoryBotsInline) () TopPeerCategoryClass { return & }

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

	_ TopPeerCategoryClass = &TopPeerCategoryBotsInline{}
)

func ( *TopPeerCategoryBotsInline) () bool {
	if  == nil {
		return true
	}

	return true
}

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

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

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

// TypeInfo returns info about TL type.
func ( *TopPeerCategoryBotsInline) () tdp.Type {
	 := tdp.Type{
		Name: "topPeerCategoryBotsInline",
		ID:   TopPeerCategoryBotsInlineTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *TopPeerCategoryBotsInline) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryBotsInline#148677e2 as nil")
	}
	.PutID(TopPeerCategoryBotsInlineTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *TopPeerCategoryBotsInline) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryBotsInline#148677e2 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *TopPeerCategoryBotsInline) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode topPeerCategoryBotsInline#148677e2 to nil")
	}
	return nil
}

// TopPeerCategoryCorrespondents represents TL type `topPeerCategoryCorrespondents#637b7ed`.
// Users we've chatted most frequently with
//
// See https://core.telegram.org/constructor/topPeerCategoryCorrespondents for reference.
type TopPeerCategoryCorrespondents struct {
}

// TopPeerCategoryCorrespondentsTypeID is TL type id of TopPeerCategoryCorrespondents.
const TopPeerCategoryCorrespondentsTypeID = 0x637b7ed

// construct implements constructor of TopPeerCategoryClass.
func ( TopPeerCategoryCorrespondents) () TopPeerCategoryClass { return & }

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

	_ TopPeerCategoryClass = &TopPeerCategoryCorrespondents{}
)

func ( *TopPeerCategoryCorrespondents) () bool {
	if  == nil {
		return true
	}

	return true
}

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

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

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

// TypeInfo returns info about TL type.
func ( *TopPeerCategoryCorrespondents) () tdp.Type {
	 := tdp.Type{
		Name: "topPeerCategoryCorrespondents",
		ID:   TopPeerCategoryCorrespondentsTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *TopPeerCategoryCorrespondents) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryCorrespondents#637b7ed as nil")
	}
	.PutID(TopPeerCategoryCorrespondentsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *TopPeerCategoryCorrespondents) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryCorrespondents#637b7ed as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *TopPeerCategoryCorrespondents) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode topPeerCategoryCorrespondents#637b7ed to nil")
	}
	return nil
}

// TopPeerCategoryGroups represents TL type `topPeerCategoryGroups#bd17a14a`.
// Often-opened groups and supergroups
//
// See https://core.telegram.org/constructor/topPeerCategoryGroups for reference.
type TopPeerCategoryGroups struct {
}

// TopPeerCategoryGroupsTypeID is TL type id of TopPeerCategoryGroups.
const TopPeerCategoryGroupsTypeID = 0xbd17a14a

// construct implements constructor of TopPeerCategoryClass.
func ( TopPeerCategoryGroups) () TopPeerCategoryClass { return & }

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

	_ TopPeerCategoryClass = &TopPeerCategoryGroups{}
)

func ( *TopPeerCategoryGroups) () bool {
	if  == nil {
		return true
	}

	return true
}

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

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

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

// TypeInfo returns info about TL type.
func ( *TopPeerCategoryGroups) () tdp.Type {
	 := tdp.Type{
		Name: "topPeerCategoryGroups",
		ID:   TopPeerCategoryGroupsTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *TopPeerCategoryGroups) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryGroups#bd17a14a as nil")
	}
	.PutID(TopPeerCategoryGroupsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *TopPeerCategoryGroups) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryGroups#bd17a14a as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *TopPeerCategoryGroups) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode topPeerCategoryGroups#bd17a14a to nil")
	}
	return nil
}

// TopPeerCategoryChannels represents TL type `topPeerCategoryChannels#161d9628`.
// Most frequently visited channels
//
// See https://core.telegram.org/constructor/topPeerCategoryChannels for reference.
type TopPeerCategoryChannels struct {
}

// TopPeerCategoryChannelsTypeID is TL type id of TopPeerCategoryChannels.
const TopPeerCategoryChannelsTypeID = 0x161d9628

// construct implements constructor of TopPeerCategoryClass.
func ( TopPeerCategoryChannels) () TopPeerCategoryClass { return & }

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

	_ TopPeerCategoryClass = &TopPeerCategoryChannels{}
)

func ( *TopPeerCategoryChannels) () bool {
	if  == nil {
		return true
	}

	return true
}

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

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

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

// TypeInfo returns info about TL type.
func ( *TopPeerCategoryChannels) () tdp.Type {
	 := tdp.Type{
		Name: "topPeerCategoryChannels",
		ID:   TopPeerCategoryChannelsTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *TopPeerCategoryChannels) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryChannels#161d9628 as nil")
	}
	.PutID(TopPeerCategoryChannelsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *TopPeerCategoryChannels) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryChannels#161d9628 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *TopPeerCategoryChannels) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode topPeerCategoryChannels#161d9628 to nil")
	}
	return nil
}

// TopPeerCategoryPhoneCalls represents TL type `topPeerCategoryPhoneCalls#1e76a78c`.
// Most frequently called users
//
// See https://core.telegram.org/constructor/topPeerCategoryPhoneCalls for reference.
type TopPeerCategoryPhoneCalls struct {
}

// TopPeerCategoryPhoneCallsTypeID is TL type id of TopPeerCategoryPhoneCalls.
const TopPeerCategoryPhoneCallsTypeID = 0x1e76a78c

// construct implements constructor of TopPeerCategoryClass.
func ( TopPeerCategoryPhoneCalls) () TopPeerCategoryClass { return & }

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

	_ TopPeerCategoryClass = &TopPeerCategoryPhoneCalls{}
)

func ( *TopPeerCategoryPhoneCalls) () bool {
	if  == nil {
		return true
	}

	return true
}

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

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

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

// TypeInfo returns info about TL type.
func ( *TopPeerCategoryPhoneCalls) () tdp.Type {
	 := tdp.Type{
		Name: "topPeerCategoryPhoneCalls",
		ID:   TopPeerCategoryPhoneCallsTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *TopPeerCategoryPhoneCalls) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryPhoneCalls#1e76a78c as nil")
	}
	.PutID(TopPeerCategoryPhoneCallsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *TopPeerCategoryPhoneCalls) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryPhoneCalls#1e76a78c as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *TopPeerCategoryPhoneCalls) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode topPeerCategoryPhoneCalls#1e76a78c to nil")
	}
	return nil
}

// TopPeerCategoryForwardUsers represents TL type `topPeerCategoryForwardUsers#a8406ca9`.
// Users to which the users often forwards messages to
//
// See https://core.telegram.org/constructor/topPeerCategoryForwardUsers for reference.
type TopPeerCategoryForwardUsers struct {
}

// TopPeerCategoryForwardUsersTypeID is TL type id of TopPeerCategoryForwardUsers.
const TopPeerCategoryForwardUsersTypeID = 0xa8406ca9

// construct implements constructor of TopPeerCategoryClass.
func ( TopPeerCategoryForwardUsers) () TopPeerCategoryClass { return & }

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

	_ TopPeerCategoryClass = &TopPeerCategoryForwardUsers{}
)

func ( *TopPeerCategoryForwardUsers) () bool {
	if  == nil {
		return true
	}

	return true
}

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

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

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

// TypeInfo returns info about TL type.
func ( *TopPeerCategoryForwardUsers) () tdp.Type {
	 := tdp.Type{
		Name: "topPeerCategoryForwardUsers",
		ID:   TopPeerCategoryForwardUsersTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *TopPeerCategoryForwardUsers) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryForwardUsers#a8406ca9 as nil")
	}
	.PutID(TopPeerCategoryForwardUsersTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *TopPeerCategoryForwardUsers) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryForwardUsers#a8406ca9 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *TopPeerCategoryForwardUsers) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode topPeerCategoryForwardUsers#a8406ca9 to nil")
	}
	return nil
}

// TopPeerCategoryForwardChats represents TL type `topPeerCategoryForwardChats#fbeec0f0`.
// Chats to which the users often forwards messages to
//
// See https://core.telegram.org/constructor/topPeerCategoryForwardChats for reference.
type TopPeerCategoryForwardChats struct {
}

// TopPeerCategoryForwardChatsTypeID is TL type id of TopPeerCategoryForwardChats.
const TopPeerCategoryForwardChatsTypeID = 0xfbeec0f0

// construct implements constructor of TopPeerCategoryClass.
func ( TopPeerCategoryForwardChats) () TopPeerCategoryClass { return & }

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

	_ TopPeerCategoryClass = &TopPeerCategoryForwardChats{}
)

func ( *TopPeerCategoryForwardChats) () bool {
	if  == nil {
		return true
	}

	return true
}

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

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

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

// TypeInfo returns info about TL type.
func ( *TopPeerCategoryForwardChats) () tdp.Type {
	 := tdp.Type{
		Name: "topPeerCategoryForwardChats",
		ID:   TopPeerCategoryForwardChatsTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *TopPeerCategoryForwardChats) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryForwardChats#fbeec0f0 as nil")
	}
	.PutID(TopPeerCategoryForwardChatsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *TopPeerCategoryForwardChats) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode topPeerCategoryForwardChats#fbeec0f0 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *TopPeerCategoryForwardChats) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode topPeerCategoryForwardChats#fbeec0f0 to nil")
	}
	return nil
}

// TopPeerCategoryClassName is schema name of TopPeerCategoryClass.
const TopPeerCategoryClassName = "TopPeerCategory"

// TopPeerCategoryClass represents TopPeerCategory generic type.
//
// See https://core.telegram.org/type/TopPeerCategory for reference.
//
// Example:
//
//	g, err := tg.DecodeTopPeerCategory(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.TopPeerCategoryBotsPM: // topPeerCategoryBotsPM#ab661b5b
//	case *tg.TopPeerCategoryBotsInline: // topPeerCategoryBotsInline#148677e2
//	case *tg.TopPeerCategoryCorrespondents: // topPeerCategoryCorrespondents#637b7ed
//	case *tg.TopPeerCategoryGroups: // topPeerCategoryGroups#bd17a14a
//	case *tg.TopPeerCategoryChannels: // topPeerCategoryChannels#161d9628
//	case *tg.TopPeerCategoryPhoneCalls: // topPeerCategoryPhoneCalls#1e76a78c
//	case *tg.TopPeerCategoryForwardUsers: // topPeerCategoryForwardUsers#a8406ca9
//	case *tg.TopPeerCategoryForwardChats: // topPeerCategoryForwardChats#fbeec0f0
//	default: panic(v)
//	}
type TopPeerCategoryClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() TopPeerCategoryClass

	// 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
}

// DecodeTopPeerCategory implements binary de-serialization for TopPeerCategoryClass.
func ( *bin.Buffer) (TopPeerCategoryClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case TopPeerCategoryBotsPMTypeID:
		// Decoding topPeerCategoryBotsPM#ab661b5b.
		 := TopPeerCategoryBotsPM{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode TopPeerCategoryClass: %w", )
		}
		return &, nil
	case TopPeerCategoryBotsInlineTypeID:
		// Decoding topPeerCategoryBotsInline#148677e2.
		 := TopPeerCategoryBotsInline{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode TopPeerCategoryClass: %w", )
		}
		return &, nil
	case TopPeerCategoryCorrespondentsTypeID:
		// Decoding topPeerCategoryCorrespondents#637b7ed.
		 := TopPeerCategoryCorrespondents{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode TopPeerCategoryClass: %w", )
		}
		return &, nil
	case TopPeerCategoryGroupsTypeID:
		// Decoding topPeerCategoryGroups#bd17a14a.
		 := TopPeerCategoryGroups{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode TopPeerCategoryClass: %w", )
		}
		return &, nil
	case TopPeerCategoryChannelsTypeID:
		// Decoding topPeerCategoryChannels#161d9628.
		 := TopPeerCategoryChannels{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode TopPeerCategoryClass: %w", )
		}
		return &, nil
	case TopPeerCategoryPhoneCallsTypeID:
		// Decoding topPeerCategoryPhoneCalls#1e76a78c.
		 := TopPeerCategoryPhoneCalls{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode TopPeerCategoryClass: %w", )
		}
		return &, nil
	case TopPeerCategoryForwardUsersTypeID:
		// Decoding topPeerCategoryForwardUsers#a8406ca9.
		 := TopPeerCategoryForwardUsers{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode TopPeerCategoryClass: %w", )
		}
		return &, nil
	case TopPeerCategoryForwardChatsTypeID:
		// Decoding topPeerCategoryForwardChats#fbeec0f0.
		 := TopPeerCategoryForwardChats{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode TopPeerCategoryClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode TopPeerCategoryClass: %w", bin.NewUnexpectedID())
	}
}

// TopPeerCategory boxes the TopPeerCategoryClass providing a helper.
type TopPeerCategoryBox struct {
	TopPeerCategory TopPeerCategoryClass
}

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

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