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

// ChatFull represents TL type `chatFull#c9d31138`.
// Full info about a basic group¹.
//
// Links:
//  1. https://core.telegram.org/api/channel#basic-groups
//
// See https://core.telegram.org/constructor/chatFull for reference.
type ChatFull struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Can we change the username of this chat
	CanSetUsername bool
	// Whether scheduled messages¹ are available
	//
	// Links:
	//  1) https://core.telegram.org/api/scheduled-messages
	HasScheduled bool
	// Whether the real-time chat translation popup¹ should be hidden.
	//
	// Links:
	//  1) https://core.telegram.org/api/translation
	TranslationsDisabled bool
	// ID of the chat
	ID int64
	// About string for this chat
	About string
	// Participant list
	Participants ChatParticipantsClass
	// Chat photo
	//
	// Use SetChatPhoto and GetChatPhoto helpers.
	ChatPhoto PhotoClass
	// Notification settings
	NotifySettings PeerNotifySettings
	// Chat invite
	//
	// Use SetExportedInvite and GetExportedInvite helpers.
	ExportedInvite ExportedChatInviteClass
	// Info about bots that are in this chat
	//
	// Use SetBotInfo and GetBotInfo helpers.
	BotInfo []BotInfo
	// Message ID of the last pinned message¹
	//
	// Links:
	//  1) https://core.telegram.org/api/pin
	//
	// Use SetPinnedMsgID and GetPinnedMsgID helpers.
	PinnedMsgID int
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// Group call information
	//
	// Use SetCall and GetCall helpers.
	Call InputGroupCall
	// Time-To-Live of messages sent by the current user to this chat
	//
	// Use SetTTLPeriod and GetTTLPeriod helpers.
	TTLPeriod int
	// When using phone.getGroupCallJoinAs¹ to get a list of peers that can be used to join
	// a group call, this field indicates the peer that should be selected by default.
	//
	// Links:
	//  1) https://core.telegram.org/method/phone.getGroupCallJoinAs
	//
	// Use SetGroupcallDefaultJoinAs and GetGroupcallDefaultJoinAs helpers.
	GroupcallDefaultJoinAs PeerClass
	// Emoji representing a specific chat theme
	//
	// Use SetThemeEmoticon and GetThemeEmoticon helpers.
	ThemeEmoticon string
	// Pending join requests »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/invites#join-requests
	//
	// Use SetRequestsPending and GetRequestsPending helpers.
	RequestsPending int
	// IDs of users who requested to join recently
	//
	// Use SetRecentRequesters and GetRecentRequesters helpers.
	RecentRequesters []int64
	// Allowed message reactions »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/reactions
	//
	// Use SetAvailableReactions and GetAvailableReactions helpers.
	AvailableReactions ChatReactionsClass
}

// ChatFullTypeID is TL type id of ChatFull.
const ChatFullTypeID = 0xc9d31138

// construct implements constructor of ChatFullClass.
func ( ChatFull) () ChatFullClass { return & }

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

	_ ChatFullClass = &ChatFull{}
)

