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

// ProfileTabPosts represents TL type `profileTabPosts#b98cd696`.
// Represents the stories¹ tab of a profile page.
//
// Links:
//  1. https://core.telegram.org/api/stories
//
// See https://core.telegram.org/constructor/profileTabPosts for reference.
type ProfileTabPosts struct {
}

// ProfileTabPostsTypeID is TL type id of ProfileTabPosts.
const ProfileTabPostsTypeID = 0xb98cd696

// construct implements constructor of ProfileTabClass.
func ( ProfileTabPosts) () ProfileTabClass { return & }

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

	_ ProfileTabClass = &ProfileTabPosts{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *ProfileTabPosts) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabPosts#b98cd696 as nil")
	}
	.PutID(ProfileTabPostsTypeID)
	return .EncodeBare()
}

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

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

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

// ProfileTabGifts represents TL type `profileTabGifts#4d4bd46a`.
// Represents the gifts¹ tab of a profile page.
//
// Links:
//  1. https://core.telegram.org/api/gifts
//
// See https://core.telegram.org/constructor/profileTabGifts for reference.
type ProfileTabGifts struct {
}

// ProfileTabGiftsTypeID is TL type id of ProfileTabGifts.
const ProfileTabGiftsTypeID = 0x4d4bd46a

// construct implements constructor of ProfileTabClass.
func ( ProfileTabGifts) () ProfileTabClass { return & }

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

	_ ProfileTabClass = &ProfileTabGifts{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *ProfileTabGifts) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabGifts#4d4bd46a as nil")
	}
	.PutID(ProfileTabGiftsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ProfileTabGifts) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabGifts#4d4bd46a as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ProfileTabGifts) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode profileTabGifts#4d4bd46a to nil")
	}
	return nil
}

// ProfileTabMedia represents TL type `profileTabMedia#72c64955`.
// Represents the media tab of a profile page.
//
// See https://core.telegram.org/constructor/profileTabMedia for reference.
type ProfileTabMedia struct {
}

// ProfileTabMediaTypeID is TL type id of ProfileTabMedia.
const ProfileTabMediaTypeID = 0x72c64955

// construct implements constructor of ProfileTabClass.
func ( ProfileTabMedia) () ProfileTabClass { return & }

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

	_ ProfileTabClass = &ProfileTabMedia{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *ProfileTabMedia) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabMedia#72c64955 as nil")
	}
	.PutID(ProfileTabMediaTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ProfileTabMedia) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabMedia#72c64955 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ProfileTabMedia) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode profileTabMedia#72c64955 to nil")
	}
	return nil
}

// ProfileTabFiles represents TL type `profileTabFiles#ab339c00`.
// Represents the shared files tab of a profile.
//
// See https://core.telegram.org/constructor/profileTabFiles for reference.
type ProfileTabFiles struct {
}

// ProfileTabFilesTypeID is TL type id of ProfileTabFiles.
const ProfileTabFilesTypeID = 0xab339c00

// construct implements constructor of ProfileTabClass.
func ( ProfileTabFiles) () ProfileTabClass { return & }

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

	_ ProfileTabClass = &ProfileTabFiles{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *ProfileTabFiles) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabFiles#ab339c00 as nil")
	}
	.PutID(ProfileTabFilesTypeID)
	return .EncodeBare()
}

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

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

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

// ProfileTabMusic represents TL type `profileTabMusic#9f27d26e`.
// Represents the music¹ tab of a profile page.
//
// Links:
//  1. https://core.telegram.org/api/profile#music
//
// See https://core.telegram.org/constructor/profileTabMusic for reference.
type ProfileTabMusic struct {
}

// ProfileTabMusicTypeID is TL type id of ProfileTabMusic.
const ProfileTabMusicTypeID = 0x9f27d26e

// construct implements constructor of ProfileTabClass.
func ( ProfileTabMusic) () ProfileTabClass { return & }

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

	_ ProfileTabClass = &ProfileTabMusic{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *ProfileTabMusic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabMusic#9f27d26e as nil")
	}
	.PutID(ProfileTabMusicTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ProfileTabMusic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabMusic#9f27d26e as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ProfileTabMusic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode profileTabMusic#9f27d26e to nil")
	}
	return nil
}

// ProfileTabVoice represents TL type `profileTabVoice#e477092e`.
// Represents the voice messages tab of a profile page.
//
// See https://core.telegram.org/constructor/profileTabVoice for reference.
type ProfileTabVoice struct {
}

// ProfileTabVoiceTypeID is TL type id of ProfileTabVoice.
const ProfileTabVoiceTypeID = 0xe477092e

// construct implements constructor of ProfileTabClass.
func ( ProfileTabVoice) () ProfileTabClass { return & }

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

	_ ProfileTabClass = &ProfileTabVoice{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *ProfileTabVoice) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabVoice#e477092e as nil")
	}
	.PutID(ProfileTabVoiceTypeID)
	return .EncodeBare()
}

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

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

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