func ( *ChatFull) () bool {
	if  == nil {
		return true
	}
	if !(.Flags.Zero()) {
		return false
	}
	if !(.CanSetUsername == false) {
		return false
	}
	if !(.HasScheduled == false) {
		return false
	}
	if !(.TranslationsDisabled == false) {
		return false
	}
	if !(.ID == 0) {
		return false
	}
	if !(.About == "") {
		return false
	}
	if !(.Participants == nil) {
		return false
	}
	if !(.ChatPhoto == nil) {
		return false
	}
	if !(.NotifySettings.Zero()) {
		return false
	}
	if !(.ExportedInvite == nil) {
		return false
	}
	if !(.BotInfo == nil) {
		return false
	}
	if !(.PinnedMsgID == 0) {
		return false
	}
	if !(.FolderID == 0) {
		return false
	}
	if !(.Call.Zero()) {
		return false
	}
	if !(.TTLPeriod == 0) {
		return false
	}
	if !(.GroupcallDefaultJoinAs == nil) {
		return false
	}
	if !(.ThemeEmoticon == "") {
		return false
	}
	if !(.RequestsPending == 0) {
		return false
	}
	if !(.RecentRequesters == nil) {
		return false
	}
	if !(.AvailableReactions == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChatFull from given interface.
func ( *ChatFull) ( interface {
	() ( bool)
	() ( bool)
	() ( bool)
	() ( int64)
	() ( string)
	() ( ChatParticipantsClass)
	() ( PhotoClass,  bool)
	() ( PeerNotifySettings)
	() ( ExportedChatInviteClass,  bool)
	() ( []BotInfo,  bool)
	() ( int,  bool)
	() ( int,  bool)
	() ( InputGroupCall,  bool)
	() ( int,  bool)
	() ( PeerClass,  bool)
	() ( string,  bool)
	() ( int,  bool)
	() ( []int64,  bool)
	() ( ChatReactionsClass,  bool)
}) {
	.CanSetUsername = .()
	.HasScheduled = .()
	.TranslationsDisabled = .()
	.ID = .()
	.About = .()
	.Participants = .()
	if ,  := .();  {
		.ChatPhoto = 
	}

	.NotifySettings = .()
	if ,  := .();  {
		.ExportedInvite = 
	}

	if ,  := .();  {
		.BotInfo = 
	}

	if ,  := .();  {
		.PinnedMsgID = 
	}

	if ,  := .();  {
		.FolderID = 
	}

	if ,  := .();  {
		.Call = 
	}

	if ,  := .();  {
		.TTLPeriod = 
	}

	if ,  := .();  {
		.GroupcallDefaultJoinAs = 
	}

	if ,  := .();  {
		.ThemeEmoticon = 
	}

	if ,  := .();  {
		.RequestsPending = 
	}

	if ,  := .();  {
		.RecentRequesters = 
	}

	if ,  := .();  {
		.AvailableReactions = 
	}

}

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

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

// TypeInfo returns info about TL type.
func ( *ChatFull) () tdp.Type {
	 := tdp.Type{
		Name: "chatFull",
		ID:   ChatFullTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "CanSetUsername",
			SchemaName: "can_set_username",
			Null:       !.Flags.Has(7),
		},
		{
			Name:       "HasScheduled",
			SchemaName: "has_scheduled",
			Null:       !.Flags.Has(8),
		},
		{
			Name:       "TranslationsDisabled",
			SchemaName: "translations_disabled",
			Null:       !.Flags.Has(19),
		},
		{
			Name:       "ID",
			SchemaName: "id",
		},
		{
			Name:       "About",
			SchemaName: "about",
		},
		{
			Name:       "Participants",
			SchemaName: "participants",
		},
		{
			Name:       "ChatPhoto",
			SchemaName: "chat_photo",
			Null:       !.Flags.Has(2),
		},
		{
			Name:       "NotifySettings",
			SchemaName: "notify_settings",
		},
		{
			Name:       "ExportedInvite",
			SchemaName: "exported_invite",
			Null:       !.Flags.Has(13),
		},
		{
			Name:       "BotInfo",
			SchemaName: "bot_info",
			Null:       !.Flags.Has(3),
		},
		{
			Name:       "PinnedMsgID",
			SchemaName: "pinned_msg_id",
			Null:       !.Flags.Has(6),
		},
		{
			Name:       "FolderID",
			SchemaName: "folder_id",
			Null:       !.Flags.Has(11),
		},
		{
			Name:       "Call",
			SchemaName: "call",
			Null:       !.Flags.Has(12),
		},
		{
			Name:       "TTLPeriod",
			SchemaName: "ttl_period",
			Null:       !.Flags.Has(14),
		},
		{
			Name:       "GroupcallDefaultJoinAs",
			SchemaName: "groupcall_default_join_as",
			Null:       !.Flags.Has(15),
		},
		{
			Name:       "ThemeEmoticon",
			SchemaName: "theme_emoticon",
			Null:       !.Flags.Has(16),
		},
		{
			Name:       "RequestsPending",
			SchemaName: "requests_pending",
			Null:       !.Flags.Has(17),
		},
		{
			Name:       "RecentRequesters",
			SchemaName: "recent_requesters",
			Null:       !.Flags.Has(17),
		},
		{
			Name:       "AvailableReactions",
			SchemaName: "available_reactions",
			Null:       !.Flags.Has(18),
		},
	}
	return 
}

// SetFlags sets flags for non-zero fields.
func ( *ChatFull) () {
	if !(.CanSetUsername == false) {
		.Flags.Set(7)
	}
	if !(.HasScheduled == false) {
		.Flags.Set(8)
	}
	if !(.TranslationsDisabled == false) {
		.Flags.Set(19)
	}
	if !(.ChatPhoto == nil) {
		.Flags.Set(2)
	}
	if !(.ExportedInvite == nil) {
		.Flags.Set(13)
	}
	if !(.BotInfo == nil) {
		.Flags.Set(3)
	}
	if !(.PinnedMsgID == 0) {
		.Flags.Set(6)
	}
	if !(.FolderID == 0) {
		.Flags.Set(11)
	}
	if !(.Call.Zero()) {
		.Flags.Set(12)
	}
	if !(.TTLPeriod == 0) {
		.Flags.Set(14)
	}
	if !(.GroupcallDefaultJoinAs == nil) {
		.Flags.Set(15)
	}
	if !(.ThemeEmoticon == "") {
		.Flags.Set(16)
	}
	if !(.RequestsPending == 0) {
		.Flags.Set(17)
	}
	if !(.RecentRequesters == nil) {
		.Flags.Set(17)
	}
	if !(.AvailableReactions == nil) {
		.Flags.Set(18)
	}
}

// Encode implements bin.Encoder.
func ( *ChatFull) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode chatFull#c9d31138 as nil")
	}
	.PutID(ChatFullTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChatFull) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode chatFull#c9d31138 as nil")
	}
	.SetFlags()
	if  := .Flags.Encode();  != nil {
		return fmt.Errorf("unable to encode chatFull#c9d31138: field flags: %w", )
	}
	.PutLong(.ID)
	.PutString(.About)
	if .Participants == nil {
		return fmt.Errorf("unable to encode chatFull#c9d31138: field participants is nil")
	}
	if  := .Participants.Encode();  != nil {
		return fmt.Errorf("unable to encode chatFull#c9d31138: field participants: %w", )
	}
	if .Flags.Has(2) {
		if .ChatPhoto == nil {
			return fmt.Errorf("unable to encode chatFull#c9d31138: field chat_photo is nil")
		}
		if  := .ChatPhoto.Encode();  != nil {
			return fmt.Errorf("unable to encode chatFull#c9d31138: field chat_photo: %w", )
		}
	}
	if  := .NotifySettings.Encode();  != nil {
		return fmt.Errorf("unable to encode chatFull#c9d31138: field notify_settings: %w", )
	}
	if .Flags.Has(13) {
		if .ExportedInvite == nil {
			return fmt.Errorf("unable to encode chatFull#c9d31138: field exported_invite is nil")
		}
		if  := .ExportedInvite.Encode();  != nil {
			return fmt.Errorf("unable to encode chatFull#c9d31138: field exported_invite: %w", )
		}
	}
	if .Flags.Has(3) {
		.PutVectorHeader(len(.BotInfo))
		for ,  := range .BotInfo {
			if  := .Encode();  != nil {
				return fmt.Errorf("unable to encode chatFull#c9d31138: field bot_info element with index %d: %w", , )
			}
		}
	}
	if .Flags.Has(6) {
		.PutInt(.PinnedMsgID)
	}
	if .Flags.Has(11) {
		.PutInt(.FolderID)
	}
	if .Flags.Has(12) {
		if  := .Call.Encode();  != nil {
			return fmt.Errorf("unable to encode chatFull#c9d31138: field call: %w", )
		}
	}
	if .Flags.Has(14) {
		.PutInt(.TTLPeriod)
	}
	if .Flags.Has(15) {
		if .GroupcallDefaultJoinAs == nil {
			return fmt.Errorf("unable to encode chatFull#c9d31138: field groupcall_default_join_as is nil")
		}
		if  := .GroupcallDefaultJoinAs.Encode();  != nil {
			return fmt.Errorf("unable to encode chatFull#c9d31138: field groupcall_default_join_as: %w", )
		}
	}
	if .Flags.Has(16) {
		.PutString(.ThemeEmoticon)
	}
	if .Flags.Has(17) {
		.PutInt(.RequestsPending)
	}
	if .Flags.Has(17) {
		.PutVectorHeader(len(.RecentRequesters))
		for ,  := range .RecentRequesters {
			.PutLong()
		}
	}
	if .Flags.Has(18) {
		if .AvailableReactions == nil {
			return fmt.Errorf("unable to encode chatFull#c9d31138: field available_reactions is nil")
		}
		if  := .AvailableReactions.Encode();  != nil {
			return fmt.Errorf("unable to encode chatFull#c9d31138: field available_reactions: %w", )
		}
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChatFull) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode chatFull#c9d31138 to nil")
	}
	{
		if  := .Flags.Decode();  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field flags: %w", )
		}
	}
	.CanSetUsername = .Flags.Has(7)
	.HasScheduled = .Flags.Has(8)
	.TranslationsDisabled = .Flags.Has(19)
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field id: %w", )
		}
		.ID = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field about: %w", )
		}
		.About = 
	}
	{
		,  := DecodeChatParticipants()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field participants: %w", )
		}
		.Participants = 
	}
	if .Flags.Has(2) {
		,  := DecodePhoto()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field chat_photo: %w", )
		}
		.ChatPhoto = 
	}
	{
		if  := .NotifySettings.Decode();  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field notify_settings: %w", )
		}
	}
	if .Flags.Has(13) {
		,  := DecodeExportedChatInvite()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field exported_invite: %w", )
		}
		.ExportedInvite = 
	}
	if .Flags.Has(3) {
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field bot_info: %w", )
		}

		if  > 0 {
			.BotInfo = make([]BotInfo, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			var  BotInfo
			if  := .Decode();  != nil {
				return fmt.Errorf("unable to decode chatFull#c9d31138: field bot_info: %w", )
			}
			.BotInfo = append(.BotInfo, )
		}
	}
	if .Flags.Has(6) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field pinned_msg_id: %w", )
		}
		.PinnedMsgID = 
	}
	if .Flags.Has(11) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field folder_id: %w", )
		}
		.FolderID = 
	}
	if .Flags.Has(12) {
		if  := .Call.Decode();  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field call: %w", )
		}
	}
	if .Flags.Has(14) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field ttl_period: %w", )
		}
		.TTLPeriod = 
	}
	if .Flags.Has(15) {
		,  := DecodePeer()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field groupcall_default_join_as: %w", )
		}
		.GroupcallDefaultJoinAs = 
	}
	if .Flags.Has(16) {
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field theme_emoticon: %w", )
		}
		.ThemeEmoticon = 
	}
	if .Flags.Has(17) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field requests_pending: %w", )
		}
		.RequestsPending = 
	}
	if .Flags.Has(17) {
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field recent_requesters: %w", )
		}

		if  > 0 {
			.RecentRequesters = make([]int64, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			,  := .Long()
			if  != nil {
				return fmt.Errorf("unable to decode chatFull#c9d31138: field recent_requesters: %w", )
			}
			.RecentRequesters = append(.RecentRequesters, )
		}
	}
	if .Flags.Has(18) {
		,  := DecodeChatReactions()
		if  != nil {
			return fmt.Errorf("unable to decode chatFull#c9d31138: field available_reactions: %w", )
		}
		.AvailableReactions = 
	}
	return nil
}

// SetCanSetUsername sets value of CanSetUsername conditional field.
func ( *ChatFull) ( bool) {
	if  {
		.Flags.Set(7)
		.CanSetUsername = true
	} else {
		.Flags.Unset(7)
		.CanSetUsername = false
	}
}

// GetCanSetUsername returns value of CanSetUsername conditional field.
func ( *ChatFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(7)
}

// SetHasScheduled sets value of HasScheduled conditional field.
func ( *ChatFull) ( bool) {
	if  {
		.Flags.Set(8)
		.HasScheduled = true
	} else {
		.Flags.Unset(8)
		.HasScheduled = false
	}
}

// GetHasScheduled returns value of HasScheduled conditional field.
func ( *ChatFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(8)
}

// SetTranslationsDisabled sets value of TranslationsDisabled conditional field.
func ( *ChatFull) ( bool) {
	if  {
		.Flags.Set(19)
		.TranslationsDisabled = true
	} else {
		.Flags.Unset(19)
		.TranslationsDisabled = false
	}
}

// GetTranslationsDisabled returns value of TranslationsDisabled conditional field.
func ( *ChatFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(19)
}

// GetID returns value of ID field.
func ( *ChatFull) () ( int64) {
	if  == nil {
		return
	}
	return .ID
}

// GetAbout returns value of About field.
func ( *ChatFull) () ( string) {
	if  == nil {
		return
	}
	return .About
}

// GetParticipants returns value of Participants field.
func ( *ChatFull) () ( ChatParticipantsClass) {
	if  == nil {
		return
	}
	return .Participants
}

// SetChatPhoto sets value of ChatPhoto conditional field.
func ( *ChatFull) ( PhotoClass) {
	.Flags.Set(2)
	.ChatPhoto = 
}

// GetChatPhoto returns value of ChatPhoto conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( PhotoClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(2) {
		return , false
	}
	return .ChatPhoto, true
}

// GetNotifySettings returns value of NotifySettings field.
func ( *ChatFull) () ( PeerNotifySettings) {
	if  == nil {
		return
	}
	return .NotifySettings
}

// SetExportedInvite sets value of ExportedInvite conditional field.
func ( *ChatFull) ( ExportedChatInviteClass) {
	.Flags.Set(13)
	.ExportedInvite = 
}

// GetExportedInvite returns value of ExportedInvite conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( ExportedChatInviteClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(13) {
		return , false
	}
	return .ExportedInvite, true
}

// SetBotInfo sets value of BotInfo conditional field.
func ( *ChatFull) ( []BotInfo) {
	.Flags.Set(3)
	.BotInfo = 
}

// GetBotInfo returns value of BotInfo conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( []BotInfo,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(3) {
		return , false
	}
	return .BotInfo, true
}

// SetPinnedMsgID sets value of PinnedMsgID conditional field.
func ( *ChatFull) ( int) {
	.Flags.Set(6)
	.PinnedMsgID = 
}

// GetPinnedMsgID returns value of PinnedMsgID conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(6) {
		return , false
	}
	return .PinnedMsgID, true
}

// SetFolderID sets value of FolderID conditional field.
func ( *ChatFull) ( int) {
	.Flags.Set(11)
	.FolderID = 
}

// GetFolderID returns value of FolderID conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(11) {
		return , false
	}
	return .FolderID, true
}

// SetCall sets value of Call conditional field.
func ( *ChatFull) ( InputGroupCall) {
	.Flags.Set(12)
	.Call = 
}

// GetCall returns value of Call conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( InputGroupCall,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(12) {
		return , false
	}
	return .Call, true
}

// SetTTLPeriod sets value of TTLPeriod conditional field.
func ( *ChatFull) ( int) {
	.Flags.Set(14)
	.TTLPeriod = 
}

// GetTTLPeriod returns value of TTLPeriod conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(14) {
		return , false
	}
	return .TTLPeriod, true
}

// SetGroupcallDefaultJoinAs sets value of GroupcallDefaultJoinAs conditional field.
func ( *ChatFull) ( PeerClass) {
	.Flags.Set(15)
	.GroupcallDefaultJoinAs = 
}

// GetGroupcallDefaultJoinAs returns value of GroupcallDefaultJoinAs conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( PeerClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(15) {
		return , false
	}
	return .GroupcallDefaultJoinAs, true
}

// SetThemeEmoticon sets value of ThemeEmoticon conditional field.
func ( *ChatFull) ( string) {
	.Flags.Set(16)
	.ThemeEmoticon = 
}

// GetThemeEmoticon returns value of ThemeEmoticon conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( string,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(16) {
		return , false
	}
	return .ThemeEmoticon, true
}

// SetRequestsPending sets value of RequestsPending conditional field.
func ( *ChatFull) ( int) {
	.Flags.Set(17)
	.RequestsPending = 
}

// GetRequestsPending returns value of RequestsPending conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(17) {
		return , false
	}
	return .RequestsPending, true
}

// SetRecentRequesters sets value of RecentRequesters conditional field.
func ( *ChatFull) ( []int64) {
	.Flags.Set(17)
	.RecentRequesters = 
}

// GetRecentRequesters returns value of RecentRequesters conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( []int64,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(17) {
		return , false
	}
	return .RecentRequesters, true
}

// SetAvailableReactions sets value of AvailableReactions conditional field.
func ( *ChatFull) ( ChatReactionsClass) {
	.Flags.Set(18)
	.AvailableReactions = 
}

// GetAvailableReactions returns value of AvailableReactions conditional field and
// boolean which is true if field was set.
func ( *ChatFull) () ( ChatReactionsClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(18) {
		return , false
	}
	return .AvailableReactions, true
}

// ChannelFull represents TL type `channelFull#f2bcb6f`.
// Full info about a channel¹, supergroup² or gigagroup³.
//
// Links:
//  1. https://core.telegram.org/api/channel#channels
//  2. https://core.telegram.org/api/channel#supergroups
//  3. https://core.telegram.org/api/channel#gigagroups
//
// See https://core.telegram.org/constructor/channelFull for reference.
type ChannelFull struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Can we view the participant list?
	CanViewParticipants bool
	// Can we set the channel's username?
	CanSetUsername bool
	// Can we associate¹ a stickerpack to the supergroup?
	//
	// Links:
	//  1) https://core.telegram.org/method/channels.setStickers
	CanSetStickers bool
	// Is the history before we joined hidden to us?
	HiddenPrehistory bool
	// Can we set the geolocation of this group (for geogroups)
	CanSetLocation bool
	// Whether scheduled messages are available
	HasScheduled bool
	// Can the user view channel/supergroup statistics¹
	//
	// Links:
	//  1) https://core.telegram.org/api/stats
	CanViewStats bool
	// Whether any anonymous admin of this supergroup was blocked: if set, you won't receive
	// messages from anonymous group admins in discussion replies via @replies¹
	//
	// Links:
	//  1) https://core.telegram.org/api/discussion
	Blocked bool
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags2 bin.Fields
	// Can we delete this channel?
	CanDeleteChannel bool
	// Whether native antispam¹ functionality is enabled in this supergroup.
	//
	// Links:
	//  1) https://core.telegram.org/api/antispam
	Antispam bool
	// Whether the participant list is hidden.
	ParticipantsHidden bool
	// Whether the real-time chat translation popup¹ should be hidden.
	//
	// Links:
	//  1) https://core.telegram.org/api/translation
	TranslationsDisabled bool
	// Whether this user has some pinned stories¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/stories#pinned-or-archived-stories
	StoriesPinnedAvailable bool
	// Users may also choose to display messages from all topics of a forum¹ as if they were
	// sent to a normal group, using a "View as messages" setting in the local client.  This
	// setting only affects the current account, and is synced to other logged in sessions
	// using the channels.toggleViewForumAsMessages² method; invoking this method will
	// update the value of this flag.
	//
	// Links:
	//  1) https://core.telegram.org/api/forum
	//  2) https://core.telegram.org/method/channels.toggleViewForumAsMessages
	ViewForumAsMessages bool
	// ID of the channel
	ID int64
	// Info about the channel
	About string
	// Number of participants of the channel
	//
	// Use SetParticipantsCount and GetParticipantsCount helpers.
	ParticipantsCount int
	// Number of channel admins
	//
	// Use SetAdminsCount and GetAdminsCount helpers.
	AdminsCount int
	// Number of users kicked¹ from the channel
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	//
	// Use SetKickedCount and GetKickedCount helpers.
	KickedCount int
	// Number of users banned¹ from the channel
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	//
	// Use SetBannedCount and GetBannedCount helpers.
	BannedCount int
	// Number of users currently online
	//
	// Use SetOnlineCount and GetOnlineCount helpers.
	OnlineCount int
	// Position up to which all incoming messages are read.
	ReadInboxMaxID int
	// Position up to which all outgoing messages are read.
	ReadOutboxMaxID int
	// Count of unread messages
	UnreadCount int
	// Channel picture
	ChatPhoto PhotoClass
	// Notification settings
	NotifySettings PeerNotifySettings
	// Invite link
	//
	// Use SetExportedInvite and GetExportedInvite helpers.
	ExportedInvite ExportedChatInviteClass
	// Info about bots in the channel/supergroup
	BotInfo []BotInfo
	// The chat ID from which this group was migrated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	//
	// Use SetMigratedFromChatID and GetMigratedFromChatID helpers.
	MigratedFromChatID int64
	// The message ID in the original chat at which this group was migrated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	//
	// Use SetMigratedFromMaxID and GetMigratedFromMaxID helpers.
	MigratedFromMaxID int
	// Message ID of the last pinned message¹
	//
	// Links:
	//  1) https://core.telegram.org/api/pin
	//
	// Use SetPinnedMsgID and GetPinnedMsgID helpers.
	PinnedMsgID int
	// Associated stickerset
	//
	// Use SetStickerset and GetStickerset helpers.
	Stickerset StickerSet
	// Identifier of a maximum unavailable message in a channel due to hidden history.
	//
	// Use SetAvailableMinID and GetAvailableMinID helpers.
	AvailableMinID int
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// ID of the linked discussion chat¹ for channels
	//
	// Links:
	//  1) https://core.telegram.org/api/discussion
	//
	// Use SetLinkedChatID and GetLinkedChatID helpers.
	LinkedChatID int64
	// Location of the geogroup
	//
	// Use SetLocation and GetLocation helpers.
	Location ChannelLocationClass
	// If specified, users in supergroups will only be able to send one message every
	// slowmode_seconds seconds
	//
	// Use SetSlowmodeSeconds and GetSlowmodeSeconds helpers.
	SlowmodeSeconds int
	// Indicates when the user will be allowed to send another message in the supergroup
	// (unixtime)
	//
	// Use SetSlowmodeNextSendDate and GetSlowmodeNextSendDate helpers.
	SlowmodeNextSendDate int
	// If set, specifies the DC to use for fetching channel statistics
	//
	// Use SetStatsDC and GetStatsDC helpers.
	StatsDC int
	// Latest PTS¹ for this channel
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Livestream or group call information
	//
	// Use SetCall and GetCall helpers.
	Call InputGroupCall
	// Time-To-Live of messages in this channel or supergroup
	//
	// Use SetTTLPeriod and GetTTLPeriod helpers.
	TTLPeriod int
	// A list of suggested actions¹ for the supergroup admin, see here for more info »².
	//
	// Links:
	//  1) https://core.telegram.org/api/config#suggestions
	//  2) https://core.telegram.org/api/config#suggestions
	//
	// Use SetPendingSuggestions and GetPendingSuggestions helpers.
	PendingSuggestions []string
	// When using phone.getGroupCallJoinAs¹ to get a list of peers that can be used to join
	// a group call, this field indicates the peer that should be selected by default.
	//
	// Links:
	//  1) https://core.telegram.org/method/phone.getGroupCallJoinAs
	//
	// Use SetGroupcallDefaultJoinAs and GetGroupcallDefaultJoinAs helpers.
	GroupcallDefaultJoinAs PeerClass
	// Emoji representing a specific chat theme
	//
	// Use SetThemeEmoticon and GetThemeEmoticon helpers.
	ThemeEmoticon string
	// Pending join requests »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/invites#join-requests
	//
	// Use SetRequestsPending and GetRequestsPending helpers.
	RequestsPending int
	// IDs of users who requested to join recently
	//
	// Use SetRecentRequesters and GetRecentRequesters helpers.
	RecentRequesters []int64
	// Default peer used for sending messages to this channel
	//
	// Use SetDefaultSendAs and GetDefaultSendAs helpers.
	DefaultSendAs PeerClass
	// Allowed message reactions »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/reactions
	//
	// Use SetAvailableReactions and GetAvailableReactions helpers.
	AvailableReactions ChatReactionsClass
	// Channel stories¹
	//
	// Links:
	//  1) https://core.telegram.org/api/stories
	//
	// Use SetStories and GetStories helpers.
	Stories PeerStories
	// Wallpaper field of ChannelFull.
	//
	// Use SetWallpaper and GetWallpaper helpers.
	Wallpaper WallPaperClass
}