// ProfileTabLinks represents TL type `profileTabLinks#d3656499`.
// Represents the shared links tab of a profile page.
//
// See https://core.telegram.org/constructor/profileTabLinks for reference.
type ProfileTabLinks struct {
}

// ProfileTabLinksTypeID is TL type id of ProfileTabLinks.
const ProfileTabLinksTypeID = 0xd3656499

// construct implements constructor of ProfileTabClass.
func ( ProfileTabLinks) () ProfileTabClass { return & }

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

	_ ProfileTabClass = &ProfileTabLinks{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *ProfileTabLinks) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabLinks#d3656499 as nil")
	}
	.PutID(ProfileTabLinksTypeID)
	return .EncodeBare()
}

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

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

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

// ProfileTabGifs represents TL type `profileTabGifs#a2c0f695`.
// Represents the gifs tab of a profile page.
//
// See https://core.telegram.org/constructor/profileTabGifs for reference.
type ProfileTabGifs struct {
}

// ProfileTabGifsTypeID is TL type id of ProfileTabGifs.
const ProfileTabGifsTypeID = 0xa2c0f695

// construct implements constructor of ProfileTabClass.
func ( ProfileTabGifs) () ProfileTabClass { return & }

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

	_ ProfileTabClass = &ProfileTabGifs{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *ProfileTabGifs) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode profileTabGifs#a2c0f695 as nil")
	}
	.PutID(ProfileTabGifsTypeID)
	return .EncodeBare()
}

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

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

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

// ProfileTabClassName is schema name of ProfileTabClass.
const ProfileTabClassName = "ProfileTab"

// ProfileTabClass represents ProfileTab generic type.
//
// See https://core.telegram.org/type/ProfileTab for reference.
//
// Constructors:
//   - [ProfileTabPosts]
//   - [ProfileTabGifts]
//   - [ProfileTabMedia]
//   - [ProfileTabFiles]
//   - [ProfileTabMusic]
//   - [ProfileTabVoice]
//   - [ProfileTabLinks]
//   - [ProfileTabGifs]
//
// Example:
//
//	g, err := tg.DecodeProfileTab(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.ProfileTabPosts: // profileTabPosts#b98cd696
//	case *tg.ProfileTabGifts: // profileTabGifts#4d4bd46a
//	case *tg.ProfileTabMedia: // profileTabMedia#72c64955
//	case *tg.ProfileTabFiles: // profileTabFiles#ab339c00
//	case *tg.ProfileTabMusic: // profileTabMusic#9f27d26e
//	case *tg.ProfileTabVoice: // profileTabVoice#e477092e
//	case *tg.ProfileTabLinks: // profileTabLinks#d3656499
//	case *tg.ProfileTabGifs: // profileTabGifs#a2c0f695
//	default: panic(v)
//	}
type ProfileTabClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() ProfileTabClass

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

// DecodeProfileTab implements binary de-serialization for ProfileTabClass.
func ( *bin.Buffer) (ProfileTabClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case ProfileTabPostsTypeID:
		// Decoding profileTabPosts#b98cd696.
		 := ProfileTabPosts{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ProfileTabClass: %w", )
		}
		return &, nil
	case ProfileTabGiftsTypeID:
		// Decoding profileTabGifts#4d4bd46a.
		 := ProfileTabGifts{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ProfileTabClass: %w", )
		}
		return &, nil
	case ProfileTabMediaTypeID:
		// Decoding profileTabMedia#72c64955.
		 := ProfileTabMedia{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ProfileTabClass: %w", )
		}
		return &, nil
	case ProfileTabFilesTypeID:
		// Decoding profileTabFiles#ab339c00.
		 := ProfileTabFiles{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ProfileTabClass: %w", )
		}
		return &, nil
	case ProfileTabMusicTypeID:
		// Decoding profileTabMusic#9f27d26e.
		 := ProfileTabMusic{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ProfileTabClass: %w", )
		}
		return &, nil
	case ProfileTabVoiceTypeID:
		// Decoding profileTabVoice#e477092e.
		 := ProfileTabVoice{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ProfileTabClass: %w", )
		}
		return &, nil
	case ProfileTabLinksTypeID:
		// Decoding profileTabLinks#d3656499.
		 := ProfileTabLinks{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ProfileTabClass: %w", )
		}
		return &, nil
	case ProfileTabGifsTypeID:
		// Decoding profileTabGifs#a2c0f695.
		 := ProfileTabGifs{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ProfileTabClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode ProfileTabClass: %w", bin.NewUnexpectedID())
	}
}

// ProfileTab boxes the ProfileTabClass providing a helper.
type ProfileTabBox struct {
	ProfileTab ProfileTabClass
}

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

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