// ChannelFullTypeID is TL type id of ChannelFull.
const ChannelFullTypeID = 0xf2bcb6f

// construct implements constructor of ChatFullClass.
func ( ChannelFull) () ChatFullClass { return & }

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

	_ ChatFullClass = &ChannelFull{}
)

func ( *ChannelFull) () bool {
	if  == nil {
		return true
	}
	if !(.Flags.Zero()) {
		return false
	}
	if !(.CanViewParticipants == false) {
		return false
	}
	if !(.CanSetUsername == false) {
		return false
	}
	if !(.CanSetStickers == false) {
		return false
	}
	if !(.HiddenPrehistory == false) {
		return false
	}
	if !(.CanSetLocation == false) {
		return false
	}
	if !(.HasScheduled == false) {
		return false
	}
	if !(.CanViewStats == false) {
		return false
	}
	if !(.Blocked == false) {
		return false
	}
	if !(.Flags2.Zero()) {
		return false
	}
	if !(.CanDeleteChannel == false) {
		return false
	}
	if !(.Antispam == false) {
		return false
	}
	if !(.ParticipantsHidden == false) {
		return false
	}
	if !(.TranslationsDisabled == false) {
		return false
	}
	if !(.StoriesPinnedAvailable == false) {
		return false
	}
	if !(.ViewForumAsMessages == false) {
		return false
	}
	if !(.ID == 0) {
		return false
	}
	if !(.About == "") {
		return false
	}
	if !(.ParticipantsCount == 0) {
		return false
	}
	if !(.AdminsCount == 0) {
		return false
	}
	if !(.KickedCount == 0) {
		return false
	}
	if !(.BannedCount == 0) {
		return false
	}
	if !(.OnlineCount == 0) {
		return false
	}
	if !(.ReadInboxMaxID == 0) {
		return false
	}
	if !(.ReadOutboxMaxID == 0) {
		return false
	}
	if !(.UnreadCount == 0) {
		return false
	}
	if !(.ChatPhoto == nil) {
		return false
	}
	if !(.NotifySettings.Zero()) {
		return false
	}
	if !(.ExportedInvite == nil) {
		return false
	}
	if !(.BotInfo == nil) {
		return false
	}
	if !(.MigratedFromChatID == 0) {
		return false
	}
	if !(.MigratedFromMaxID == 0) {
		return false
	}
	if !(.PinnedMsgID == 0) {
		return false
	}
	if !(.Stickerset.Zero()) {
		return false
	}
	if !(.AvailableMinID == 0) {
		return false
	}
	if !(.FolderID == 0) {
		return false
	}
	if !(.LinkedChatID == 0) {
		return false
	}
	if !(.Location == nil) {
		return false
	}
	if !(.SlowmodeSeconds == 0) {
		return false
	}
	if !(.SlowmodeNextSendDate == 0) {
		return false
	}
	if !(.StatsDC == 0) {
		return false
	}
	if !(.Pts == 0) {
		return false
	}
	if !(.Call.Zero()) {
		return false
	}
	if !(.TTLPeriod == 0) {
		return false
	}
	if !(.PendingSuggestions == nil) {
		return false
	}
	if !(.GroupcallDefaultJoinAs == nil) {
		return false
	}
	if !(.ThemeEmoticon == "") {
		return false
	}
	if !(.RequestsPending == 0) {
		return false
	}
	if !(.RecentRequesters == nil) {
		return false
	}
	if !(.DefaultSendAs == nil) {
		return false
	}
	if !(.AvailableReactions == nil) {
		return false
	}
	if !(.Stories.Zero()) {
		return false
	}
	if !(.Wallpaper == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelFull from given interface.
func ( *ChannelFull) ( interface {
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( int64)
	() ( string)
	() ( int,  bool)
	() ( int,  bool)
	() ( int,  bool)
	() ( int,  bool)
	() ( int,  bool)
	() ( int)
	() ( int)
	() ( int)
	() ( PhotoClass)
	() ( PeerNotifySettings)
	() ( ExportedChatInviteClass,  bool)
	() ( []BotInfo)
	() ( int64,  bool)
	() ( int,  bool)
	() ( int,  bool)
	() ( StickerSet,  bool)
	() ( int,  bool)
	() ( int,  bool)
	() ( int64,  bool)
	() ( ChannelLocationClass,  bool)
	() ( int,  bool)
	() ( int,  bool)
	() ( int,  bool)
	() ( int)
	() ( InputGroupCall,  bool)
	() ( int,  bool)
	() ( []string,  bool)
	() ( PeerClass,  bool)
	() ( string,  bool)
	() ( int,  bool)
	() ( []int64,  bool)
	() ( PeerClass,  bool)
	() ( ChatReactionsClass,  bool)
	() ( PeerStories,  bool)
	() ( WallPaperClass,  bool)
}) {
	.CanViewParticipants = .()
	.CanSetUsername = .()
	.CanSetStickers = .()
	.HiddenPrehistory = .()
	.CanSetLocation = .()
	.HasScheduled = .()
	.CanViewStats = .()
	.Blocked = .()
	.CanDeleteChannel = .()
	.Antispam = .()
	.ParticipantsHidden = .()
	.TranslationsDisabled = .()
	.StoriesPinnedAvailable = .()
	.ViewForumAsMessages = .()
	.ID = .()
	.About = .()
	if ,  := .();  {
		.ParticipantsCount = 
	}

	if ,  := .();  {
		.AdminsCount = 
	}

	if ,  := .();  {
		.KickedCount = 
	}

	if ,  := .();  {
		.BannedCount = 
	}

	if ,  := .();  {
		.OnlineCount = 
	}

	.ReadInboxMaxID = .()
	.ReadOutboxMaxID = .()
	.UnreadCount = .()
	.ChatPhoto = .()
	.NotifySettings = .()
	if ,  := .();  {
		.ExportedInvite = 
	}

	.BotInfo = .()
	if ,  := .();  {
		.MigratedFromChatID = 
	}

	if ,  := .();  {
		.MigratedFromMaxID = 
	}

	if ,  := .();  {
		.PinnedMsgID = 
	}

	if ,  := .();  {
		.Stickerset = 
	}

	if ,  := .();  {
		.AvailableMinID = 
	}

	if ,  := .();  {
		.FolderID = 
	}

	if ,  := .();  {
		.LinkedChatID = 
	}

	if ,  := .();  {
		.Location = 
	}

	if ,  := .();  {
		.SlowmodeSeconds = 
	}

	if ,  := .();  {
		.SlowmodeNextSendDate = 
	}

	if ,  := .();  {
		.StatsDC = 
	}

	.Pts = .()
	if ,  := .();  {
		.Call = 
	}

	if ,  := .();  {
		.TTLPeriod = 
	}

	if ,  := .();  {
		.PendingSuggestions = 
	}

	if ,  := .();  {
		.GroupcallDefaultJoinAs = 
	}

	if ,  := .();  {
		.ThemeEmoticon = 
	}

	if ,  := .();  {
		.RequestsPending = 
	}

	if ,  := .();  {
		.RecentRequesters = 
	}

	if ,  := .();  {
		.DefaultSendAs = 
	}

	if ,  := .();  {
		.AvailableReactions = 
	}

	if ,  := .();  {
		.Stories = 
	}

	if ,  := .();  {
		.Wallpaper = 
	}

}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelFull) () tdp.Type {
	 := tdp.Type{
		Name: "channelFull",
		ID:   ChannelFullTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "CanViewParticipants",
			SchemaName: "can_view_participants",
			Null:       !.Flags.Has(3),
		},
		{
			Name:       "CanSetUsername",
			SchemaName: "can_set_username",
			Null:       !.Flags.Has(6),
		},
		{
			Name:       "CanSetStickers",
			SchemaName: "can_set_stickers",
			Null:       !.Flags.Has(7),
		},
		{
			Name:       "HiddenPrehistory",
			SchemaName: "hidden_prehistory",
			Null:       !.Flags.Has(10),
		},
		{
			Name:       "CanSetLocation",
			SchemaName: "can_set_location",
			Null:       !.Flags.Has(16),
		},
		{
			Name:       "HasScheduled",
			SchemaName: "has_scheduled",
			Null:       !.Flags.Has(19),
		},
		{
			Name:       "CanViewStats",
			SchemaName: "can_view_stats",
			Null:       !.Flags.Has(20),
		},
		{
			Name:       "Blocked",
			SchemaName: "blocked",
			Null:       !.Flags.Has(22),
		},
		{
			Name:       "CanDeleteChannel",
			SchemaName: "can_delete_channel",
			Null:       !.Flags2.Has(0),
		},
		{
			Name:       "Antispam",
			SchemaName: "antispam",
			Null:       !.Flags2.Has(1),
		},
		{
			Name:       "ParticipantsHidden",
			SchemaName: "participants_hidden",
			Null:       !.Flags2.Has(2),
		},
		{
			Name:       "TranslationsDisabled",
			SchemaName: "translations_disabled",
			Null:       !.Flags2.Has(3),
		},
		{
			Name:       "StoriesPinnedAvailable",
			SchemaName: "stories_pinned_available",
			Null:       !.Flags2.Has(5),
		},
		{
			Name:       "ViewForumAsMessages",
			SchemaName: "view_forum_as_messages",
			Null:       !.Flags2.Has(6),
		},
		{
			Name:       "ID",
			SchemaName: "id",
		},
		{
			Name:       "About",
			SchemaName: "about",
		},
		{
			Name:       "ParticipantsCount",
			SchemaName: "participants_count",
			Null:       !.Flags.Has(0),
		},
		{
			Name:       "AdminsCount",
			SchemaName: "admins_count",
			Null:       !.Flags.Has(1),
		},
		{
			Name:       "KickedCount",
			SchemaName: "kicked_count",
			Null:       !.Flags.Has(2),
		},
		{
			Name:       "BannedCount",
			SchemaName: "banned_count",
			Null:       !.Flags.Has(2),
		},
		{
			Name:       "OnlineCount",
			SchemaName: "online_count",
			Null:       !.Flags.Has(13),
		},
		{
			Name:       "ReadInboxMaxID",
			SchemaName: "read_inbox_max_id",
		},
		{
			Name:       "ReadOutboxMaxID",
			SchemaName: "read_outbox_max_id",
		},
		{
			Name:       "UnreadCount",
			SchemaName: "unread_count",
		},
		{
			Name:       "ChatPhoto",
			SchemaName: "chat_photo",
		},
		{
			Name:       "NotifySettings",
			SchemaName: "notify_settings",
		},
		{
			Name:       "ExportedInvite",
			SchemaName: "exported_invite",
			Null:       !.Flags.Has(23),
		},
		{
			Name:       "BotInfo",
			SchemaName: "bot_info",
		},
		{
			Name:       "MigratedFromChatID",
			SchemaName: "migrated_from_chat_id",
			Null:       !.Flags.Has(4),
		},
		{
			Name:       "MigratedFromMaxID",
			SchemaName: "migrated_from_max_id",
			Null:       !.Flags.Has(4),
		},
		{
			Name:       "PinnedMsgID",
			SchemaName: "pinned_msg_id",
			Null:       !.Flags.Has(5),
		},
		{
			Name:       "Stickerset",
			SchemaName: "stickerset",
			Null:       !.Flags.Has(8),
		},
		{
			Name:       "AvailableMinID",
			SchemaName: "available_min_id",
			Null:       !.Flags.Has(9),
		},
		{
			Name:       "FolderID",
			SchemaName: "folder_id",
			Null:       !.Flags.Has(11),
		},
		{
			Name:       "LinkedChatID",
			SchemaName: "linked_chat_id",
			Null:       !.Flags.Has(14),
		},
		{
			Name:       "Location",
			SchemaName: "location",
			Null:       !.Flags.Has(15),
		},
		{
			Name:       "SlowmodeSeconds",
			SchemaName: "slowmode_seconds",
			Null:       !.Flags.Has(17),
		},
		{
			Name:       "SlowmodeNextSendDate",
			SchemaName: "slowmode_next_send_date",
			Null:       !.Flags.Has(18),
		},
		{
			Name:       "StatsDC",
			SchemaName: "stats_dc",
			Null:       !.Flags.Has(12),
		},
		{
			Name:       "Pts",
			SchemaName: "pts",
		},
		{
			Name:       "Call",
			SchemaName: "call",
			Null:       !.Flags.Has(21),
		},
		{
			Name:       "TTLPeriod",
			SchemaName: "ttl_period",
			Null:       !.Flags.Has(24),
		},
		{
			Name:       "PendingSuggestions",
			SchemaName: "pending_suggestions",
			Null:       !.Flags.Has(25),
		},
		{
			Name:       "GroupcallDefaultJoinAs",
			SchemaName: "groupcall_default_join_as",
			Null:       !.Flags.Has(26),
		},
		{
			Name:       "ThemeEmoticon",
			SchemaName: "theme_emoticon",
			Null:       !.Flags.Has(27),
		},
		{
			Name:       "RequestsPending",
			SchemaName: "requests_pending",
			Null:       !.Flags.Has(28),
		},
		{
			Name:       "RecentRequesters",
			SchemaName: "recent_requesters",
			Null:       !.Flags.Has(28),
		},
		{
			Name:       "DefaultSendAs",
			SchemaName: "default_send_as",
			Null:       !.Flags.Has(29),
		},
		{
			Name:       "AvailableReactions",
			SchemaName: "available_reactions",
			Null:       !.Flags.Has(30),
		},
		{
			Name:       "Stories",
			SchemaName: "stories",
			Null:       !.Flags2.Has(4),
		},
		{
			Name:       "Wallpaper",
			SchemaName: "wallpaper",
			Null:       !.Flags2.Has(7),
		},
	}
	return 
}

// SetFlags sets flags for non-zero fields.
func ( *ChannelFull) () {
	if !(.CanViewParticipants == false) {
		.Flags.Set(3)
	}
	if !(.CanSetUsername == false) {
		.Flags.Set(6)
	}
	if !(.CanSetStickers == false) {
		.Flags.Set(7)
	}
	if !(.HiddenPrehistory == false) {
		.Flags.Set(10)
	}
	if !(.CanSetLocation == false) {
		.Flags.Set(16)
	}
	if !(.HasScheduled == false) {
		.Flags.Set(19)
	}
	if !(.CanViewStats == false) {
		.Flags.Set(20)
	}
	if !(.Blocked == false) {
		.Flags.Set(22)
	}
	if !(.CanDeleteChannel == false) {
		.Flags2.Set(0)
	}
	if !(.Antispam == false) {
		.Flags2.Set(1)
	}
	if !(.ParticipantsHidden == false) {
		.Flags2.Set(2)
	}
	if !(.TranslationsDisabled == false) {
		.Flags2.Set(3)
	}
	if !(.StoriesPinnedAvailable == false) {
		.Flags2.Set(5)
	}
	if !(.ViewForumAsMessages == false) {
		.Flags2.Set(6)
	}
	if !(.ParticipantsCount == 0) {
		.Flags.Set(0)
	}
	if !(.AdminsCount == 0) {
		.Flags.Set(1)
	}
	if !(.KickedCount == 0) {
		.Flags.Set(2)
	}
	if !(.BannedCount == 0) {
		.Flags.Set(2)
	}
	if !(.OnlineCount == 0) {
		.Flags.Set(13)
	}
	if !(.ExportedInvite == nil) {
		.Flags.Set(23)
	}
	if !(.MigratedFromChatID == 0) {
		.Flags.Set(4)
	}
	if !(.MigratedFromMaxID == 0) {
		.Flags.Set(4)
	}
	if !(.PinnedMsgID == 0) {
		.Flags.Set(5)
	}
	if !(.Stickerset.Zero()) {
		.Flags.Set(8)
	}
	if !(.AvailableMinID == 0) {
		.Flags.Set(9)
	}
	if !(.FolderID == 0) {
		.Flags.Set(11)
	}
	if !(.LinkedChatID == 0) {
		.Flags.Set(14)
	}
	if !(.Location == nil) {
		.Flags.Set(15)
	}
	if !(.SlowmodeSeconds == 0) {
		.Flags.Set(17)
	}
	if !(.SlowmodeNextSendDate == 0) {
		.Flags.Set(18)
	}
	if !(.StatsDC == 0) {
		.Flags.Set(12)
	}
	if !(.Call.Zero()) {
		.Flags.Set(21)
	}
	if !(.TTLPeriod == 0) {
		.Flags.Set(24)
	}
	if !(.PendingSuggestions == nil) {
		.Flags.Set(25)
	}
	if !(.GroupcallDefaultJoinAs == nil) {
		.Flags.Set(26)
	}
	if !(.ThemeEmoticon == "") {
		.Flags.Set(27)
	}
	if !(.RequestsPending == 0) {
		.Flags.Set(28)
	}
	if !(.RecentRequesters == nil) {
		.Flags.Set(28)
	}
	if !(.DefaultSendAs == nil) {
		.Flags.Set(29)
	}
	if !(.AvailableReactions == nil) {
		.Flags.Set(30)
	}
	if !(.Stories.Zero()) {
		.Flags2.Set(4)
	}
	if !(.Wallpaper == nil) {
		.Flags2.Set(7)
	}
}

// Encode implements bin.Encoder.
func ( *ChannelFull) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelFull#f2bcb6f as nil")
	}
	.PutID(ChannelFullTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelFull) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelFull#f2bcb6f as nil")
	}
	.SetFlags()
	if  := .Flags.Encode();  != nil {
		return fmt.Errorf("unable to encode channelFull#f2bcb6f: field flags: %w", )
	}
	if  := .Flags2.Encode();  != nil {
		return fmt.Errorf("unable to encode channelFull#f2bcb6f: field flags2: %w", )
	}
	.PutLong(.ID)
	.PutString(.About)
	if .Flags.Has(0) {
		.PutInt(.ParticipantsCount)
	}
	if .Flags.Has(1) {
		.PutInt(.AdminsCount)
	}
	if .Flags.Has(2) {
		.PutInt(.KickedCount)
	}
	if .Flags.Has(2) {
		.PutInt(.BannedCount)
	}
	if .Flags.Has(13) {
		.PutInt(.OnlineCount)
	}
	.PutInt(.ReadInboxMaxID)
	.PutInt(.ReadOutboxMaxID)
	.PutInt(.UnreadCount)
	if .ChatPhoto == nil {
		return fmt.Errorf("unable to encode channelFull#f2bcb6f: field chat_photo is nil")
	}
	if  := .ChatPhoto.Encode();  != nil {
		return fmt.Errorf("unable to encode channelFull#f2bcb6f: field chat_photo: %w", )
	}
	if  := .NotifySettings.Encode();  != nil {
		return fmt.Errorf("unable to encode channelFull#f2bcb6f: field notify_settings: %w", )
	}
	if .Flags.Has(23) {
		if .ExportedInvite == nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field exported_invite is nil")
		}
		if  := .ExportedInvite.Encode();  != nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field exported_invite: %w", )
		}
	}
	.PutVectorHeader(len(.BotInfo))
	for ,  := range .BotInfo {
		if  := .Encode();  != nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field bot_info element with index %d: %w", , )
		}
	}
	if .Flags.Has(4) {
		.PutLong(.MigratedFromChatID)
	}
	if .Flags.Has(4) {
		.PutInt(.MigratedFromMaxID)
	}
	if .Flags.Has(5) {
		.PutInt(.PinnedMsgID)
	}
	if .Flags.Has(8) {
		if  := .Stickerset.Encode();  != nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field stickerset: %w", )
		}
	}
	if .Flags.Has(9) {
		.PutInt(.AvailableMinID)
	}
	if .Flags.Has(11) {
		.PutInt(.FolderID)
	}
	if .Flags.Has(14) {
		.PutLong(.LinkedChatID)
	}
	if .Flags.Has(15) {
		if .Location == nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field location is nil")
		}
		if  := .Location.Encode();  != nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field location: %w", )
		}
	}
	if .Flags.Has(17) {
		.PutInt(.SlowmodeSeconds)
	}
	if .Flags.Has(18) {
		.PutInt(.SlowmodeNextSendDate)
	}
	if .Flags.Has(12) {
		.PutInt(.StatsDC)
	}
	.PutInt(.Pts)
	if .Flags.Has(21) {
		if  := .Call.Encode();  != nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field call: %w", )
		}
	}
	if .Flags.Has(24) {
		.PutInt(.TTLPeriod)
	}
	if .Flags.Has(25) {
		.PutVectorHeader(len(.PendingSuggestions))
		for ,  := range .PendingSuggestions {
			.PutString()
		}
	}
	if .Flags.Has(26) {
		if .GroupcallDefaultJoinAs == nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field groupcall_default_join_as is nil")
		}
		if  := .GroupcallDefaultJoinAs.Encode();  != nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field groupcall_default_join_as: %w", )
		}
	}
	if .Flags.Has(27) {
		.PutString(.ThemeEmoticon)
	}
	if .Flags.Has(28) {
		.PutInt(.RequestsPending)
	}
	if .Flags.Has(28) {
		.PutVectorHeader(len(.RecentRequesters))
		for ,  := range .RecentRequesters {
			.PutLong()
		}
	}
	if .Flags.Has(29) {
		if .DefaultSendAs == nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field default_send_as is nil")
		}
		if  := .DefaultSendAs.Encode();  != nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field default_send_as: %w", )
		}
	}
	if .Flags.Has(30) {
		if .AvailableReactions == nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field available_reactions is nil")
		}
		if  := .AvailableReactions.Encode();  != nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field available_reactions: %w", )
		}
	}
	if .Flags2.Has(4) {
		if  := .Stories.Encode();  != nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field stories: %w", )
		}
	}
	if .Flags2.Has(7) {
		if .Wallpaper == nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field wallpaper is nil")
		}
		if  := .Wallpaper.Encode();  != nil {
			return fmt.Errorf("unable to encode channelFull#f2bcb6f: field wallpaper: %w", )
		}
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelFull) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelFull#f2bcb6f to nil")
	}
	{
		if  := .Flags.Decode();  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field flags: %w", )
		}
	}
	.CanViewParticipants = .Flags.Has(3)
	.CanSetUsername = .Flags.Has(6)
	.CanSetStickers = .Flags.Has(7)
	.HiddenPrehistory = .Flags.Has(10)
	.CanSetLocation = .Flags.Has(16)
	.HasScheduled = .Flags.Has(19)
	.CanViewStats = .Flags.Has(20)
	.Blocked = .Flags.Has(22)
	{
		if  := .Flags2.Decode();  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field flags2: %w", )
		}
	}
	.CanDeleteChannel = .Flags2.Has(0)
	.Antispam = .Flags2.Has(1)
	.ParticipantsHidden = .Flags2.Has(2)
	.TranslationsDisabled = .Flags2.Has(3)
	.StoriesPinnedAvailable = .Flags2.Has(5)
	.ViewForumAsMessages = .Flags2.Has(6)
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field id: %w", )
		}
		.ID = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field about: %w", )
		}
		.About = 
	}
	if .Flags.Has(0) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field participants_count: %w", )
		}
		.ParticipantsCount = 
	}
	if .Flags.Has(1) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field admins_count: %w", )
		}
		.AdminsCount = 
	}
	if .Flags.Has(2) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field kicked_count: %w", )
		}
		.KickedCount = 
	}
	if .Flags.Has(2) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field banned_count: %w", )
		}
		.BannedCount = 
	}
	if .Flags.Has(13) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field online_count: %w", )
		}
		.OnlineCount = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field read_inbox_max_id: %w", )
		}
		.ReadInboxMaxID = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field read_outbox_max_id: %w", )
		}
		.ReadOutboxMaxID = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field unread_count: %w", )
		}
		.UnreadCount = 
	}
	{
		,  := DecodePhoto()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field chat_photo: %w", )
		}
		.ChatPhoto = 
	}
	{
		if  := .NotifySettings.Decode();  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field notify_settings: %w", )
		}
	}
	if .Flags.Has(23) {
		,  := DecodeExportedChatInvite()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field exported_invite: %w", )
		}
		.ExportedInvite = 
	}
	{
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field bot_info: %w", )
		}

		if  > 0 {
			.BotInfo = make([]BotInfo, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			var  BotInfo
			if  := .Decode();  != nil {
				return fmt.Errorf("unable to decode channelFull#f2bcb6f: field bot_info: %w", )
			}
			.BotInfo = append(.BotInfo, )
		}
	}
	if .Flags.Has(4) {
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field migrated_from_chat_id: %w", )
		}
		.MigratedFromChatID = 
	}
	if .Flags.Has(4) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field migrated_from_max_id: %w", )
		}
		.MigratedFromMaxID = 
	}
	if .Flags.Has(5) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field pinned_msg_id: %w", )
		}
		.PinnedMsgID = 
	}
	if .Flags.Has(8) {
		if  := .Stickerset.Decode();  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field stickerset: %w", )
		}
	}
	if .Flags.Has(9) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field available_min_id: %w", )
		}
		.AvailableMinID = 
	}
	if .Flags.Has(11) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field folder_id: %w", )
		}
		.FolderID = 
	}
	if .Flags.Has(14) {
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field linked_chat_id: %w", )
		}
		.LinkedChatID = 
	}
	if .Flags.Has(15) {
		,  := DecodeChannelLocation()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field location: %w", )
		}
		.Location = 
	}
	if .Flags.Has(17) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field slowmode_seconds: %w", )
		}
		.SlowmodeSeconds = 
	}
	if .Flags.Has(18) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field slowmode_next_send_date: %w", )
		}
		.SlowmodeNextSendDate = 
	}
	if .Flags.Has(12) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field stats_dc: %w", )
		}
		.StatsDC = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field pts: %w", )
		}
		.Pts = 
	}
	if .Flags.Has(21) {
		if  := .Call.Decode();  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field call: %w", )
		}
	}
	if .Flags.Has(24) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field ttl_period: %w", )
		}
		.TTLPeriod = 
	}
	if .Flags.Has(25) {
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field pending_suggestions: %w", )
		}

		if  > 0 {
			.PendingSuggestions = make([]string, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			,  := .String()
			if  != nil {
				return fmt.Errorf("unable to decode channelFull#f2bcb6f: field pending_suggestions: %w", )
			}
			.PendingSuggestions = append(.PendingSuggestions, )
		}
	}
	if .Flags.Has(26) {
		,  := DecodePeer()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field groupcall_default_join_as: %w", )
		}
		.GroupcallDefaultJoinAs = 
	}
	if .Flags.Has(27) {
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field theme_emoticon: %w", )
		}
		.ThemeEmoticon = 
	}
	if .Flags.Has(28) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field requests_pending: %w", )
		}
		.RequestsPending = 
	}
	if .Flags.Has(28) {
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field recent_requesters: %w", )
		}

		if  > 0 {
			.RecentRequesters = make([]int64, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			,  := .Long()
			if  != nil {
				return fmt.Errorf("unable to decode channelFull#f2bcb6f: field recent_requesters: %w", )
			}
			.RecentRequesters = append(.RecentRequesters, )
		}
	}
	if .Flags.Has(29) {
		,  := DecodePeer()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field default_send_as: %w", )
		}
		.DefaultSendAs = 
	}
	if .Flags.Has(30) {
		,  := DecodeChatReactions()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field available_reactions: %w", )
		}
		.AvailableReactions = 
	}
	if .Flags2.Has(4) {
		if  := .Stories.Decode();  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field stories: %w", )
		}
	}
	if .Flags2.Has(7) {
		,  := DecodeWallPaper()
		if  != nil {
			return fmt.Errorf("unable to decode channelFull#f2bcb6f: field wallpaper: %w", )
		}
		.Wallpaper = 
	}
	return nil
}

// SetCanViewParticipants sets value of CanViewParticipants conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags.Set(3)
		.CanViewParticipants = true
	} else {
		.Flags.Unset(3)
		.CanViewParticipants = false
	}
}

// GetCanViewParticipants returns value of CanViewParticipants conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(3)
}

// SetCanSetUsername sets value of CanSetUsername conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags.Set(6)
		.CanSetUsername = true
	} else {
		.Flags.Unset(6)
		.CanSetUsername = false
	}
}

// GetCanSetUsername returns value of CanSetUsername conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(6)
}

// SetCanSetStickers sets value of CanSetStickers conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags.Set(7)
		.CanSetStickers = true
	} else {
		.Flags.Unset(7)
		.CanSetStickers = false
	}
}

// GetCanSetStickers returns value of CanSetStickers conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(7)
}

// SetHiddenPrehistory sets value of HiddenPrehistory conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags.Set(10)
		.HiddenPrehistory = true
	} else {
		.Flags.Unset(10)
		.HiddenPrehistory = false
	}
}

// GetHiddenPrehistory returns value of HiddenPrehistory conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(10)
}

// SetCanSetLocation sets value of CanSetLocation conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags.Set(16)
		.CanSetLocation = true
	} else {
		.Flags.Unset(16)
		.CanSetLocation = false
	}
}

// GetCanSetLocation returns value of CanSetLocation conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(16)
}

// SetHasScheduled sets value of HasScheduled conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags.Set(19)
		.HasScheduled = true
	} else {
		.Flags.Unset(19)
		.HasScheduled = false
	}
}

// GetHasScheduled returns value of HasScheduled conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(19)
}

// SetCanViewStats sets value of CanViewStats conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags.Set(20)
		.CanViewStats = true
	} else {
		.Flags.Unset(20)
		.CanViewStats = false
	}
}

// GetCanViewStats returns value of CanViewStats conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(20)
}

// SetBlocked sets value of Blocked conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags.Set(22)
		.Blocked = true
	} else {
		.Flags.Unset(22)
		.Blocked = false
	}
}

// GetBlocked returns value of Blocked conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(22)
}

// SetCanDeleteChannel sets value of CanDeleteChannel conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags2.Set(0)
		.CanDeleteChannel = true
	} else {
		.Flags2.Unset(0)
		.CanDeleteChannel = false
	}
}

// GetCanDeleteChannel returns value of CanDeleteChannel conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags2.Has(0)
}

// SetAntispam sets value of Antispam conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags2.Set(1)
		.Antispam = true
	} else {
		.Flags2.Unset(1)
		.Antispam = false
	}
}

// GetAntispam returns value of Antispam conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags2.Has(1)
}

// SetParticipantsHidden sets value of ParticipantsHidden conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags2.Set(2)
		.ParticipantsHidden = true
	} else {
		.Flags2.Unset(2)
		.ParticipantsHidden = false
	}
}

// GetParticipantsHidden returns value of ParticipantsHidden conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags2.Has(2)
}

// SetTranslationsDisabled sets value of TranslationsDisabled conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags2.Set(3)
		.TranslationsDisabled = true
	} else {
		.Flags2.Unset(3)
		.TranslationsDisabled = false
	}
}

// GetTranslationsDisabled returns value of TranslationsDisabled conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags2.Has(3)
}

// SetStoriesPinnedAvailable sets value of StoriesPinnedAvailable conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags2.Set(5)
		.StoriesPinnedAvailable = true
	} else {
		.Flags2.Unset(5)
		.StoriesPinnedAvailable = false
	}
}

// GetStoriesPinnedAvailable returns value of StoriesPinnedAvailable conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags2.Has(5)
}

// SetViewForumAsMessages sets value of ViewForumAsMessages conditional field.
func ( *ChannelFull) ( bool) {
	if  {
		.Flags2.Set(6)
		.ViewForumAsMessages = true
	} else {
		.Flags2.Unset(6)
		.ViewForumAsMessages = false
	}
}

// GetViewForumAsMessages returns value of ViewForumAsMessages conditional field.
func ( *ChannelFull) () ( bool) {
	if  == nil {
		return
	}
	return .Flags2.Has(6)
}

// GetID returns value of ID field.
func ( *ChannelFull) () ( int64) {
	if  == nil {
		return
	}
	return .ID
}

// GetAbout returns value of About field.
func ( *ChannelFull) () ( string) {
	if  == nil {
		return
	}
	return .About
}

// SetParticipantsCount sets value of ParticipantsCount conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(0)
	.ParticipantsCount = 
}

// GetParticipantsCount returns value of ParticipantsCount conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(0) {
		return , false
	}
	return .ParticipantsCount, true
}

// SetAdminsCount sets value of AdminsCount conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(1)
	.AdminsCount = 
}

// GetAdminsCount returns value of AdminsCount conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(1) {
		return , false
	}
	return .AdminsCount, true
}

// SetKickedCount sets value of KickedCount conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(2)
	.KickedCount = 
}

// GetKickedCount returns value of KickedCount conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(2) {
		return , false
	}
	return .KickedCount, true
}

// SetBannedCount sets value of BannedCount conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(2)
	.BannedCount = 
}

// GetBannedCount returns value of BannedCount conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(2) {
		return , false
	}
	return .BannedCount, true
}

// SetOnlineCount sets value of OnlineCount conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(13)
	.OnlineCount = 
}

// GetOnlineCount returns value of OnlineCount conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(13) {
		return , false
	}
	return .OnlineCount, true
}

// GetReadInboxMaxID returns value of ReadInboxMaxID field.
func ( *ChannelFull) () ( int) {
	if  == nil {
		return
	}
	return .ReadInboxMaxID
}

// GetReadOutboxMaxID returns value of ReadOutboxMaxID field.
func ( *ChannelFull) () ( int) {
	if  == nil {
		return
	}
	return .ReadOutboxMaxID
}

// GetUnreadCount returns value of UnreadCount field.
func ( *ChannelFull) () ( int) {
	if  == nil {
		return
	}
	return .UnreadCount
}

// GetChatPhoto returns value of ChatPhoto field.
func ( *ChannelFull) () ( PhotoClass) {
	if  == nil {
		return
	}
	return .ChatPhoto
}

// GetNotifySettings returns value of NotifySettings field.
func ( *ChannelFull) () ( PeerNotifySettings) {
	if  == nil {
		return
	}
	return .NotifySettings
}

// SetExportedInvite sets value of ExportedInvite conditional field.
func ( *ChannelFull) ( ExportedChatInviteClass) {
	.Flags.Set(23)
	.ExportedInvite = 
}

// GetExportedInvite returns value of ExportedInvite conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( ExportedChatInviteClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(23) {
		return , false
	}
	return .ExportedInvite, true
}

// GetBotInfo returns value of BotInfo field.
func ( *ChannelFull) () ( []BotInfo) {
	if  == nil {
		return
	}
	return .BotInfo
}

// SetMigratedFromChatID sets value of MigratedFromChatID conditional field.
func ( *ChannelFull) ( int64) {
	.Flags.Set(4)
	.MigratedFromChatID = 
}

// GetMigratedFromChatID returns value of MigratedFromChatID conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int64,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(4) {
		return , false
	}
	return .MigratedFromChatID, true
}

// SetMigratedFromMaxID sets value of MigratedFromMaxID conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(4)
	.MigratedFromMaxID = 
}

// GetMigratedFromMaxID returns value of MigratedFromMaxID conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(4) {
		return , false
	}
	return .MigratedFromMaxID, true
}

// SetPinnedMsgID sets value of PinnedMsgID conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(5)
	.PinnedMsgID = 
}

// GetPinnedMsgID returns value of PinnedMsgID conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(5) {
		return , false
	}
	return .PinnedMsgID, true
}

// SetStickerset sets value of Stickerset conditional field.
func ( *ChannelFull) ( StickerSet) {
	.Flags.Set(8)
	.Stickerset = 
}

// GetStickerset returns value of Stickerset conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( StickerSet,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(8) {
		return , false
	}
	return .Stickerset, true
}

// SetAvailableMinID sets value of AvailableMinID conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(9)
	.AvailableMinID = 
}

// GetAvailableMinID returns value of AvailableMinID conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(9) {
		return , false
	}
	return .AvailableMinID, true
}

// SetFolderID sets value of FolderID conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(11)
	.FolderID = 
}

// GetFolderID returns value of FolderID conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(11) {
		return , false
	}
	return .FolderID, true
}

// SetLinkedChatID sets value of LinkedChatID conditional field.
func ( *ChannelFull) ( int64) {
	.Flags.Set(14)
	.LinkedChatID = 
}

// GetLinkedChatID returns value of LinkedChatID conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int64,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(14) {
		return , false
	}
	return .LinkedChatID, true
}

// SetLocation sets value of Location conditional field.
func ( *ChannelFull) ( ChannelLocationClass) {
	.Flags.Set(15)
	.Location = 
}

// GetLocation returns value of Location conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( ChannelLocationClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(15) {
		return , false
	}
	return .Location, true
}

// SetSlowmodeSeconds sets value of SlowmodeSeconds conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(17)
	.SlowmodeSeconds = 
}

// GetSlowmodeSeconds returns value of SlowmodeSeconds conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(17) {
		return , false
	}
	return .SlowmodeSeconds, true
}

// SetSlowmodeNextSendDate sets value of SlowmodeNextSendDate conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(18)
	.SlowmodeNextSendDate = 
}

// GetSlowmodeNextSendDate returns value of SlowmodeNextSendDate conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(18) {
		return , false
	}
	return .SlowmodeNextSendDate, true
}

// SetStatsDC sets value of StatsDC conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(12)
	.StatsDC = 
}

// GetStatsDC returns value of StatsDC conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(12) {
		return , false
	}
	return .StatsDC, true
}

// GetPts returns value of Pts field.
func ( *ChannelFull) () ( int) {
	if  == nil {
		return
	}
	return .Pts
}

// SetCall sets value of Call conditional field.
func ( *ChannelFull) ( InputGroupCall) {
	.Flags.Set(21)
	.Call = 
}

// GetCall returns value of Call conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( InputGroupCall,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(21) {
		return , false
	}
	return .Call, true
}

// SetTTLPeriod sets value of TTLPeriod conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(24)
	.TTLPeriod = 
}

// GetTTLPeriod returns value of TTLPeriod conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(24) {
		return , false
	}
	return .TTLPeriod, true
}

// SetPendingSuggestions sets value of PendingSuggestions conditional field.
func ( *ChannelFull) ( []string) {
	.Flags.Set(25)
	.PendingSuggestions = 
}

// GetPendingSuggestions returns value of PendingSuggestions conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( []string,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(25) {
		return , false
	}
	return .PendingSuggestions, true
}

// SetGroupcallDefaultJoinAs sets value of GroupcallDefaultJoinAs conditional field.
func ( *ChannelFull) ( PeerClass) {
	.Flags.Set(26)
	.GroupcallDefaultJoinAs = 
}

// GetGroupcallDefaultJoinAs returns value of GroupcallDefaultJoinAs conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( PeerClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(26) {
		return , false
	}
	return .GroupcallDefaultJoinAs, true
}

// SetThemeEmoticon sets value of ThemeEmoticon conditional field.
func ( *ChannelFull) ( string) {
	.Flags.Set(27)
	.ThemeEmoticon = 
}

// GetThemeEmoticon returns value of ThemeEmoticon conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( string,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(27) {
		return , false
	}
	return .ThemeEmoticon, true
}

// SetRequestsPending sets value of RequestsPending conditional field.
func ( *ChannelFull) ( int) {
	.Flags.Set(28)
	.RequestsPending = 
}

// GetRequestsPending returns value of RequestsPending conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(28) {
		return , false
	}
	return .RequestsPending, true
}

// SetRecentRequesters sets value of RecentRequesters conditional field.
func ( *ChannelFull) ( []int64) {
	.Flags.Set(28)
	.RecentRequesters = 
}

// GetRecentRequesters returns value of RecentRequesters conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( []int64,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(28) {
		return , false
	}
	return .RecentRequesters, true
}

// SetDefaultSendAs sets value of DefaultSendAs conditional field.
func ( *ChannelFull) ( PeerClass) {
	.Flags.Set(29)
	.DefaultSendAs = 
}

// GetDefaultSendAs returns value of DefaultSendAs conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( PeerClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(29) {
		return , false
	}
	return .DefaultSendAs, true
}

// SetAvailableReactions sets value of AvailableReactions conditional field.
func ( *ChannelFull) ( ChatReactionsClass) {
	.Flags.Set(30)
	.AvailableReactions = 
}

// GetAvailableReactions returns value of AvailableReactions conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( ChatReactionsClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(30) {
		return , false
	}
	return .AvailableReactions, true
}

// SetStories sets value of Stories conditional field.
func ( *ChannelFull) ( PeerStories) {
	.Flags2.Set(4)
	.Stories = 
}

// GetStories returns value of Stories conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( PeerStories,  bool) {
	if  == nil {
		return
	}
	if !.Flags2.Has(4) {
		return , false
	}
	return .Stories, true
}

// SetWallpaper sets value of Wallpaper conditional field.
func ( *ChannelFull) ( WallPaperClass) {
	.Flags2.Set(7)
	.Wallpaper = 
}

// GetWallpaper returns value of Wallpaper conditional field and
// boolean which is true if field was set.
func ( *ChannelFull) () ( WallPaperClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags2.Has(7) {
		return , false
	}
	return .Wallpaper, true
}

// ChatFullClassName is schema name of ChatFullClass.
const ChatFullClassName = "ChatFull"

// ChatFullClass represents ChatFull generic type.
//
// See https://core.telegram.org/type/ChatFull for reference.
//
// Example:
//
//	g, err := tg.DecodeChatFull(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.ChatFull: // chatFull#c9d31138
//	case *tg.ChannelFull: // channelFull#f2bcb6f
//	default: panic(v)
//	}
type ChatFullClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() ChatFullClass

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

	// Can we change the username of this chat
	GetCanSetUsername() (value bool)

	// Whether scheduled messages¹ are available
	//
	// Links:
	//  1) https://core.telegram.org/api/scheduled-messages
	GetHasScheduled() (value bool)

	// Whether the real-time chat translation popup¹ should be hidden.
	//
	// Links:
	//  1) https://core.telegram.org/api/translation
	GetTranslationsDisabled() (value bool)

	// ID of the chat
	GetID() (value int64)

	// About string for this chat
	GetAbout() (value string)

	// Notification settings
	GetNotifySettings() (value PeerNotifySettings)

	// Chat invite
	GetExportedInvite() (value ExportedChatInviteClass, ok bool)

	// Message ID of the last pinned message¹
	//
	// Links:
	//  1) https://core.telegram.org/api/pin
	GetPinnedMsgID() (value int, ok bool)

	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	GetFolderID() (value int, ok bool)

	// Group call information
	GetCall() (value InputGroupCall, ok bool)

	// Time-To-Live of messages sent by the current user to this chat
	GetTTLPeriod() (value int, ok bool)

	// When using phone.getGroupCallJoinAs¹ to get a list of peers that can be used to join
	// a group call, this field indicates the peer that should be selected by default.
	//
	// Links:
	//  1) https://core.telegram.org/method/phone.getGroupCallJoinAs
	GetGroupcallDefaultJoinAs() (value PeerClass, ok bool)

	// Emoji representing a specific chat theme
	GetThemeEmoticon() (value string, ok bool)

	// Pending join requests »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/invites#join-requests
	GetRequestsPending() (value int, ok bool)

	// IDs of users who requested to join recently
	GetRecentRequesters() (value []int64, ok bool)
	// Allowed message reactions »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/reactions
	GetAvailableReactions() (value ChatReactionsClass, ok bool)
}

// DecodeChatFull implements binary de-serialization for ChatFullClass.
func ( *bin.Buffer) (ChatFullClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case ChatFullTypeID:
		// Decoding chatFull#c9d31138.
		 := ChatFull{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChatFullClass: %w", )
		}
		return &, nil
	case ChannelFullTypeID:
		// Decoding channelFull#f2bcb6f.
		 := ChannelFull{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChatFullClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode ChatFullClass: %w", bin.NewUnexpectedID())
	}
}

// ChatFull boxes the ChatFullClass providing a helper.
type ChatFullBox struct {
	ChatFull ChatFullClass
}

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

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